revert
This commit is contained in:
+5
-122
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
WARP_CONF="/etc/sing-box-warp/warp.conf"
|
WARP_CONF="/app/warp.conf"
|
||||||
OUTPUT_CONFIG="/opt/sing-box-warp/config.json"
|
OUTPUT_CONFIG="/app/config.json"
|
||||||
|
|
||||||
urldecode() {
|
urldecode() {
|
||||||
echo "$1" | sed 's/%3[dD]/=/g; s/%2[bB]/+/g; s/%2[fF]/\//g; s/%2[cC]/,/g'
|
echo "$1" | sed 's/%3[dD]/=/g; s/%2[bB]/+/g; s/%2[fF]/\//g; s/%2[cC]/,/g'
|
||||||
@@ -264,15 +264,6 @@ $I2_LINE
|
|||||||
"type": "mixed",
|
"type": "mixed",
|
||||||
"tag": "mixed-in",
|
"tag": "mixed-in",
|
||||||
"listen_port": 2080
|
"listen_port": 2080
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "tun",
|
|
||||||
"tag": "tun-in",
|
|
||||||
"interface_name": "sing0",
|
|
||||||
"address": "172.19.0.1/30",
|
|
||||||
"mtu": 1500,
|
|
||||||
"auto_route": true,
|
|
||||||
"stack": "system"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outbounds": [
|
"outbounds": [
|
||||||
@@ -282,117 +273,9 @@ $I2_LINE
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"route": {
|
"route": {
|
||||||
"rule_set": [
|
"final": "$TAG",
|
||||||
{
|
"default_domain_resolver": "default",
|
||||||
"tag": "antifilter_allyouneed",
|
"auto_detect_interface": true
|
||||||
"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": "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": "cloudfront_ip_MetaCubeX",
|
|
||||||
"type": "local",
|
|
||||||
"format": "binary",
|
|
||||||
"path": "/opt/sing-box-warp/rules/cloudfront_ip_MetaCubeX.srs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"tag": "telegram_MetaCubeX",
|
|
||||||
"type": "local",
|
|
||||||
"format": "binary",
|
|
||||||
"path": "/opt/sing-box-warp/rules/telegram_MetaCubeX.srs"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"ip_cidr": [
|
|
||||||
"51.38.122.1",
|
|
||||||
"5.28.195.0/24",
|
|
||||||
"185.76.151.0/24",
|
|
||||||
"91.105.0.0/16",
|
|
||||||
"91.108.4.0/22",
|
|
||||||
"91.108.8.0/21",
|
|
||||||
"91.108.12.0/22",
|
|
||||||
"91.108.16.0/21",
|
|
||||||
"91.108.20.0/22",
|
|
||||||
"91.108.56.0/22",
|
|
||||||
"95.161.64.0/20",
|
|
||||||
"149.154.0.0/16",
|
|
||||||
"185.76.151.0/24",
|
|
||||||
"185.76.151.0/24",
|
|
||||||
"5.28.195.0/24",
|
|
||||||
"142.252.0.0/16",
|
|
||||||
"173.239.0.0/16",
|
|
||||||
"173.194.0.0/16",
|
|
||||||
"194.221.61.0/24",
|
|
||||||
"45.142.38.0/24",
|
|
||||||
"209.85.0.0/16",
|
|
||||||
"216.239.0.0/16"
|
|
||||||
],
|
|
||||||
"outbound": "$TAG"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"inbound": "mixed-in",
|
|
||||||
"outbound": "$TAG"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rule_set": [
|
|
||||||
"antifilter_allyouneed",
|
|
||||||
"antizapret",
|
|
||||||
"github_ip_you-oops-dev",
|
|
||||||
"github_karingx",
|
|
||||||
"cloudfront_ip_MetaCubeX",
|
|
||||||
"telegram_MetaCubeX"
|
|
||||||
],
|
|
||||||
"outbound": "$TAG"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rule_set": [
|
|
||||||
"antifilter_allyouneed",
|
|
||||||
"antizapret",
|
|
||||||
"github_ip_you-oops-dev",
|
|
||||||
"github_karingx",
|
|
||||||
"cloudfront_ip_MetaCubeX",
|
|
||||||
"telegram_MetaCubeX"
|
|
||||||
],
|
|
||||||
"outbound": "$TAG"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"domain_suffix": [
|
|
||||||
"myip.wtf",
|
|
||||||
"ip.sb",
|
|
||||||
"ipify.org",
|
|
||||||
"myip.la",
|
|
||||||
"ipleak.net",
|
|
||||||
"1e100.net",
|
|
||||||
"browserleaks.com",
|
|
||||||
"2ip.io",
|
|
||||||
"2ipcore.com",
|
|
||||||
"ipecho.net"
|
|
||||||
],
|
|
||||||
"outbound": "$TAG"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"final": "direct",
|
|
||||||
"auto_detect_interface": true,
|
|
||||||
"default_domain_resolver": "default"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -415,6 +415,7 @@ echo "Configuring sysctl parameters..."
|
|||||||
cat > /etc/sysctl.d/99-sing-box-warp.conf <<EOF
|
cat > /etc/sysctl.d/99-sing-box-warp.conf <<EOF
|
||||||
net.ipv4.conf.all.src_valid_mark=1
|
net.ipv4.conf.all.src_valid_mark=1
|
||||||
net.ipv6.conf.all.disable_ipv6=0
|
net.ipv6.conf.all.disable_ipv6=0
|
||||||
|
net.ipv4.ip_forward=1
|
||||||
EOF
|
EOF
|
||||||
sysctl -p /etc/sysctl.d/99-sing-box-warp.conf
|
sysctl -p /etc/sysctl.d/99-sing-box-warp.conf
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user