使用VLESS-TCP-XTLS-Vision协议的原因- 解决已知漏洞
- 针对 tls1.3 开启 xtls (直接拷贝) 模式
- 增加 tls 握手长度混淆
- 简化代码
教程开始用acme申请 SSL 证书你先要购买一个域名 然后添加一个域名,将域名指向你VPS的IP。等待5-10分钟,让DNS解析生效。你可以通过ping你的域名,查看返回的IP是否正确。确认DNS解析生效后,再执行下面的命令(每行命令依次执行)。 注意:需要将第六,七行内的 chika.example.com 替换成你的域名。
- curl https://get.acme.sh | sh
复制代码
- alias acme.sh=~/.acme.sh/acme.sh
复制代码
- acme.sh --upgrade --auto-upgrade
复制代码
- acme.sh --set-default-ca --server letsencrypt
复制代码
- acme.sh --issue -d chika.example.com --standalone --keylength ec-256
复制代码
- acme.sh --install-cert -d chika.example.com --ecc --fullchain-file /etc/ssl/private/fullchain.cer --key-file /etc/ssl/private/private.key
复制代码
- chown -R nobody:nogroup /etc/ssl/private/
复制代码
提醒:SSL证书有效期是90天,每隔60几天会自动更新。速率限制,超过次数会报错。 (可选)备份已申请的SSL证书:使用WinSCP登录你的VPS,进入/etc/ssl/private/目录,下载证书文件fullchain.cer和私钥文件private.key。 安装Nginx- apt install -y gnupg2 ca-certificates lsb-release debian-archive-keyring && curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor > /usr/share/keyrings/nginx-archive-keyring.gpg && printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list && printf "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900" > /etc/apt/preferences.d/99nginx && apt update -y && apt install -y nginx && mkdir -p /etc/systemd/system/nginx.service.d && printf "[Service]\nExecStartPost=/bin/sleep 0.1" > /etc/systemd/system/nginx.service.d/override.conf
复制代码
- apt install -y gnupg2 ca-certificates lsb-release ubuntu-keyring && curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor > /usr/share/keyrings/nginx-archive-keyring.gpg && printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list && printf "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900" > /etc/apt/preferences.d/99nginx && apt update -y && apt install -y nginx && mkdir -p /etc/systemd/system/nginx.service.d && printf "[Service]\nExecStartPost=/bin/sleep 0.1" > /etc/systemd/system/nginx.service.d/override.conf
复制代码
安装Xray- bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --beta
复制代码
下载Xray配置 (VLESS-TCP-XTLS-Vision with fallbacks function)- curl -Lo /etc/nginx/nginx.conf https://raw.githubusercontent.com/chika0801/Xray-examples/main/VLESS-TCP-XTLS/nginx.conf && curl -Lo /usr/local/etc/xray/config.json https://raw.githubusercontent.com/chika0801/Xray-examples/main/VLESS-TCP-XTLS-Vision/config_server_fallbacks.json
复制代码
启动程序- systemctl restart nginx && systemctl restart xray
复制代码
客户端设置地址(address) VPS的IP
端口(prot) 443
用户ID(id) chika
流控(flow) xtls-rprx-vision
传输协议(network) tcp
传输层安全(tls) tls
SNI 你的域名
uTLS chrome 教程结束,测试是否能够使用,至此你已经使用上了VLESS-TCP-XTLS-Vision协议
|