mirror of
https://github.com/EvgenyNerush/easy-xray.git
synced 2025-02-16 15:29:55 +03:00
make more strict rules to block torrents
This commit is contained in:
parent
66d3463f6b
commit
52c35cee6d
2 changed files with 43 additions and 7 deletions
|
@ -87,6 +87,7 @@
|
||||||
],
|
],
|
||||||
// client-side outbound configuration
|
// client-side outbound configuration
|
||||||
"outbounds": [
|
"outbounds": [
|
||||||
|
// fallback, see `routing` section
|
||||||
{
|
{
|
||||||
"tag": "proxy",
|
"tag": "proxy",
|
||||||
"protocol": "vless",
|
"protocol": "vless",
|
||||||
|
@ -134,6 +135,11 @@
|
||||||
"tag": "direct",
|
"tag": "direct",
|
||||||
"protocol": "freedom",
|
"protocol": "freedom",
|
||||||
"settings": {}
|
"settings": {}
|
||||||
|
},
|
||||||
|
// for that should be blocked
|
||||||
|
{
|
||||||
|
"protocol": "blackhole",
|
||||||
|
"tag": "block"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// Forward each inbound connections to corresponding `outboundTag`. If no rules match,
|
// Forward each inbound connections to corresponding `outboundTag`. If no rules match,
|
||||||
|
@ -148,6 +154,25 @@
|
||||||
],
|
],
|
||||||
"outboundTag": "api"
|
"outboundTag": "api"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"protocol": [ "bittorrent" ],
|
||||||
|
"outboundTag": "block"
|
||||||
|
},
|
||||||
|
// block traffic to popular ports of torrent trackers
|
||||||
|
// and to popular ports of torrent clients
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"port": "6969,6881-6889",
|
||||||
|
"outboundTag": "block"
|
||||||
|
},
|
||||||
|
// block traffic from popular ports of torrent clients
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"sourcePort": "6881-6889",
|
||||||
|
"outboundTag": "block"
|
||||||
|
},
|
||||||
|
// guide domestic sites traffic to `direct` outbound
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"domain": [
|
"domain": [
|
||||||
|
@ -179,11 +204,6 @@
|
||||||
"geoip:ir"
|
"geoip:ir"
|
||||||
],
|
],
|
||||||
"outboundTag": "direct"
|
"outboundTag": "direct"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "field",
|
|
||||||
"protocol": [ "bittorrent" ],
|
|
||||||
"outboundTag": "block"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"port": "80",
|
|
||||||
"network": "udp",
|
"network": "udp",
|
||||||
"outboundTag": "block"
|
"outboundTag": "block"
|
||||||
},
|
},
|
||||||
|
@ -61,21 +60,38 @@
|
||||||
"protocol": [ "bittorrent" ],
|
"protocol": [ "bittorrent" ],
|
||||||
"outboundTag": "block"
|
"outboundTag": "block"
|
||||||
},
|
},
|
||||||
|
// block traffic to popular ports of torrent trackers
|
||||||
|
// and to popular ports of torrent clients
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"port": "6969,6881-6889",
|
||||||
|
"outboundTag": "block"
|
||||||
|
},
|
||||||
|
// block traffic from popular ports of torrent clients
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"sourcePort": "6881-6889",
|
||||||
|
"outboundTag": "block"
|
||||||
|
},
|
||||||
// block domestic client traffic if it's coming somehow (e.g. wrong client config)
|
// block domestic client traffic if it's coming somehow (e.g. wrong client config)
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"domain": [
|
"domain": [
|
||||||
"geosite:cn",
|
"geosite:cn",
|
||||||
"domain:cn",
|
"domain:cn",
|
||||||
|
// punycode for national Chinese top-level domains .中国, .中國, .公司, .网络
|
||||||
"domain:xn--fiqs8s",
|
"domain:xn--fiqs8s",
|
||||||
"domain:xn--fiqz9s",
|
"domain:xn--fiqz9s",
|
||||||
"domain:xn--55qx5d",
|
"domain:xn--55qx5d",
|
||||||
"domain:xn--io0a7i",
|
"domain:xn--io0a7i",
|
||||||
"domain:ru",
|
"domain:ru",
|
||||||
|
// punycode for cyrillic Russian top-level domain .рф
|
||||||
"domain:xn--p1ai",
|
"domain:xn--p1ai",
|
||||||
"domain:by",
|
"domain:by",
|
||||||
|
// punycode for national Belorussian top-level domain .бел
|
||||||
"domain:xn--90ais",
|
"domain:xn--90ais",
|
||||||
"domain:ir",
|
"domain:ir",
|
||||||
|
// extra domains that are used by domestic sites, see https://github.com/EvgenyNerush/coherence-grabber/tree/main
|
||||||
"ext:customgeo.dat:coherence-extra"
|
"ext:customgeo.dat:coherence-extra"
|
||||||
],
|
],
|
||||||
"outboundTag": "block"
|
"outboundTag": "block"
|
||||||
|
@ -224,7 +240,7 @@
|
||||||
],
|
],
|
||||||
// server-side outbound configuration
|
// server-side outbound configuration
|
||||||
"outbounds": [
|
"outbounds": [
|
||||||
// direct connection
|
// direct connection; fallback, see `routing` section
|
||||||
{
|
{
|
||||||
"protocol": "freedom",
|
"protocol": "freedom",
|
||||||
"tag": "direct"
|
"tag": "direct"
|
||||||
|
|
Loading…
Add table
Reference in a new issue