手动搭建一个vless+tcp+tls节点
手动搭建一个vless+tcp+tls节点
需要的原料:1. 节点一枚
申请ssl证书
wget -N https://gitlab.com/rwkgyg/acme-script/raw/main/acme.sh && bash acme.sh
(一键脚本)
给证书权限
# Xray 默认以 nobody 用户运行,证书权限适配 chown -R nobody.$cert_group /{证书的文件夹}/*
安装xray
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
获取uuid
xray uuid
修改/usr/local/etc/xray/里的config文件
{ "log": { "loglevel": "warning" }, "routing": { "domainStrategy": "AsIs", "rules": [ { "type": "field", "ip": [ "geoip:private" ], "outboundTag": "block" } ] }, "inbounds": [ { "listen": "0.0.0.0", "port": {{端口}}, "protocol": "vless", "settings": { "decryption":"none", "clients": [ { "id": "uuid" } ] }, "streamSettings": { "network": "tcp", "security": "tls", "tlsSettings": { "alpn": "http/1.1", "certificates": [ { "certificateFile": "xxx/cert.crt",//证书地址,下同 "keyFile": "xxx/private.key" } ] } } } ], "outbounds": [ { "protocol": "freedom", "tag": "direct" }, { "protocol": "blackhole", "tag": "block" } ] }
在v2rayN客户端添加节点,选择添加vless服务器
别名:随便填
地址:填域名
端口:填端口
id:填uuid
tls:选择tls
没有提到的不动,点击确定。