make tun var and fixes
This commit is contained in:
+69
-59
@@ -275,11 +275,76 @@ TUNEOF
|
||||
]
|
||||
}
|
||||
RULEEOF
|
||||
)
|
||||
RULE_SET_RULE_PART=$(cat <<'RULEEOF'
|
||||
,
|
||||
{
|
||||
"rule_set": [
|
||||
"antifilter_allyouneed",
|
||||
"antizapret",
|
||||
"cloudfront_ip_MetaCubeX",
|
||||
"github_ip_you-oops-dev",
|
||||
"github_karingx",
|
||||
"telegram_MetaCubeX",
|
||||
"refilter_ipsum"
|
||||
],
|
||||
"outbound": "wireguard-out"
|
||||
}
|
||||
RULEEOF
|
||||
)
|
||||
ROUTE_RULE_SET_SECTION=$(cat <<'DEFSEOF'
|
||||
"rule_set": [
|
||||
{
|
||||
"tag": "antifilter_allyouneed",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/antifilter_allyouneed.srs"
|
||||
},
|
||||
{
|
||||
"tag": "antizapret",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/antizapret.srs"
|
||||
},
|
||||
{
|
||||
"tag": "cloudfront_ip_MetaCubeX",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/cloudfront_ip_MetaCubeX.srs"
|
||||
},
|
||||
{
|
||||
"tag": "github_ip_you-oops-dev",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/github_ip_you-oops-dev.srs"
|
||||
},
|
||||
{
|
||||
"tag": "github_karingx",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/github_karingx.srs"
|
||||
},
|
||||
{
|
||||
"tag": "telegram_MetaCubeX",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/telegram_MetaCubeX.srs"
|
||||
},
|
||||
{
|
||||
"tag": "refilter_ipsum",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/refilter_ipsum.srs"
|
||||
}
|
||||
],
|
||||
DEFSEOF
|
||||
)
|
||||
else
|
||||
echo "TUN disabled (SOCKS5 only)" >&2
|
||||
TUN_INBOUND_PART=""
|
||||
TUN_ROUTE_RULE_PART=""
|
||||
RULE_SET_RULE_PART=""
|
||||
ROUTE_RULE_SET_SECTION=""
|
||||
fi
|
||||
|
||||
if [ -n "$I1" ] || [ -n "$I2" ]; then
|
||||
@@ -383,10 +448,10 @@ $I2_LINE
|
||||
"ip_is_private": true,
|
||||
"outbound": "direct"
|
||||
},
|
||||
{
|
||||
{
|
||||
"inbound": "mixed-in",
|
||||
"outbound": "wireguard-out"
|
||||
}
|
||||
},
|
||||
{
|
||||
"protocol": "dns",
|
||||
"action": "hijack-dns"
|
||||
@@ -407,64 +472,9 @@ $I2_LINE
|
||||
"ip.sb"
|
||||
],
|
||||
"outbound": "wireguard-out"
|
||||
},
|
||||
{
|
||||
"rule_set": [
|
||||
"antifilter_allyouneed",
|
||||
"antizapret",
|
||||
"cloudfront_ip_MetaCubeX",
|
||||
"github_ip_you-oops-dev",
|
||||
"github_karingx",
|
||||
"telegram_MetaCubeX",
|
||||
"refilter_ipsum"
|
||||
],
|
||||
"outbound": "wireguard-out"
|
||||
}
|
||||
],
|
||||
"rule_set": [
|
||||
{
|
||||
"tag": "antifilter_allyouneed",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/antifilter_allyouneed.srs"
|
||||
},
|
||||
{
|
||||
"tag": "antizapret",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/antizapret.srs"
|
||||
},
|
||||
{
|
||||
"tag": "cloudfront_ip_MetaCubeX",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/cloudfront_ip_MetaCubeX.srs"
|
||||
},
|
||||
{
|
||||
"tag": "github_ip_you-oops-dev",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/github_ip_you-oops-dev.srs"
|
||||
},
|
||||
{
|
||||
"tag": "github_karingx",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/github_karingx.srs"
|
||||
},
|
||||
{
|
||||
"tag": "telegram_MetaCubeX",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/telegram_MetaCubeX.srs"
|
||||
},
|
||||
{
|
||||
"tag": "refilter_ipsum",
|
||||
"type": "local",
|
||||
"format": "binary",
|
||||
"path": "/opt/sing-box-warp/rules/refilter_ipsum.srs"
|
||||
}
|
||||
}$RULE_SET_RULE_PART
|
||||
],
|
||||
$ROUTE_RULE_SET_SECTION
|
||||
"final": "direct",
|
||||
"default_domain_resolver": "default",
|
||||
"auto_detect_interface": true
|
||||
|
||||
Reference in New Issue
Block a user