feat(脚本): 添加自定义安装时可选装reality
parent
186926339f
commit
368969a6de
66
install.sh
66
install.sh
|
@ -3212,17 +3212,11 @@ EOF
|
||||||
if [[ -n "${customPort}" ]]; then
|
if [[ -n "${customPort}" ]]; then
|
||||||
defaultPort=${customPort}
|
defaultPort=${customPort}
|
||||||
fi
|
fi
|
||||||
if [[ "$1" == "all" ]]; then
|
echoContent skyBlue "\n===================== 配置VLESS+Reality =====================\n"
|
||||||
echoContent skyBlue "\n===================== 配置VLESS+Reality =====================\n"
|
initRealityPort
|
||||||
initRealityPort
|
initRealityDest
|
||||||
local defaultPort=443
|
initRealityClientServersName
|
||||||
if [[ -n "${customPort}" ]]; then
|
initRealityKey
|
||||||
defaultPort=${customPort}
|
|
||||||
fi
|
|
||||||
realityDestDomain=${domain}:${defaultPort}
|
|
||||||
initRealityKey
|
|
||||||
realityServerNames=\"${domain}\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<EOF >/etc/v2ray-agent/xray/conf/07_VLESS_vision_reality_inbounds.json
|
cat <<EOF >/etc/v2ray-agent/xray/conf/07_VLESS_vision_reality_inbounds.json
|
||||||
{
|
{
|
||||||
|
@ -3292,7 +3286,6 @@ EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "${selectCustomInstallType}" | grep -q 0 || [[ "$1" == "all" ]]; then
|
if echo "${selectCustomInstallType}" | grep -q 0 || [[ "$1" == "all" ]]; then
|
||||||
local defaultPort=443
|
local defaultPort=443
|
||||||
if [[ -n "${customPort}" ]]; then
|
if [[ -n "${customPort}" ]]; then
|
||||||
|
@ -5521,18 +5514,25 @@ customV2RayInstall() {
|
||||||
customXrayInstall() {
|
customXrayInstall() {
|
||||||
echoContent skyBlue "\n========================个性化安装============================"
|
echoContent skyBlue "\n========================个性化安装============================"
|
||||||
echoContent yellow "VLESS前置,默认安装0,如果只需要安装0,则只选择0即可"
|
echoContent yellow "VLESS前置,默认安装0,如果只需要安装0,则只选择0即可"
|
||||||
echoContent yellow "0.VLESS+TLS_Vision+TCP"
|
echoContent yellow "0.VLESS+TLS_Vision+TCP[推荐]"
|
||||||
echoContent yellow "1.VLESS+TLS+WS[CDN]"
|
echoContent yellow "1.VLESS+TLS+WS[CDN]"
|
||||||
echoContent yellow "2.Trojan+TLS+gRPC[CDN]"
|
echoContent yellow "2.Trojan+TLS+gRPC[CDN]"
|
||||||
echoContent yellow "3.VMess+TLS+WS[CDN]"
|
echoContent yellow "3.VMess+TLS+WS[CDN]"
|
||||||
echoContent yellow "4.Trojan+TLS"
|
echoContent yellow "4.Trojan+TLS"
|
||||||
echoContent yellow "5.VLESS+TLS+gRPC[CDN]"
|
echoContent yellow "5.VLESS+TLS+gRPC[CDN]"
|
||||||
|
echoContent yellow "7.VLESS+Reality+uTLS+Vision[推荐]"
|
||||||
|
# echoContent yellow "8.VLESS+Reality+gRPC"
|
||||||
read -r -p "请选择[多选],[例如:123]:" selectCustomInstallType
|
read -r -p "请选择[多选],[例如:123]:" selectCustomInstallType
|
||||||
echoContent skyBlue "--------------------------------------------------------------"
|
echoContent skyBlue "--------------------------------------------------------------"
|
||||||
if [[ -z ${selectCustomInstallType} ]]; then
|
if [[ -z ${selectCustomInstallType} ]]; then
|
||||||
echoContent red " ---> 不可为空"
|
echoContent red " ---> 不可为空"
|
||||||
customXrayInstall
|
customXrayInstall
|
||||||
elif [[ "${selectCustomInstallType}" =~ ^[0-5]+$ ]]; then
|
elif [[ "${selectCustomInstallType}" =~ ^[0-7]+$ ]]; then
|
||||||
|
|
||||||
|
if ! echo "${selectCustomInstallType}" | grep -q "0"; then
|
||||||
|
selectCustomInstallType="0${selectCustomInstallType}"
|
||||||
|
fi
|
||||||
|
|
||||||
cleanUp v2rayClean
|
cleanUp v2rayClean
|
||||||
totalProgress=12
|
totalProgress=12
|
||||||
installTools 1
|
installTools 1
|
||||||
|
@ -5571,7 +5571,7 @@ customXrayInstall() {
|
||||||
handleNginx start
|
handleNginx start
|
||||||
|
|
||||||
# 安装V2Ray
|
# 安装V2Ray
|
||||||
installXray 7
|
installXray 7 true
|
||||||
installXrayService 8
|
installXrayService 8
|
||||||
initXrayConfig custom 9
|
initXrayConfig custom 9
|
||||||
cleanUp v2rayDel
|
cleanUp v2rayDel
|
||||||
|
@ -5904,23 +5904,31 @@ initRealityKey() {
|
||||||
}
|
}
|
||||||
# 初始化reality dest
|
# 初始化reality dest
|
||||||
initRealityDest() {
|
initRealityDest() {
|
||||||
echoContent skyBlue "\n===== 生成配置回落的域名 例如:[addons.mozilla.org:443] ======\n"
|
if [[ -n "${domain}" ]]; then
|
||||||
read -r -p "请输入[回车]使用默认:" realityDestDomain
|
realityDestDomain=${domain}:${defaultPort}
|
||||||
if [[ -z "${realityDestDomain}" ]]; then
|
else
|
||||||
realityDestDomain="addons.mozilla.org:443"
|
echoContent skyBlue "\n===== 生成配置回落的域名 例如:[addons.mozilla.org:443] ======\n"
|
||||||
|
read -r -p "请输入[回车]使用默认:" realityDestDomain
|
||||||
|
if [[ -z "${realityDestDomain}" ]]; then
|
||||||
|
realityDestDomain="addons.mozilla.org:443"
|
||||||
|
fi
|
||||||
|
echoContent yellow "\n ---> 回落域名: ${realityDestDomain}"
|
||||||
fi
|
fi
|
||||||
echoContent yellow "\n ---> 回落域名: ${realityDestDomain}"
|
|
||||||
}
|
}
|
||||||
# 初始化客户端可用的ServersName
|
# 初始化客户端可用的ServersName
|
||||||
initRealityClientServersName() {
|
initRealityClientServersName() {
|
||||||
echoContent skyBlue "\n================ 配置客户端可用的serverNames ================\n"
|
if [[ -n "${domain}" ]]; then
|
||||||
echoContent yellow "#注意事项\n"
|
realityServerNames=\"${domain}\"
|
||||||
echoContent yellow "录入示例:addons.mozilla.org\n"
|
|
||||||
read -r -p "请输入[回车]使用默认:" realityServerNames
|
|
||||||
if [[ -z "${realityServerNames}" ]]; then
|
|
||||||
realityServerNames=\"addons.mozilla.org\"
|
|
||||||
else
|
else
|
||||||
realityServerNames=\"${realityServerNames//,/\",\"}\"
|
echoContent skyBlue "\n================ 配置客户端可用的serverNames ================\n"
|
||||||
|
echoContent yellow "#注意事项\n"
|
||||||
|
echoContent yellow "录入示例:addons.mozilla.org\n"
|
||||||
|
read -r -p "请输入[回车]使用默认:" realityServerNames
|
||||||
|
if [[ -z "${realityServerNames}" ]]; then
|
||||||
|
realityServerNames=\"addons.mozilla.org\"
|
||||||
|
else
|
||||||
|
realityServerNames=\"${realityServerNames//,/\",\"}\"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echoContent yellow "\n ---> 客户端可用域名: ${realityServerNames}\n"
|
echoContent yellow "\n ---> 客户端可用域名: ${realityServerNames}\n"
|
||||||
|
@ -5964,7 +5972,7 @@ xrayCoreRealityInstall() {
|
||||||
installXray 3 true
|
installXray 3 true
|
||||||
# 生成 privateKey、配置回落地址、配置serverNames
|
# 生成 privateKey、配置回落地址、配置serverNames
|
||||||
installXrayService 6
|
installXrayService 6
|
||||||
initXrayRealityConfig 5
|
# initXrayRealityConfig 5
|
||||||
# 初始化配置
|
# 初始化配置
|
||||||
initXrayConfig custom 7
|
initXrayConfig custom 7
|
||||||
handleXray stop
|
handleXray stop
|
||||||
|
@ -6058,7 +6066,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.25_reality_beta"
|
echoContent green "当前版本:v2.7.26_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