V2Ray+WebSocket+TLS+Nginx

此脚本可以让被墙的vps复活

准备工作

  • VPS一台

  • 域名一个付费购买(推荐Namesilo),也可以在Freenom申请一个免费域名(申请教程),之后解析到你的VPS IP上。

一键脚本使用方式

脚本适用于:Debian 9+ / Ubuntu 18.04+ / Centos7+

V2RAY WS+TLS

wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh" && chmod +x install.sh && bash install.sh

两个安装方式(不兼容,二选一)

1.Vmess+websocket+TLS+Nginx+Website

bash <(curl -L -s https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh) | tee v2ray_ins.log

2.Vmess + HTTP2 over TLS

bash <(curl -L -s https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install_h2.sh) | tee v2ray_ins_h2.log

安装成功后如下所示:

脚本启动方式

启动 V2ray:systemctl start v2ray

停止 V2ray:systemctl stop v2ray

启动 Nginx:systemctl start nginx

停止 Nginx:systemctl stop nginx

脚本相关目录

Web 目录:/home/wwwroot/levis

V2ray 服务端配置:/etc/v2ray/config.json

V2ray 客户端配置: 执行安装时所在目录下的 v2ray_info.txt

Nginx 目录: /etc/nginx

证书目录: /data/v2ray.key 和 /data/v2ray.crt

下载Windows客户端:V2RayN

打开软件,点击:服务器→添加[VMess]服务器:

填上你设置的对应数据,如服务器ip、端口、UUID(服务端和客户端必须一致),加密方式一般为aes-128-gcm,协议为ws,伪装域名留空,路径为/ray,开启tls和不安全传输,设置完保存。

右键V2RayN的系统栏小图标,点击启用Http代理,Http代理模式选择第二个PAC模式,最后再打开V2RayN软件面板,在检查更新里选择更新PAC

到此,V2Ray就全部配置完成了。

最后更新于