How to install v2ray +ws+tls in linux
- By : YaoYuan
- Category : linux Tutorial
- Tags : cloudflare, linux, proxy, v2ray
- Comment : 0
1、instsall v2ray
bash <(curl -L -s https://install.direct/go.sh)
2、edit v2ray config for support ws
nano /etc/v2ray/config.json
edit
-
{
-
“inbounds”: [
-
{
-
“port”: yourport,
-
“listen”:”127.0.0.1″,
-
“protocol”: “vmess”,
-
“settings”: {
-
“clients”: [
-
{
-
“id”: “yourid”,
-
“alterId”: 64
-
}
-
]
-
},
-
“streamSettings”: {
-
“network”: “ws”,
-
“wsSettings”: {
-
“path”: “/”
-
}
-
}
-
}
-
],
-
“outbounds”: [
-
{
-
“protocol”: “freedom”,
-
“settings”: {}
-
}
-
]
-
}
3、restart v2ray service
service v2ray restart
4、install caddy
curl https://getcaddy.com | bash -s personal hook.service
5、edit caddyfile for support tls
cd /usr/local/bin
nano Caddyfile
-
name.com {
-
tls z@z.com
-
proxy / 127.0.0.1:12345 {
-
websocket
-
header_upstream -Origin
-
}
-
}