txthinking / brook

A cross-platform programmable network tool
https://brook.app
GNU General Public License v3.0
14.64k stars 2.4k forks source link

怎么让服务只支持ipv4 #1163

Closed wsxedcer closed 1 year ago

wsxedcer commented 1 year ago

服务端和安卓客户端都为v20230404版本,使用手机网络情况下开启VPN,不能访问成功,服务端日志提示全是解析为ipv6地址 [root@proxy bin]# ./brook_linux_amd64 wsserver --listen :9999 --password cA 2023/04/08 09:34:02 {"dst":"[2a01:53c0:ffe5::d]:443","error":"dial tcp [2a01:53c0:ffe5::d]:443: connect: network is unreachable","from":"117.136.111.190:43036"} 2023/04/08 09:34:02 {"dst":"[2a01:53c0:ffe5::d]:443","error":"dial tcp [2a01:53c0:ffe5::d]:443: connect: network is unreachable","from":"117.136.111.190:43037"}

应该怎么关闭ipv6解析,只使用ipv4呢?

wsxedcer commented 1 year ago

已经解决,修改系统DNS选项就可以了

txthinking commented 1 year ago

https://github.com/txthinking/bypass/blob/master/example_script.tengo#L32-L34