From 507053165f902b7b19139a2c08075735fcef638b Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Dec 2020 15:12:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=BA=E6=9C=BA=E9=AA=8C=E8=AF=81=E5=8D=B8=E8=BD=BD=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index c46ac78..78041e2 100644 --- a/install.sh +++ b/install.sh @@ -2707,8 +2707,14 @@ ipv6HumanVerification(){ fi checkIPv6 - - cat << EOF > ${configPath}09_routing.json + echoContent skyBlue "\n功能 1/${totalProgress} : ipv6人机验证" + echoContent red "\n==============================================================" + echoContent yellow "1.添加" + echoContent yellow "2.卸载" + read -p "请选择:" ipv6Status + if [[ "${ipv6Status}" = "1" ]] + then + cat << EOF > ${configPath}09_routing.json { "routing":{ "domainStrategy": "IPOnDemand", @@ -2733,8 +2739,7 @@ ipv6HumanVerification(){ } EOF -# cat << EOF > ${configPath}10_ipv6_outbounds.json - cat << EOF > ${configPath}10_ipv4_outbounds.json + cat << EOF > ${configPath}10_ipv4_outbounds.json { "outbounds": [ { @@ -2754,7 +2759,47 @@ EOF ] } EOF - echoContent green " ---> 人机验证修改成功" + echoContent green " ---> 人机验证修改成功" + + elif [[ "${ipv6Status}" = "2" ]] + then + cat << EOF > ${configPath}09_routing.json +{ + "routing":{ + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "protocol": [ + "bittorrent" + ], + "outboundTag": "blocked" + } + ] + } +} +EOF + + cat << EOF > ${configPath}10_ipv4_outbounds.json +{ + "outbounds": [ + { + "protocol": "freedom", + "settings": { + "domainStrategy": "UseIPv4" + }, + "tag": "IPv4-out" + } + ] +} +EOF + echoContent green " ---> 人机验证卸载成功" + else + echoContent red " ---> 选择错误" + ipv6HumanVerification + exit + fi + handleXray stop handleXray start } @@ -3043,7 +3088,7 @@ menu(){ cd echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.2.8" + echoContent green "当前版本:v2.2.9" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:七合一共存脚本" echoContent red "=============================================================="