From aae29edb64df3a2932008ab4860a4c5dde7cff04 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 27 Mar 2023 11:35:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E5=AE=8C=E5=96=84r?= =?UTF-8?q?eality=E8=AE=A2=E9=98=85=E3=80=81=E4=BF=AE=E6=94=B9readme?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 ++++- install.sh | 55 +++++++++++++++++++++++++----------------------------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 9bb7f9a..f9d2b1a 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,16 @@ ## 支持的安装类型 +- VLESS+TCP+Reality+uTLS+Vision【推荐】 +- VLESS+gRPC+Reality+uTLS【推荐】 - VLESS+TCP+TLS_Vision【推荐】 +- Hysteria【推荐】 - VLESS+gRPC+TLS【支持CDN、IPv6、延迟低】 - VLESS+WS+TLS【支持CDN、IPv6】 - Trojan+TCP+TLS - Trojan+gRPC+TLS【支持CDN、IPv6、延迟低】 - VMess+WS+TLS【支持CDN、IPv6】 -- Hysteria【推荐】 + ## 线路推荐 diff --git a/install.sh b/install.sh index 1a6f129..15cfa8d 100644 --- a/install.sh +++ b/install.sh @@ -3366,9 +3366,6 @@ defaultBase64Code() { port=${currentDefaultPort} - local subAccount - subAccount=$(echo "${email}" | awk -F "[_]" '{print $1}')_$(echo "${id}_currentHost" | md5sum | awk '{print $1}') - if [[ "${type}" == "vlesstcp" ]]; then if [[ "${coreInstallType}" == "1" ]] && echo "${currentInstallProtocolType}" | grep -q 0; then @@ -3377,7 +3374,7 @@ defaultBase64Code() { echoContent yellow " ---> 格式化明文(VLESS+TCP+TLS_Vision)" echoContent green "协议类型:VLESS,地址:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:tls,传输方式:tcp,flow:xtls-rprx-vision,账户名:${email}\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" vless://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=tls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-vision#${email} EOF echoContent yellow " ---> 二维码 VLESS(VLESS+TCP+TLS_Vision)" @@ -3389,7 +3386,7 @@ EOF echoContent yellow " ---> 格式化明文(VLESS+TCP+TLS)" echoContent green " 协议类型:VLESS,地址:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:tls,传输方式:tcp,账户名:${email}\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" vless://${id}@${currentHost}:${currentDefaultPort}?security=tls&encryption=none&host=${currentHost}&headerType=none&type=tcp#${email} EOF echoContent yellow " ---> 二维码 VLESS(VLESS+TCP+TLS)" @@ -3402,7 +3399,7 @@ EOF echoContent yellow " ---> 格式化明文(Trojan+TCP+TLS_Vision)" echoContent green "协议类型:Trojan,地址:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-rprx-vision,账户名:${email}\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" trojan://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-vision#${email} EOF echoContent yellow " ---> 二维码 Trojan(Trojan+TCP+TLS_Vision)" @@ -3418,7 +3415,7 @@ EOF echoContent green " vmess://${qrCodeBase64Default}\n" echoContent yellow " ---> 二维码 vmess(VMess+WS+TLS)" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" vmess://${qrCodeBase64Default} EOF echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vmess://${qrCodeBase64Default}\n" @@ -3431,7 +3428,7 @@ EOF echoContent yellow " ---> 格式化明文(VLESS+WS+TLS)" echoContent green " 协议类型:VLESS,地址:${currentAdd},伪装域名/SNI:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:tls,传输方式:ws,路径:/${currentPath}ws,账户名:${email}\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" vless://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&security=tls&type=ws&host=${currentHost}&sni=${currentHost}&path=/${currentPath}ws#${email} EOF @@ -3446,7 +3443,7 @@ EOF echoContent yellow " ---> 格式化明文(VLESS+gRPC+TLS)" echoContent green " 协议类型:VLESS,地址:${currentAdd},伪装域名/SNI:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:tls,传输方式:gRPC,alpn:h2,serviceName:${currentPath}grpc,账户名:${email}\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" vless://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&security=tls&type=grpc&host=${currentHost}&path=${currentPath}grpc&serviceName=${currentPath}grpc&alpn=h2&sni=${currentHost}#${email} EOF echoContent yellow " ---> 二维码 VLESS(VLESS+gRPC+TLS)" @@ -3457,7 +3454,7 @@ EOF echoContent yellow " ---> Trojan(TLS)" echoContent green " trojan://${id}@${currentHost}:${currentDefaultPort}?peer=${currentHost}&sni=${currentHost}&alpn=http/1.1#${currentHost}_Trojan\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" trojan://${id}@${currentHost}:${currentDefaultPort}?peer=${currentHost}&sni=${currentHost}&alpn=http/1.1#${email}_Trojan EOF echoContent yellow " ---> 二维码 Trojan(TLS)" @@ -3468,7 +3465,7 @@ EOF echoContent yellow " ---> Trojan gRPC(TLS)" echoContent green " trojan://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&peer=${currentHost}&security=tls&type=grpc&sni=${currentHost}&alpn=h2&path=${currentPath}trojangrpc&serviceName=${currentPath}trojangrpc#${email}\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" trojan://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&peer=${currentHost}&security=tls&type=grpc&sni=${currentHost}&alpn=h2&path=${currentPath}trojangrpc&serviceName=${currentPath}trojangrpc#${email} EOF echoContent yellow " ---> 二维码 Trojan gRPC(TLS)" @@ -3479,35 +3476,34 @@ EOF hysteriaEmail=$(echo "${email}" | awk -F "[_]" '{print $1}')_hysteria echoContent yellow " ---> Hysteria(TLS)" echoContent green " hysteria://${currentHost}:${hysteriaPort}?protocol=${hysteriaProtocol}&auth=${id}&peer=${currentHost}&insecure=0&alpn=h3&upmbps=${hysteriaClientUploadSpeed}&downmbps=${hysteriaClientDownloadSpeed}#${hysteriaEmail}\n" - cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" hysteria://${currentHost}:${hysteriaPort}?protocol=${hysteriaProtocol}&auth=${id}&peer=${currentHost}&insecure=0&alpn=h3&upmbps=${hysteriaClientUploadSpeed}&downmbps=${hysteriaClientDownloadSpeed}#${hysteriaEmail} EOF echoContent yellow " ---> 二维码 Hysteria(TLS)" echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=hysteria%3A%2F%2F${currentHost}%3A${hysteriaPort}%3Fprotocol%3D${hysteriaProtocol}%26auth%3D${id}%26peer%3D${currentHost}%26insecure%3D0%26alpn%3Dh3%26upmbps%3D${hysteriaClientUploadSpeed}%26downmbps%3D${hysteriaClientDownloadSpeed}%23${hysteriaEmail}\n" elif [[ "${type}" == "vlessReality" ]]; then - echoContent yellow " ---> 通用格式(VLESS+reality)" + echoContent yellow " ---> 通用格式(VLESS+reality+uTLS+Vision)" echoContent green " vless://${id}@$(getPublicIP):${currentRealityPort}?encryption=none&security=reality&type=tcp&sni=${currentRealityServerNames}&fp=chrome&pbk=${currentRealityPublicKey}&flow=xtls-rprx-vision#${email}\n" - echoContent yellow " ---> 格式化明文(VLESS+reality)" + echoContent yellow " ---> 格式化明文(VLESS+reality+uTLS+Vision)" echoContent green "协议类型:VLESS reality,地址:$(getPublicIP),publicKey:${currentRealityPublicKey},serverNames:${currentRealityServerNames},端口:${currentRealityPort},用户ID:${id},传输方式:tcp,账户名:${email}\n" - # cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" - #vless://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=tls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-vision#${email} - #EOF - # echoContent yellow " ---> 二维码 VLESS(VLESS+TCP+TLS_Vision)" - # echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${currentHost}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dtcp%26${currentHost}%3D${currentHost}%26headerType%3Dnone%26sni%3D${currentHost}%26flow%3Dxtls-rprx-vision%23${email}\n" + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" +vless://${id}@$(getPublicIP):${currentRealityPort}?encryption=none&security=reality&type=tcp&sni=${currentRealityServerNames}&fp=chrome&pbk=${currentRealityPublicKey}&flow=xtls-rprx-vision#${email} +EOF + echoContent yellow " ---> 二维码 VLESS(VLESS+reality+uTLS+Vision)" + echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40$(getPublicIP)%3A${currentRealityPort}%3Fencryption%3Dnone%26security%3Dreality%26type%3Dtcp%26sni%3D${currentRealityServerNames}%26fp%3Dchrome%26pbk%3D${currentRealityPublicKey}%26flow%3Dxtls-rprx-vision%23${email}\n" elif [[ "${type}" == "vlessRealityGRPC" ]]; then - echoContent yellow " ---> 通用格式(VLESS+reality+gRPC)" + echoContent yellow " ---> 通用格式(VLESS+reality+uTLS+gRPC)" echoContent green " vless://${id}@$(getPublicIP):${currentRealityPort}?encryption=none&security=reality&type=grpc&sni=${currentRealityServerNames}&fp=chrome&pbk=${currentRealityPublicKey}&path=grpc&serviceName=grpc#${email}\n" - echoContent yellow " ---> 格式化明文(VLESS+reality+gRPC)" + echoContent yellow " ---> 格式化明文(VLESS+reality+uTLS+gRPC)" echoContent green "协议类型:VLESS reality,serviceName:grpc,地址:$(getPublicIP),publicKey:${currentRealityPublicKey},serverNames:${currentRealityServerNames},端口:${currentRealityPort},用户ID:${id},传输方式:gRPC,client-fingerprint:chrome,账户名:${email}\n" - # cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" - #vless://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=tls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-vision#${email} - #EOF - # echoContent yellow " ---> 二维码 VLESS(VLESS+TCP+TLS_Vision)" - # echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${currentHost}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dtcp%26${currentHost}%3D${currentHost}%26headerType%3Dnone%26sni%3D${currentHost}%26flow%3Dxtls-rprx-vision%23${email}\n" - + cat <>"/etc/v2ray-agent/subscribe_tmp/${id}" +vless://${id}@$(getPublicIP):${currentRealityPort}?encryption=none&security=reality&type=grpc&sni=${currentRealityServerNames}&fp=chrome&pbk=${currentRealityPublicKey}&path=grpc&serviceName=grpc#${email} +EOF + echoContent yellow " ---> 二维码 VLESS(VLESS+reality+uTLS+gRPC)" + echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40$(getPublicIP)%3A${currentRealityPort}%3Fencryption%3Dnone%26security%3Dreality%26type%3Dgrpc%26sni%3D${currentRealityServerNames}%26fp%3Dchrome%26pbk%3D${currentRealityPublicKey}%26path%3Dgrpc%26serviceName%3Dgrpc%23${email}\n" fi } @@ -5572,8 +5568,7 @@ xrayCoreInstall() { handleNginx stop randomPathFunction 5 # 安装Xray - # handleV2Ray stop - installXray 6 + installXray 6 true installXrayService 7 customCDNIP 8 initXrayConfig all 9 @@ -5948,7 +5943,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.7.23_reality_beta" + echoContent green "当前版本:v2.7.24_reality_beta" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus