- 手动下载Xray客户端
https://github.com/XTLS/Xray-core/releases/tag/v1.8.23
- 解压和执行权限
chmod +x
- 测试配置文件,配置文件用v2ray客户端导出,省去编辑错误
/data/Xray/xray -test -config /etc/xray/config.json
- 运行
/data/Xray/xray -c /etc/xray/config.json
- 检验代理是否成功生效
curl --socks5 127.0.0.1:6789 https://www.google.com
curl -x socks5://127.0.0.1:6789 https://www.google.com -v
wget www.google.com
curl www.google.com
docker设置代理
export http_proxy="http://127.0.0.1:6790"
或
export ALL_PROXY=socks://127.0.0.1:6789