宝塔网站配置:
location /e4f39c63c/ {
if ($http_upgrade != "websocket") {
return 404;
}
proxy_redirect off;
proxy_pass http://127.0.0.1:28949;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
安装本体和数据文件:curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
安装和更新V2Ray:bash install-release.sh
设置开启自启动:systemctl enable v2ray
目录文件/usr/local/etc/v2ray/config.json在{}中添加以下:
{
"inbounds": [
{
"port": 28949,
"listen":"127.0.0.1",
"protocol": "vless",
"settings": {
"decryption": "none",
"clients": [
{
"id": "1bb83c10-911e-4767-81d2-adb5177c0718",
"level": 0
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/905a4386/"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
注意port端口号、UUID、patch要一致。附件下载