add-excluded-route
warp-cli add-excluded-route 你的客户端IP地址
然后我们可以查询:
$ warp-cli get-excluded-routes
Excluded routes:
...
你的客户端IP地址/32
放行所有IP
我们不可能为每个用户添加IP地址,怎么办呢?
warp-cli add-excluded-route 0.0.0.0/0
$ warp-cli get-excluded-routes
Excluded routes:
10.0.0.0/8
100.64.0.0/10
169.254.0.0/16
172.16.0.0/12
192.0.0.0/24
192.168.0.0/16
224.0.0.0/24
240.0.0.0/4
239.255.255.250/32
255.255.255.255/32
fe80::/10
fd00::/8
ff01::/16
ff02::/16
ff03::/16
ff04::/16
ff05::/16
fc00::/7
0.0.0.0/0 (CLI exclude)
但是这个时候,你的服务器只有IPv6才会被代理,IPv4还是原来的IP。看起来就像添加了一个IPv6栈一样。
$ ping6 google.com
PING google.com(sfo03s32-in-x0e.1e100.net (2607:f8b0:4005:814::200e)) 56 data bytes
64 bytes from sfo03s32-in-x0e.1e100.net (2607:f8b0:4005:814::200e): icmp_seq=1 ttl=60 time=138 ms
64 bytes from sfo03s32-in-x0e.1e100.net (2607:f8b0:4005:814::200e): icmp_seq=2 ttl=60 time=136 ms
64 bytes from sfo03s32-in-x0e.1e100.net (2607:f8b0:4005:814::200e): icmp_seq=3 ttl=60 time=130 ms
如何判断客户端是否使用了Warp
获取客户端访问接口 https://www.cloudflare.com/cdn-cgi/trace
的内容即可。
$ curl https://www.cloudflare.com/cdn-cgi/trace
fl=12f870
h=www.cloudflare.com
ip=1xx.43.106.2xx
ts=1676742781.706
visit_scheme=https
uag=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
colo=LAX
sliver=010-tier1
http=http/2
loc=CN
tls=TLSv1.3
sni=plaintext
warp=off <======== 看这里
gateway=off
rbi=off
kex=X25519
标签:16,IP,Warp,x0e.1,warp,excluded,0.0,CloudFlare,com
From: https://www.cnblogs.com/develon/p/17134123.html