Skip to content

Commit

Permalink
use homemade rule sets for sing-box
Browse files Browse the repository at this point in the history
  • Loading branch information
aleskxyz authored Aug 10, 2024
1 parent cb6c82e commit 12c0e20
Showing 1 changed file with 45 additions and 35 deletions.
80 changes: 45 additions & 35 deletions reality-ezpz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1147,38 +1147,51 @@ function generate_engine_config {
],
"route": {
"final": "$([[ ${config[warp]} == ON ]] && echo "warp" || echo "internet")",
"rules": [
"rule_set": [
{
"geoip": [
$([[ ${config[warp]} == OFF ]] && echo '"cn", "ir",')
"private"
],
"outbound": "block"
"tag": "block",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/aleskxyz/sing-box-rules@rule-set/block.srs",
"download_detour": "internet"
},
{
"geosite": [
$([[ ${config[safenet]} == ON ]] && echo '"category-porn",' || true)
"category-ads-all"
],
"outbound": "block"
"tag": "nsfw",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/aleskxyz/sing-box-rules@rule-set/geosite-nsfw.srs",
"download_detour": "internet"
},
{
"ip_cidr": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
"tag": "geoip-private",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/aleskxyz/sing-box-rules@rule-set/geoip-private.srs",
"download_detour": "internet"
},
{
"tag": "geosite-private",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/aleskxyz/sing-box-rules@rule-set/geosite-private.srs",
"download_detour": "internet"
},
{
"tag": "bypass",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/aleskxyz/sing-box-rules@rule-set/bypass.srs",
"download_detour": "internet"
}
],
"rules": [
{
"rule_set": [
"block",
"geoip-private",
"geosite-private"
$([[ ${config[safenet]} == ON ]] && echo ',"nsfw"' || true)
$([[ ${config[warp]} == OFF ]] && echo ',"bypass"')
],
"outbound": "block"
},
Expand All @@ -1191,16 +1204,13 @@ function generate_engine_config {
2525
],
"outbound": "block"
},
{
"domain": [
"pushnotificationws.com",
"sunlight-leds.com",
"icecyber.org"
],
"outbound": "block"
}
]
},
"experimental": {
"cache_file": {
"enabled": true
}
}
}
EOF
Expand Down

0 comments on commit 12c0e20

Please sign in to comment.