fix(脚本): 修改端口不显示问题,修改reality获取IPv6的情况
parent
d105628e30
commit
f82d13af70
24
install.sh
24
install.sh
|
@ -421,7 +421,12 @@ allowPort() {
|
||||||
}
|
}
|
||||||
# 获取公网IP
|
# 获取公网IP
|
||||||
getPublicIP() {
|
getPublicIP() {
|
||||||
curl -s http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | awk -F "[=]" '{print $2}'
|
local currentIP=
|
||||||
|
currentIP=$(curl -s -4 http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | awk -F "[=]" '{print $2}')
|
||||||
|
if [[ -z "${currentIP}" ]]; then
|
||||||
|
currentIP=$(curl -s -6 http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | awk -F "[=]" '{print $2}')
|
||||||
|
fi
|
||||||
|
echo "${currentIP}"
|
||||||
}
|
}
|
||||||
# 检查80、443端口占用情况
|
# 检查80、443端口占用情况
|
||||||
checkPortUsedStatus() {
|
checkPortUsedStatus() {
|
||||||
|
@ -521,6 +526,13 @@ readConfigHostPathUUID() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${configPath}" ]]; then
|
||||||
|
if [[ -z "${realityStatus}" ]]; then
|
||||||
|
currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}${frontingType}.json)
|
||||||
|
currentClients=$(jq -r .inbounds[0].settings.clients ${configPath}${frontingType}.json)
|
||||||
|
else
|
||||||
local defaultPortFile=
|
local defaultPortFile=
|
||||||
defaultPortFile=$(find ${configPath}* | grep "default")
|
defaultPortFile=$(find ${configPath}* | grep "default")
|
||||||
|
|
||||||
|
@ -529,14 +541,6 @@ readConfigHostPathUUID() {
|
||||||
else
|
else
|
||||||
currentDefaultPort=$(jq -r .inbounds[0].port ${configPath}${frontingType}.json)
|
currentDefaultPort=$(jq -r .inbounds[0].port ${configPath}${frontingType}.json)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${configPath}" ]]; then
|
|
||||||
if [[ -z "${realityStatus}" ]]; then
|
|
||||||
currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}${frontingType}.json)
|
|
||||||
currentClients=$(jq -r .inbounds[0].settings.clients ${configPath}${frontingType}.json)
|
|
||||||
else
|
|
||||||
currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}07_VLESS_vision_reality_inbounds.json)
|
currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}07_VLESS_vision_reality_inbounds.json)
|
||||||
currentClients=$(jq -r .inbounds[0].settings.clients ${configPath}07_VLESS_vision_reality_inbounds.json)
|
currentClients=$(jq -r .inbounds[0].settings.clients ${configPath}07_VLESS_vision_reality_inbounds.json)
|
||||||
fi
|
fi
|
||||||
|
@ -5930,7 +5934,7 @@ menu() {
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v2.7.19_reality_beta"
|
echoContent green "当前版本:v2.7.20_reality_beta"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|
Loading…
Reference in New Issue