From 270f92d996de46e7d00f95e2edaa26625883f683 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 26 Mar 2023 22:49:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E9=80=89=E6=8B=A91?= =?UTF-8?q?.=E5=AE=89=E8=A3=85=E6=97=B6=E9=BB=98=E8=AE=A4=E5=AE=89?= =?UTF-8?q?=E8=A3=85reality=EF=BC=88=E8=87=AA=E5=B7=B1=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E7=9A=84SSL=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 84 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 36 deletions(-) diff --git a/install.sh b/install.sh index 819a248..1a6f129 100644 --- a/install.sh +++ b/install.sh @@ -2953,7 +2953,6 @@ initXrayConfig() { currentClients='[{"id":"'${uuid}'","add":"'${add}'","flow":"xtls-rprx-vision","email":"default-VLESS_TCP/TLS_Vision"}]' echoContent yellow "\n ${uuid}" fi - # movePreviousConfig # log if [[ ! -f "/etc/v2ray-agent/xray/conf/00_log.json" ]]; then @@ -3196,11 +3195,22 @@ EOF fi # VLESS_TCP/reality - if echo "${selectCustomInstallType}" | grep -q 7; then + if echo "${selectCustomInstallType}" | grep -q 7 || [[ "$1" == "all" ]]; then local defaultPort=443 if [[ -n "${customPort}" ]]; then defaultPort=${customPort} fi + if [[ "$1" == "all" ]]; then + echoContent skyBlue "\n===================== 配置VLESS+Reality =====================\n" + initRealityPort + local defaultPort=443 + if [[ -n "${customPort}" ]]; then + defaultPort=${customPort} + fi + realityDestDomain=${domain}:${defaultPort} + initRealityKey + realityServerNames=\"${domain}\" + fi cat </etc/v2ray-agent/xray/conf/07_VLESS_vision_reality_inbounds.json { @@ -3269,48 +3279,50 @@ EOF } EOF - else + fi + + if echo "${selectCustomInstallType}" | grep -q 0 || [[ "$1" == "all" ]]; then local defaultPort=443 if [[ -n "${customPort}" ]]; then defaultPort=${customPort} fi cat </etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json -{ - "inbounds":[ { - "port": ${defaultPort}, - "protocol": "vless", - "tag":"VLESSTCP", - "settings": { - "clients":$(initXrayClients 0), - "decryption": "none", - "fallbacks": [ - ${fallbacksList} - ] - }, - "streamSettings": { - "network": "tcp", - "security": "tls", - "tlsSettings": { - "minVersion": "1.2", - "alpn": [ - "http/1.1", - "h2" - ], - "certificates": [ + "inbounds":[ { - "certificateFile": "/etc/v2ray-agent/tls/${domain}.crt", - "keyFile": "/etc/v2ray-agent/tls/${domain}.key", - "ocspStapling": 3600, - "usage":"encipherment" + "port": ${defaultPort}, + "protocol": "vless", + "tag":"VLESSTCP", + "settings": { + "clients":$(initXrayClients 0), + "decryption": "none", + "fallbacks": [ + ${fallbacksList} + ] + }, + "streamSettings": { + "network": "tcp", + "security": "tls", + "tlsSettings": { + "minVersion": "1.2", + "alpn": [ + "http/1.1", + "h2" + ], + "certificates": [ + { + "certificateFile": "/etc/v2ray-agent/tls/${domain}.crt", + "keyFile": "/etc/v2ray-agent/tls/${domain}.key", + "ocspStapling": 3600, + "usage":"encipherment" + } + ] + } + } + } + ] } - ] - } - } - } - ] - } EOF fi @@ -5936,7 +5948,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.7.22_reality_beta" + echoContent green "当前版本:v2.7.23_reality_beta" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus