Wireguard 配置是 mullvad vpn 提供的,我只手动加了 table=off
[Interface]
PrivateKey = ***
Address = 10.73.177.213/32,fc00:bbbb:bbbb:bb01::a:b1d4/128
Table = off # <-- 这里开了 table=off
[Peer]
PublicKey = ***
AllowedIPs = 0.0.0.0/0,::0/0
Endpoint = ***:51820
curl 用 --interface wg1
手动指定了网卡,用 -6
强制 ipv6 ,秒失败:
root@debian:~# curl -6 --interface wg1 -v myip.wtf/json
* Trying [2607:5300:203:26a1::acab:f001]:80...
* Immediate connect fail for 2607:5300:203:26a1::acab:f001: Network is unreachable
* Failed to connect to myip.wtf port 80 after 4 ms: Couldn't connect to server
* Closing connection 0
curl: (7) Failed to connect to myip.wtf port 80 after 4 ms: Couldn't connect to server
ipv4 正常:
root@debian:~# curl -4 --interface wg1 -v myip.wtf/json
* Trying 142.44.215.161:80...
* Connected to myip.wtf (142.44.215.161) port 80 (#0)
> GET /json HTTP/1.1
> Host: myip.wtf
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 200 OK
此处省略...
wireguard 连接状态:
root@debian:~# wg
interface: wg1
public key: ***
private key: (hidden)
listening port: 51274
peer: ***
endpoint: ***:51820
allowed ips: 0.0.0.0/0, ::/0
latest handshake: 1 minute, 9 seconds ago
transfer: 2.21 KiB received, 1.54 KiB sent
求大佬解答
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.