一、Xray八合一
Xray七合一共存脚本(v2ray-agent)具有(VLESS+TCP+TLS/VLESS+TCP+XTLS/VLESS+WS+TLS/VMess+TCP+TLS/VMess+WS+TLS/Trojan/Trojan-Go WS)等多种安装模式,还能自动生成伪装博客,且支持多内核安装。
支持组合方式
- VLESS+TCP+TLS
- VLESS+TCP+xtls-rprx-direct【推荐】
- VLESS+WS+TLS
- VMess+TCP+TLS
- VMess+WS+TLS
- Trojan【推荐】
- Trojan-Go+WS
脚本目录
- v2ray-core 【/etc/v2ray-agent/v2ray】
- Xray-core 【/etc/v2ray-agent/xray】
- Trojan 【/etc/v2ray-agent/trojan】
- TLS证书 【/etc/v2ray-agent/tls】
- Nginx配置文件 【/etc/nginx/conf.d/alone.conf】、Nginx伪装博客目录 【/usr/share/nginx/html】
安装
1.准备工作
1.一台境外VPS,且ip可以在中国大陆正常访问
2.一个域名,并成功解析到VPS的ip
3.ssh远程连接软件,如 FinalShell、Xshell、Putty
2.ssh远程软件连接到vps,开放80、443端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
3.防火墙生效
firewall-cmd --reload
4.安装 wget 命令
yum -y install wget
5.安装bbr加速
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
6.选择"安装BBRplus"内核 7.重启服务器(安装完成后会提示重启服务器,键入“y”,回车重启) 8.重新连接服务器,再次执行安装bbr加速命令,选择“使用BBRplus版加速”
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
9.执行Xray共存一键搭建脚本
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
10.选择“1.安装”或“2.任意组合安装”
1:仅安装几种常见协议模式,自定义项较多。
2:可以多种模式共存。
无论何种模式都推荐安装“Xray-core”内核
10.根据提示进行个性化安装
11.返回配置信息,Xray搭建完成
12.保存并应用配置信息至本地客户端开始科学上网
常用命令
1.启动xray
systemctl start xray
2.关闭xray
systemctl stop xray
3.重启xray
systemctl restart xray
二、Trojan
安装
1.准备工作
1.一台境外VPS,且ip可以在中国大陆正常访问
2.一个域名,并成功解析到VPS的ip
3.ssh远程连接软件,如 FinalShell、Xshell、Putty
2.ssh远程软件连接到vps,开放80、443端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
3.防火墙生效
firewall-cmd --reload
4.安装 wget 命令
yum -y install wget
5.安装bbr加速
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
6.选择"安装BBRplus"内核 7.重启服务器(安装完成后会提示重启服务器,键入“y”,回车重启) 8.重新连接服务器,再次执行安装bbr加速命令,选择“使用BBRplus版加速”
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
9.执行Trojan搭建服务器脚本
curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_mult.sh && chmod +x trojan_mult.sh && ./trojan_mult.sh
10.选择“1.安装” 11.输入解析的域名 12.输入要设置的密码 13.返回配置json,Trojan搭建完成。
配置json解读
{
"run_type": "client", // 客户端配置信息
"local_addr": "127.0.0.1", // 本地 socks5/http代理 地址
"local_port": 1080, // 本地 socks5/http代理 监听端口
"remote_addr": "vczs.ml", // trojan服务器地址 或 解析到vps地址的域名
"remote_port": 443, // trojan服务器监听端口 建议使用443端口
"password": [
"xxxxxxxx" // trojan 密码
],
"log_level": 1, // 指定日志等级。等级越高,输出的信息越少。
"ssl": {
"verify": true, // 是否校验服务端提供的证书合法性
"verify_hostname": true, // 服务端是否校验客户端提供的SNI与服务端设置的一致性。
"cert": "", // 服务器证书文件(如果使用权威CA签发的证书可不填)
"cipher_tls13":"TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",
"sni": "", // TLS客户端请求中的服务器名字段;如果这一项未填,将使用remote_addr填充
"alpn": [
"h2",
"http/1.1"
],
"reuse_session": true,
"session_ticket": false,
"curves": "" // 指定TLS在ECDHE中偏好使用的椭圆曲线。
},
"tcp": {
"no_delay": true, // TCP封包是否直接发出而不等待缓冲区填满
"keep_alive": true, // 是否启用TCP心跳存活检测。
"fast_open": false,
"fast_open_qlen": 20
}
}