【验证不良林の最强伪装“AnyReality”节点】为 3x-ui 添加 SS+Reality Inbound

大闸泄楼主
1h 17min ago in 内版
本文目的:验证不良林最新一期视频《搭建最强伪装“AnyReality”节点》的 3x-ui 实现
服务端:3x-ui 编译版
客户端:xray
因为 3x-ui 不支持为 Shadowsocks 配置 Reality,所以需要手动修改和编译源码
下载源码
git clone https://github.com/MHSanaei/3x-ui.git
修改 Inbound 配置页面,为 Shadowsocks 添加 Reality 选项
找到 inbound.js
3x-ui/web/assets/js/model/inbound.js
找到 canEnableReality() 方法,添加 Shadowsocks 协议:Protocols.SHADOWSOCKS
canEnableReality() {
if (![Protocols.VLESS, Protocols.TROJAN, Protocols.SHADOWSOCKS].includes(this.protocol)) return false;
return ["tcp", "http", "grpc", "xhttp"].includes(this.network);
}
安装 golang
wget https://go.dev/dl/go1.24.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz
echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
编译
go build -ldflags "-w -s" -o xui-release -v main.go
部署
将编译出来的 xui-release 上传至服务器,并替换
/usr/local/x-ui/x-ui
重启 x-ui 服务
x-ui restart
客户端
本地安装 xray
以 macos 为例:
brew install xray
客户端配置文件
{
"inbounds":
[
{
"listen": "::",
"port": 11111,
"protocol": "socks",
"settings":
{
"auth": "noauth",
"udp": true
}
}
],
"outbounds":
[
{
"protocol": "shadowsocks",
"settings":
{
"servers":
[
{
"address": "<你的服务器IP>",
"port": <你的Shadowsocks端口>,
"method": "aes-256-gcm",
"password": "<你的Shadowsocks密码>"
}
]
},
"streamSettings":
{
"network": "tcp",
"security": "reality",
"realitySettings":
{
"serverName": "yahoo.com",
"publicKey": "<你的Public Key>",
"shortId": "<你的Short Id>"
}
}
}
]
}
验证
curl baidu.com -x socks://127.0.0.1:11111
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
EOF
效果


彩蛋
定制你自己的版本号
3x-ui/config/version

Comments NOTHING