How to install v2ray +ws+tls in linux

How to install v2ray +ws+tls in linux

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

  1. {
  2.   “inbounds”: [
  3.     {
  4.       “port”: yourport,
  5.       “listen”:”127.0.0.1″,
  6.       “protocol”: “vmess”,
  7.       “settings”: {
  8.         “clients”: [
  9.           {
  10.             “id”: “yourid”,
  11.             “alterId”: 64
  12.           }
  13.         ]
  14.       },
  15.       “streamSettings”: {
  16.         “network”: “ws”,
  17.         “wsSettings”: {
  18.         “path”: “/”
  19.         }
  20.       }
  21.     }
  22.   ],
  23.   “outbounds”: [
  24.     {
  25.       “protocol”: “freedom”,
  26.       “settings”: {}
  27.     }
  28.   ]
  29. }

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

  1. name.com {
  2.     tls    [email protected]
  3.     proxy /  127.0.0.1:12345  {
  4.     websocket
  5.     header_upstream -Origin
  6.   }
  7. }

root

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.