前置条件
- 主机:一台可用的国外VPS
- 架构:KVM、OpenVZ(OVZ)
- 系统:Debian 9+、CentOS 7+ Ubuntu 16.04+
- 域名:将购买的域名,提前指向VPS服务器IP地址。
安装加速服务
先安装wget
yum -y install wget ## ContOS Yum 安装 wget
apt-get install wget ## Debian Ubuntu 安装 wget
安装BBR四合一脚本
wget --no-check-certificate https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcp.sh && chmod
+x tcp.sh && ./tcp.sh
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
直接选择想要的加速内核,输入对应数字,重启VPS后输入./tcp.sh
进入脚本选择合适的加速。
一般来说:线路好,离大陆近的VPS可以选择BBR加速,线路一般的选择锐速加速,具体效果可以自行测试。
安装V2Ray服务
申请一个域名用于伪装网站,可以在freenom注册一个免费域名,然后将域名解析到对应的VPS上。
安装curl
yum update -y && yum install curl -y ## centos系统安装 Curl 方法
apt-get update -y && apt-get install curl -y ## ubuntu/debian系统安装 Curl 方法
安装V2Ray WS+TLS
Vmess+websocket+TLS+Nginx+Website
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
VLESS+websocket+TLS+Nginx+Website
wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/dev/install.sh" && chmod +x install.sh && bash install.sh
注意事项
- 在尝试本脚本确实可用之前,请不要将本程序应用于生产环境中。
- 如果你不了解脚本中各项设置的具体含义,除域名外,请使用脚本提供的默认值
- 每周日的凌晨3点,Nginx 会自动重启以配合证书的签发定时任务进行,在此期间,节点无法正常连接,预计持续时间为若干秒至两分钟
- 目前支持Debian 9+ / Ubuntu 18.04+ / Centos7+ ,部分Centos模板可能存在难以处理的编译问题,建议遇到编译问题时,请更换至其他系统模板
- 该程序依赖 Nginx 实现相关功能,请使用 LNMP 或其他类似携带 Nginx 脚本安装过 Nginx 的用户特别留意,使用本脚本可能会导致无法预知的错误
启动方式
启动 V2ray:systemctl start v2ray
停止 V2ray:systemctl stop v2ray
启动 Nginx:systemctl start nginx
停止 Nginx:systemctl stop nginx
相关目录
Web 目录:/home/wwwroot/3DCEList
V2ray 服务端配置:/etc/v2ray/config.json
V2ray 客户端配置: ~/v2ray_info.inf
Nginx 目录: /etc/nginx
证书文件: /data/v2ray.key
和 /data/v2ray.crt
请注意证书权限设置
另一个脚本
这里提供另一个一键脚本用作备份,效果相同。
curl -O https://raw.githubusercontent.com/atrandys/v2ray-ws-tls/master/v2ray_ws_tls1.3.sh && chmod +x v2ray_ws_tls1.3.sh && ./v2ray_ws_tls1.3.sh
按照提示输入序号和域名就可以安装了,整个流程大约需要十分钟左右,网站相关目录在/etc/nginx/html
目录,你可以替换成自己的文件。
说明
代码源自网络,请勿用于非法用途,仅供学习使用,本站不做安全性和功能保障。