From a6d329972d75c9a1ca3b559f8de4d0f0a6fc371d Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Tue, 1 Dec 2020 17:05:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E5=B1=8F=E8=94=BDB?= =?UTF-8?q?T?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 114 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b4ab0c6..3aadb32 100644 --- a/install.sh +++ b/install.sh @@ -1651,12 +1651,30 @@ initV2RayConfig(){ } } ], + "routing":{ + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "protocol": [ + "bittorrent" + ], + "outboundTag": "blocked" + } + ] + }, "outbounds": [ { + "tag":"direct", "protocol": "freedom", "settings": { "domainStrategy": "UseIPv4" } + }, + { + "tag": "blocked", + "protocol": "blackhole", + "settings": {} } ], "dns": { @@ -1813,12 +1831,30 @@ EOF } } ], + "routing":{ + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "protocol": [ + "bittorrent" + ], + "outboundTag": "blocked" + } + ] + }, "outbounds": [ { + "tag":"direct", "protocol": "freedom", "settings": { "domainStrategy": "UseIPv4" } + }, + { + "tag": "blocked", + "protocol": "blackhole", + "settings": {} } ], "dns": { @@ -1853,9 +1889,30 @@ EOF "settings": { "domainStrategy": "UseIPv4" } + }, + { + "tag": "blocked", + "protocol": "blackhole", + "settings": {} } ] } +EOF + cat << EOF > /etc/v2ray-agent/v2ray/conf/09_routing.json +{ + "routing":{ + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "protocol": [ + "bittorrent" + ], + "outboundTag": "blocked" + } + ] + } +} EOF # dns cat << EOF > /etc/v2ray-agent/v2ray/conf/11_dns.json @@ -2268,12 +2325,30 @@ initXrayConfig(){ } } ], + "routing":{ + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "protocol": [ + "bittorrent" + ], + "outboundTag": "blocked" + } + ] + }, "outbounds": [ { + "tag":"direct", "protocol": "freedom", "settings": { "domainStrategy": "UseIPv4" } + }, + { + "tag": "blocked", + "protocol": "blackhole", + "settings": {} } ], "dns": { @@ -2299,6 +2374,23 @@ EOF } } EOF + cat << EOF > /etc/v2ray-agent/xray/conf/09_routing.json +{ + "routing":{ + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "protocol": [ + "bittorrent" + ], + "outboundTag": "blocked" + } + ] + } +} +EOF + # outbounds cat << EOF > /etc/v2ray-agent/xray/conf/10_outbounds.json { @@ -2308,9 +2400,30 @@ EOF "settings": { "domainStrategy": "UseIPv4" } + }, + { + "tag": "blocked", + "protocol": "blackhole", + "settings": {} } ] } +EOF + cat << EOF > /etc/v2ray-agent/v2ray/conf/09_routing.json +{ + "routing":{ + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "protocol": [ + "bittorrent" + ], + "outboundTag": "blocked" + } + ] + } +} EOF # dns cat << EOF > /etc/v2ray-agent/xray/conf/11_dns.json @@ -3550,7 +3663,7 @@ menu(){ cd echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.1.17" + echoContent green "当前版本:v2.1.18" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:七合一共存脚本" echoContent red "=============================================================="