feat(脚本): 添加更新geosite、geoip
parent
ec6a56aa4f
commit
9461691c26
24
install.sh
24
install.sh
|
@ -1258,7 +1258,7 @@ customPortFunction() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${currentPort}" && -z "${customPort}" ]] || [[ "${historyCustomPortStatus}" == "n" ]];then
|
if [[ -z "${currentPort}" && -z "${customPort}" ]] || [[ "${historyCustomPortStatus}" == "n" ]]; then
|
||||||
echo
|
echo
|
||||||
echoContent yellow "请输入端口[默认: 443],如自定义端口,只允许使用DNS申请证书[回车使用默认]"
|
echoContent yellow "请输入端口[默认: 443],如自定义端口,只允许使用DNS申请证书[回车使用默认]"
|
||||||
read -r -p "端口:" customPort
|
read -r -p "端口:" customPort
|
||||||
|
@ -1684,6 +1684,7 @@ v2rayVersionManageMenu() {
|
||||||
echoContent yellow "3.关闭v2ray-core"
|
echoContent yellow "3.关闭v2ray-core"
|
||||||
echoContent yellow "4.打开v2ray-core"
|
echoContent yellow "4.打开v2ray-core"
|
||||||
echoContent yellow "5.重启v2ray-core"
|
echoContent yellow "5.重启v2ray-core"
|
||||||
|
echoContent yellow "6.更新geosite、geoip"
|
||||||
echoContent red "=============================================================="
|
echoContent red "=============================================================="
|
||||||
read -r -p "请选择:" selectV2RayType
|
read -r -p "请选择:" selectV2RayType
|
||||||
if [[ "${selectV2RayType}" == "1" ]]; then
|
if [[ "${selectV2RayType}" == "1" ]]; then
|
||||||
|
@ -1710,6 +1711,8 @@ v2rayVersionManageMenu() {
|
||||||
handleV2Ray start
|
handleV2Ray start
|
||||||
elif [[ "${selectV2RayType}" == "5" ]]; then
|
elif [[ "${selectV2RayType}" == "5" ]]; then
|
||||||
reloadCore
|
reloadCore
|
||||||
|
elif [[ "${selectXrayType}" == "6" ]]; then
|
||||||
|
updateGeoSite
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1728,6 +1731,7 @@ xrayVersionManageMenu() {
|
||||||
echoContent yellow "4.关闭Xray-core"
|
echoContent yellow "4.关闭Xray-core"
|
||||||
echoContent yellow "5.打开Xray-core"
|
echoContent yellow "5.打开Xray-core"
|
||||||
echoContent yellow "6.重启Xray-core"
|
echoContent yellow "6.重启Xray-core"
|
||||||
|
echoContent yellow "7.更新geosite、geoip"
|
||||||
echoContent red "=============================================================="
|
echoContent red "=============================================================="
|
||||||
read -r -p "请选择:" selectXrayType
|
read -r -p "请选择:" selectXrayType
|
||||||
if [[ "${selectXrayType}" == "1" ]]; then
|
if [[ "${selectXrayType}" == "1" ]]; then
|
||||||
|
@ -1758,8 +1762,24 @@ xrayVersionManageMenu() {
|
||||||
handleXray start
|
handleXray start
|
||||||
elif [[ "${selectXrayType}" == "6" ]]; then
|
elif [[ "${selectXrayType}" == "6" ]]; then
|
||||||
reloadCore
|
reloadCore
|
||||||
|
elif [[ "${selectXrayType}" == "7" ]]; then
|
||||||
|
updateGeoSite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# 更新 geosite
|
||||||
|
updateGeoSite() {
|
||||||
|
echoContent yellow "\n来源 https://github.com/Loyalsoldier/v2ray-rules-dat"
|
||||||
|
|
||||||
|
version=$(curl -s https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases | jq -r '.[]|.tag_name' | head -1)
|
||||||
|
echoContent skyBlue "------------------------Version-------------------------------"
|
||||||
|
echo "version:${version}"
|
||||||
|
wget -c -q --show-progress -P ${configPath}../ "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/${version}/geosite.data"
|
||||||
|
wget -c -q --show-progress -P ${configPath}../ "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/${version}/geoip.data"
|
||||||
|
reloadCore
|
||||||
|
echoContent green " ---> 更新完毕"
|
||||||
|
|
||||||
}
|
}
|
||||||
# 更新V2Ray
|
# 更新V2Ray
|
||||||
updateV2Ray() {
|
updateV2Ray() {
|
||||||
|
@ -5415,7 +5435,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.6.18"
|
echoContent green "当前版本:v2.6.19"
|
||||||
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