前言 群友反馈在Deiban13下不能设置IPv4优先 通过进一步的交流, 群友的意思是 sing-box 向外访问, 无法通过 gai.conf 来设置是 IPv4优先 还是 IPv6优先 群友用的是fakeip的模式, 翻墙客户端发给梯子的数据包中只有域名, 没有IP. 上一篇我们测试了sing-box , 这次我们再测试一下 xray 技术基础 用 curl socks5h 模拟翻墙客户端 fakeip 行为 编译getaddrinfo钩子 钩Go程序 编译xray https://github.com/XTLS/Xray-core#one-line-compilation 准备测试环境 搭建一个简单的xray服务端 官方安装脚本 bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install 把service自动启动的xray关掉 systemctl stop xray 配置文件 nano /usr/local/etc/xray/test-config.json { "log": { "access": "/var/log/xray/test-access.log", "error": "/var/log/xray/test-error.log", "loglevel": "debug" }, "inbounds": [ { "listen":"127.0.0.1", "port":1080, "protocol":"socks" } ], "outbounds": [ { "protocol": "freedom", "tag": "di...