WCS Helper: Network Tunnel
Access internationally blocked websites from your China-based server.
When You Need This
Scenario A — "git push keeps timing out"
git push github main
# → Connection timeout
→
/万重山-隧道-开启 → try push again → succeeds
Scenario B — "npm install keeps failing for a package from GitHub"
npm install some-github-package
# → network timeout
→
/万重山-隧道-开启 → npm works through tunnel
Scenario C — "HuggingFace model download is stuck"
huggingface-cli download ...
# → timeout or connection reset
→
/万重山-隧道-开启 → download completes through tunnel
Scenario D — "ClawHub skill install is super slow"
clawhub install author/skill
# → extremely slow, often fails
→
/万重山-隧道-开启 → ClawHub installs at full speed
Supported Sites
| Site | Use Case | Status |
|---|
| GitHub | git clone/push, npm packages | ✅ |
| ClawHub |
skill install, plugin browsing | ✅ |
| HuggingFace | model downloads, datasets | ✅ |
| arXiv | research paper access | ✅ |
| Google | search, fonts, analytics | ✅ |
| YouTube | video embeds, APIs | ✅ |
| Twitter/X | social media embeds | ✅ |
| Reddit | forum access, APIs | ✅ |
Prerequisites
Required
- - A server outside China (any VPS with SSH access)
- Recommended: Tencent Cloud Singapore, AWS Singapore, or any international VPS
- SSH password authentication must be enabled
- - SSH password for that server
- Server's public IP address
Recommended
- -
autossh installed on your China server (auto-restarts tunnel if it drops)
- Install:
apt install autossh (Debian/Ubuntu)
- -
sshpass installed (for password-based SSH)
- Install: INLINECODE7
Network Flow
CODEBLOCK4
Setup
1. Get a Tunnel Server
Any international VPS works. Recommended:
- - Tencent Cloud Singapore (CNY ~15/month)
- AWS Singapore Free Tier
- DigitalOcean Singapore
- Vultr Tokyo/Singapore
Requirements:
- - SSH password access enabled
- Port 22 (SSH) open to China IPs
2. Install the Skill
CODEBLOCK5
3. Configure with Your Server
Send this command via Feishu private chat:
CODEBLOCK6
Example:
CODEBLOCK7
4. Start the Tunnel
CODEBLOCK8
You should see: ✅ Tunnel connected
5. Test It
CODEBLOCK9
All Commands
| Command | What It Does |
|---|
| INLINECODE8 | Set up tunnel server credentials |
| INLINECODE9 |
Start the tunnel |
|
/万重山-隧道-关闭 | Stop the tunnel |
|
/万重山-隧道-状态 | Show tunnel connection status |
|
/万重山-隧道-测试 | Test tunnel speed |
|
/万重山-隧道-帮助 | Show help |
Usage Tips
Before Running git/npm Commands
Send /万重山-隧道-状态 first. If you see "Tunnel: ✅", you're good. If "Tunnel: ❌", send /万重山-隧道-开启 first.
Tunnel Stays On Until You Close It
The tunnel runs in the background. Send /万重山-隧道-关闭 when you don't need international access any more.
Which Ports Are Proxied
Only TCP connections through the SOCKS5 proxy are tunneled:
- - GitHub (443) ✅
- ClawHub (443) ✅
- HuggingFace (443) ✅
- Google (443) ✅
UDP traffic (some gaming, VoIP) is NOT proxied.
How It Works
Connection Process
CODEBLOCK10
Without the Tunnel (Direct Connection)
CODEBLOCK11
With the Tunnel
CODEBLOCK12
Performance
| Metric | Value |
|---|
| Tunnel latency | ~50-100ms (China → Singapore) |
| GitHub clone speed |
500KB/s - 5MB/s |
| ClawHub install | 1-5 seconds |
| Proxy overhead | ~5-10% bandwidth |
Troubleshooting
"Tunnel: ❌ Connection failed"
→ Check server IP, SSH port, username, password
→ Make sure SSH password auth is enabled on your VPS
"Tunnel connects but git push still times out"
→ Try again — GitHub sometimes rate-limits tunnel IPs temporarily
→ If persistent, your VPS IP may be on GitHub's blacklist
"autossh process not running after server restart"
→ Send /万重山-隧道-开启 to restart manually
→ Or set up systemd service (advanced — see auto-fix.sh)
"SSH connection refused"
→ Check if port 22 is open on your VPS firewall
→ Try SSH port 2222 if 22 is blocked
Security Notes
- - The tunnel only handles outbound connections from your China server
- Your VPS provider can see the traffic (GitHub, ClawHub, etc.) but NOT your China server's other traffic
- No data is stored on the VPS — only encrypted transit
- Tunnel credentials are stored locally in
~/.wcs_tunnel.conf (chmod 600)
Uninstall
CODEBLOCK13
WCS Helper: 网络隧道
从你位于中国的服务器访问被国际封锁的网站。
何时需要此功能
场景A — git push 一直超时
git push github main
→ 连接超时
→ /万重山-隧道-开启 → 重新推送 → 成功
场景B — npm install 安装来自 GitHub 的包一直失败
npm install some-github-package
→ 网络超时
→ /万重山-隧道-开启 → npm 通过隧道正常工作
场景C — HuggingFace 模型下载卡住
huggingface-cli download ...
→ 超时或连接重置
→ /万重山-隧道-开启 → 通过隧道完成下载
场景D — ClawHub 技能安装超级慢
clawhub install author/skill
→ 极其缓慢,经常失败
→ /万重山-隧道-开启 → ClawHub 全速安装
支持的网站
| 网站 | 用途 | 状态 |
|---|
| GitHub | git clone/push, npm 包 | ✅ |
| ClawHub |
技能安装, 插件浏览 | ✅ |
| HuggingFace | 模型下载, 数据集 | ✅ |
| arXiv | 研究论文访问 | ✅ |
| Google | 搜索, 字体, 分析 | ✅ |
| YouTube | 视频嵌入, API | ✅ |
| Twitter/X | 社交媒体嵌入 | ✅ |
| Reddit | 论坛访问, API | ✅ |
前提条件
必需
- - 一台位于中国境外的服务器(任何支持SSH访问的VPS)
- 推荐:腾讯云新加坡、AWS新加坡或任何国际VPS
- 必须启用SSH密码认证
推荐
- - 在中国服务器上安装 autossh(隧道断开时自动重启)
- 安装:apt install autossh(Debian/Ubuntu)
- 安装:apt install sshpass
网络流向
你的中国服务器 (autossh 客户端)
↓ SSH 隧道(加密)
新加坡/国际 VPS(作为 SOCKS5 代理)
↓
GitHub / ClawHub / HuggingFace / Google
设置
1. 获取隧道服务器
任何国际VPS均可。推荐:
- - 腾讯云新加坡(约15元人民币/月)
- AWS新加坡免费套餐
- DigitalOcean新加坡
- Vultr东京/新加坡
要求:
- - 已启用SSH密码访问
- 端口22(SSH)对中国IP开放
2. 安装技能
bash
npx -y clawhub install guanqi0914/wcs-helper-network-skill
3. 使用你的服务器进行配置
通过飞书私聊发送此命令:
/万重山-隧道-配置 服务器IP SSH端口 用户名 密码
示例:
/万重山-隧道-配置 43.134.164.43 22 ubuntu myPassword123
4. 启动隧道
/万重山-隧道-开启
你应该会看到:✅ 隧道已连接
5. 测试
bash
curl --socks5 127.0.0.1:1080 https://api.github.com
应返回:HTTP 200
所有命令
| 命令 | 功能 |
|---|
| /万重山-隧道-配置 <IP> <端口> <用户> <密码> | 设置隧道服务器凭据 |
| /万重山-隧道-开启 |
启动隧道 |
| /万重山-隧道-关闭 | 停止隧道 |
| /万重山-隧道-状态 | 显示隧道连接状态 |
| /万重山-隧道-测试 | 测试隧道速度 |
| /万重山-隧道-帮助 | 显示帮助 |
使用技巧
在运行 git/npm 命令之前
先发送 /万重山-隧道-状态。如果看到隧道:✅,就可以正常使用。如果显示隧道:❌,先发送 /万重山-隧道-开启。
隧道保持开启直到你关闭它
隧道在后台运行。当不再需要国际访问时,发送 /万重山-隧道-关闭。
哪些端口被代理
只有通过SOCKS5代理的TCP连接会被隧道化:
- - GitHub (443) ✅
- ClawHub (443) ✅
- HuggingFace (443) ✅
- Google (443) ✅
UDP流量(某些游戏、VoIP)不会被代理。
工作原理
连接过程
- 1. autossh 通过 SSH 连接到你的国际服务器
sshpass -p password ssh -N -D 127.0.0.1:1080 user@server-ip
- 2. SSH 创建加密隧道
- 3. autossh 每30秒监控隧道
- 4. 如果隧道断开 → autossh 自动重启
- 5. 应用程序使用 127.0.0.1:1080 作为 SOCKS5 代理
没有隧道(直接连接)
中国服务器 → GitHub/ClawHub/HuggingFace
↓
连接超时 / 重置 / 非常慢
使用隧道
中国服务器 → SSH 隧道 → 国际 VPS → GitHub/ClawHub/HuggingFace
↓
稳定的加密连接
性能
| 指标 | 数值 |
|---|
| 隧道延迟 | ~50-100ms(中国 → 新加坡) |
| GitHub 克隆速度 |
500KB/s - 5MB/s |
| ClawHub 安装 | 1-5秒 |
| 代理开销 | ~5-10% 带宽 |
故障排除
隧道:❌ 连接失败
→ 检查服务器IP、SSH端口、用户名、密码
→ 确保你的VPS上已启用SSH密码认证
隧道已连接但git push仍然超时
→ 重试一次 — GitHub有时会临时限制隧道IP
→ 如果持续存在,你的VPS IP可能已被GitHub列入黑名单
服务器重启后autossh进程未运行
→ 发送 /万重山-隧道-开启 手动重启
→ 或者设置systemd服务(高级 — 参见 auto-fix.sh)
SSH连接被拒绝
→ 检查你的VPS防火墙是否开放了端口22
→ 如果端口22被封锁,尝试使用SSH端口2222
安全说明
- - 隧道仅处理来自你中国服务器的出站连接
- 你的VPS提供商可以看到流量(GitHub、ClawHub等),但看不到你中国服务器的其他流量
- VPS上不存储任何数据 — 仅进行加密传输
- 隧道凭据本地存储在 ~/.wcs_tunnel.conf(chmod 600)
卸载
bash
停止隧道
/万重山-隧道-关闭
删除技能文件
rm -rf ~/.openclaw/workspace/skills/wcs-helper-network-skill
rm -f ~/.wcs_tunnel.conf