v2ray安裝設定

最近SS & SSR被針對太狠,但身為一個熱愛科學上網者,還是得找方法搞定,於是就在新網站上加掛了v2ray。本文主要是參考

https://github.com/Jrohy/multi-v2ray/blob/master/README.md

以及設定nginx分流。
https://www.sooele.com/index.php/2018/05/31/最新v2ray管理面板寶塔bt面板:websockettlsnginx、apache分流自定義http-header/

安裝好v2ray後,先修改通訊協定為ws,再進nginx裡的wordpress網站設定內,新增底下文字。

location /ws {
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_set_header Host $http_host;
if ($http_host = “xxx你的域名” ) {proxy_pass http://127.0.0.1:你的V2ray管理面板分配的v2ray端口;
}
}

Vi /etc/v2ray/config.json
找到”path”: “”
修改為”path”: “/ws”, //path可自定義,這裏是/ws,但必須與nginx、客戶端的path同樣