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] PubicKey = *** 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
求大佬解答
![]() | 1 flynaj 80 天前 via Android 你是一个内网 ipv6,要通你需要 ipv6nat |
![]() | 2 wuruxu 80 天前 不要手动修改 他们提供的 wireguard 配置 直接这样用就可以了 |
3 sduoduo233 OP |
4 popzuk 80 天前 唉,搞商家返现的 VPN 没有提供 IPv6 的。 |
![]() | 5 wuruxu 80 天前 @sduoduo233 默认不要开启 wireguard 的 route 系统上采用 policy route , 选择一部分流量 进入 wg0 |