服务器
{
"inbounds": [
{
"port": 自定义端口,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "自定义id"
}
]
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
客户端
{
"inbounds": [
{
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks",
"settings": {
"udp": true,
"auth": "noauth"
}
},
{
"listen": "127.0.0.1",
"port": 10809,
"protocol": "http",
"settings": {}
}
],
"outbounds": [
{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "服务器ip",
"port": 端口,
"users": [
{
"id": "密钥",
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "tcp"
},
"tag": "vmess-out"
},
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "blocked"
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "direct"
}
]
}
}运行
./v2ray run config.json