From dfd5edcbc1b6e736fb4b67dfd8fe455b729d472f Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:38:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=AD=98=E5=9C=A8=E9=A3=8E=E9=99=A9=E7=9A=84?= =?UTF-8?q?reality=E5=9F=9F=E5=90=8D=E3=80=81=E4=BF=AE=E6=94=B9reality?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=B4=A6=E5=8F=B7=E6=97=B6=E4=BC=98=E5=85=88?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=9F=9F=E5=90=8D=E4=BB=A5=E5=BA=94=E5=AF=B9?= =?UTF-8?q?=E5=8F=8C=E6=A0=88vps=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 539f09c..56e89ec 100644 --- a/install.sh +++ b/install.sh @@ -503,12 +503,17 @@ getPublicIP() { if [[ -n "$1" ]]; then type=$1 fi - local currentIP= - currentIP=$(curl -s "-${type}" http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | awk -F "[=]" '{print $2}') - if [[ -z "${currentIP}" && -z "$1" ]]; then - currentIP=$(curl -s "-6" http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | awk -F "[=]" '{print $2}') + if [[ "${currentRealityServerNames}" == "${currentHost}" ]]; then + echo "${currentHost}" + else + local currentIP= + currentIP=$(curl -s "-${type}" http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | awk -F "[=]" '{print $2}') + if [[ -z "${currentIP}" && -z "$1" ]]; then + currentIP=$(curl -s "-6" http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | awk -F "[=]" '{print $2}') + fi + echo "${currentIP}" fi - echo "${currentIP}" + } # 输出ufw端口开放状态 @@ -7619,7 +7624,7 @@ initRealityDest() { realityDestDomain=${domain}:${port} else local realityDestDomainList= - realityDestDomainList="gateway.icloud.com,itunes.apple.com,download-installer.cdn.mozilla.net,addons.mozilla.org,www.lovelive-anime.jp,swdist.apple.com,swcdn.apple.com,updates.cdn-apple.com,mensura.cdn-apple.com,osxapps.itunes.apple.com,aod.itunes.apple.com,s0.awsstatic.com,d1.awsstatic.com,images-na.ssl-images-amazon.com,m.media-amazon.com,player.live-video.net,www.yahoo.com,one-piece.com,www.marvel.com,lol.secure.dyn.riotcdn.net,addons.mozilla.org,gateway.icloud.com,itunes.apple.com,download-installer.cdn.mozilla.net,addons.mozilla.org,www.lovelive-anime.jp,swdist.apple.com,swcdn.apple.com,updates.cdn-apple.com,mensura.cdn-apple.com,osxapps.itunes.apple.com,aod.itunes.apple.com,s0.awsstatic.com,d1.awsstatic.com,images-na.ssl-images-amazon.com,m.media-amazon.com,player.live-video.net" + realityDestDomainList="gateway.icloud.com,itunes.apple.com,download-installer.cdn.mozilla.net,addons.mozilla.org,www.lovelive-anime.jp,swdist.apple.com,swcdn.apple.com,updates.cdn-apple.com,mensura.cdn-apple.com,osxapps.itunes.apple.com,aod.itunes.apple.com,s0.awsstatic.com,d1.awsstatic.com,images-na.ssl-images-amazon.com,m.media-amazon.com,player.live-video.net,www.yahoo.com,one-piece.com,lol.secure.dyn.riotcdn.net,addons.mozilla.org,gateway.icloud.com,itunes.apple.com,download-installer.cdn.mozilla.net,addons.mozilla.org,www.lovelive-anime.jp,swdist.apple.com,swcdn.apple.com,updates.cdn-apple.com,mensura.cdn-apple.com,osxapps.itunes.apple.com,aod.itunes.apple.com,s0.awsstatic.com,d1.awsstatic.com,images-na.ssl-images-amazon.com,m.media-amazon.com,player.live-video.net" echoContent skyBlue "\n===== 生成配置回落的域名 例如:[addons.mozilla.org:443] ======\n" echoContent green "回落域名列表:https://www.v2ray-agent.com/archives/1680104902581#heading-8\n" @@ -7892,7 +7897,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.10.9" + echoContent green "当前版本:v2.10.10" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus