用 VPS 的公网 IP 给只有内网 IP 的宽带开放端口。
适合 T-Mobile 5G Home Internet, Starlink, Verizon 5G Home Internet, 其他 5G CPE 或者大内网移动宽带。
先在 VPS 上装 WireGuard
https://github.com/angristan/wireguard-install启用 BBR
https://wiki.crowncloud.net/?How_to_enable_BBR_on_Ubuntu_20_04添加一个新用户
我选择的 IP 是 172.22.0.2/32 ,VPS 地址用 11.22.33.44 作为例子
cat wg-client-TEST.conf
[Interface]
PrivateKey =
Address = 172.22.0.2/32
DNS = 1.1.1.2,1.0.0.2
[Peer]
PublicKey =
PresharedKey =
Endpoint = 11.22.33.44:55
AllowedIPs = 0.0.0.0/0,::/0
添加 iptables 转发
iptables -F
iptables -t nat -F
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 11.22.33.44 也可以用 MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 2026 -d 11.22.33.0/24 -j DNAT --to-destination 172.22.0.2
iptables -t nat -A PREROUTING -p udp --dport 2026 -d 11.22.33.0/24 -j DNAT --to-destination 172.22.0.2
在电脑上连上 WireGuard ,qBittorrent 设置端口为 2026
效果
ping.pe 测试也是全部通的
https://tcp.ping.pe/11.22.33.44:2026在墙内不要用 WireGuard ,换成 AmneziaWG 或者其他协议
https://docs.amnezia.org/documentation/amnezia-wg/
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://ex.noerr.eu.org/t/1134113
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.