Admin
bash <(curl -L -s https://install.direct/go.sh)
参考官方文档
vim /etc/v2ray/config.json
内容
{
"inbounds": [{
"port": 1234,
"protocol": "vmess",
"settings": {
"clients": [{ "id": "b831381d-6324-4d53-ad4f-8cda48b30811" }]
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
}]
}
启动
systemctl start v2ray
开机自动启动
systemctl enable v2ray
firewall-cmd --zone=public --add-port=1234/tcp --permanent
firewall-cmd --reload
同服务端安装
{
"inbounds": [{
"port": 1081,
"listen": "0.0.0.0",
"protocol": "socks",
"settings": {
"udp": true
}
}],
"outbounds": [{
"protocol": "vmess",
"settings": {
"vnext": [{
"address": "IP OR HOST URL HERE",
"port": 1234,
"users": [{ "id": "b831381d-6324-4d53-ad4f-8cda48b30811" }]
}]
}
},{
"protocol": "freedom",
"tag": "direct",
"settings": {}
}],
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "direct"
}]
}
}