「0元白嫖德国节点!不用买服务器,全程粘贴命令只要3步」
视频教程
官网:https://portal.uppcoder.com/login
探活命令,确认容器能出站、看出口国家和 CPU 架构:
curl -s https://ipinfo.io/json; echo; uname -m; cat /etc/os-release | head -3- 看到 JSON(ip / country)= 出站通
uname -m显示x86_64用下面 amd64 的包;显示aarch64则把安装命令里的amd64换成arm64
安装 sing-box + cloudflared
整段粘贴:
cd ~ && mkdir -p node && cd node
curl -L -o sb.tar.gz https://github.com/SagerNet/sing-box/releases/download/v1.14.4/sing-box-1.14.4-linux-amd64.tar.gz && tar xzf sb.tar.gz --strip-components=1 && rm sb.tar.gz
curl -L -o cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
chmod +x sing-box cloudflared
./sing-box version; ./cloudflared --version最后一行打出两个版本号即安装成功。
生成配置、启动服务、拉起临时隧道
整段粘贴(UUID 和随机路径自动生成,不用手填):
UUID=$(cat /proc/sys/kernel/random/uuid)
WSPATH=/ray-$(head -c3 /dev/urandom | od -An -tx1 | tr -d ' \n')
cat > config.json <<EOF
{"log":{"level":"info"},"inbounds":[{"type":"vless","listen":"127.0.0.1","listen_port":10000,"users":[{"uuid":"$UUID"}],"transport":{"type":"ws","path":"$WSPATH"}}],"outbounds":[{"type":"direct"}]}
EOF
./sing-box check -c config.json && echo CONFIG-OK
nohup ./sing-box run -c config.json > sing-box.log 2>&1 &
sleep 2
curl -s -o /dev/null -w "local-ws:%{http_code}\n" http://127.0.0.1:10000$WSPATH
nohup ./cloudflared tunnel --protocol http2 --url http://127.0.0.1:10000 --no-autoupdate > cf.log 2>&1 &
sleep 10
grep -c "Registered tunnel connection" cf.log成功标记(三个都要有):
CONFIG-OK— 配置合法local-ws:400— sing-box 在本机活着(普通请求被回 400 是正常应答;000才是没起来)- 最后的数字 ≥1 — 隧道已连上 CF 边缘
关键参数--protocol http2千万别省:临时隧道默认走 QUIC(UDP),这类容器平台的出站 UDP 常被挡,表现是域名能申请下来、但客户端测延迟永远 -1、CF 回 530。日志里会出现Failed to dial a quic connection ... timeout。强制 http2(走 TCP 443)即可解决,本教程所有隧道命令都已带上。
保活
(备份 + 追加配置):
最后打出 2 再粘第二段(0 就是没粘上,重粘第一段)。
第二段(接管 + 验证 + 出链接):
成功标志:两行 RUNNING + local-ws:400 + 最后一行新链接。
进阶版
(固定隧道,地址永久不变)
临时隧道唯一的毛病:cloudflared 每次重启,trycloudflare.com 域名就换一个,链接要重发。换成固定隧道后,地址是自己的子域名,重启不变。
第 1 步:CF 后台建隧道
dash.cloudflare.com→ Zero Trust → Networks → Tunnels → Create a tunnel → 选 Cloudflared,命名如uppcoder- 在「Install and run a connector」页,复制命令中
--token后面那一长串保存好(这是钥匙,只粘进自己的终端,别外传、别入镜)
第 2 步:绑公开主机名
隧道 Configure → Public Hostname → Add:
- Subdomain:自选,如
de;Domain:选你的域名;Path 留空 - Service:Type = HTTP,URL =
127.0.0.1:10000 - 保存后固定地址为
https://de.你的域名(DNS 记录由 CF 自动创建)
第 3 步:容器里改用 token 启动(sing-box 不用动)
pkill cloudflared; sleep 1
nohup ./cloudflared tunnel --protocol http2 --no-autoupdate run --token 粘贴你的token > cf3.log 2>&1 & sleep 8; grep -c "Registered tunnel connection" cf3.log
固定隧道:
注意事项
更多资源分享链接
海外网赚走资系列
https://youtube.com/playlist?list=PLU5ZBgZNBmfLOIMi-NfhVevAqI0ou6DLu&si=_nM8YlIin5GAlIPp
永久免费VPN合集
https://www.youtube.com/playlist?list=PLull5C8Cu9seW365SMm_BRFcdIhMCnZCW
合集1
https://www.youtube.com/playlist?list=PLull5C8Cu9sdMqVZHHC-2ySQ_p0k1EDiq
合集2
https://www.youtube.com/playlist?list=PLull5C8Cu9sdZM1gk851ZMDhH37n04VLZ
合集1
https://www.youtube.com/playlist?list=PLull5C8Cu9sduNjDlZHcM8taPl6oCV5S1
合集2
https://www.youtube.com/playlist?list=PLull5C8Cu9sc72ZKMd9sZ5nVFxa8lVP9e

0 评论