cleaned up root, + added fwd functions for excluding/blocking

This commit is contained in:
2025-02-02 22:56:59 +05:00
parent a9f869a9c0
commit 381c5c1442
17 changed files with 194 additions and 107 deletions

View File

@@ -0,0 +1,9 @@
{
"log":
{
"access": "/etc/xray/log/access.log",
"dnsLog": false,
"error": "/etc/xray/log/error.log",
"loglevel": "none"
}
}

View File

@@ -0,0 +1,24 @@
{
"transport":
{
"domainStrategy": "IPIfNonMatch",
"grpcSettings":
{
"health_check_timeout": 20,
"idle_timeout": 60,
"initial_windows_size": 35536,
"permit_without_stream": true
},
"httpSettings":
{
"health_check_timeout": 15,
"read_idle_timeout": 10
},
"sockopt":
{
"tcpFastOpen": true,
"tcpMptcp": true,
"tcpNoDelay": true
}
}
}

View File

@@ -0,0 +1,33 @@
{
"inbounds":
[
{
"port": 61219,
"protocol": "dokodemo-door",
"settings":
{
"followRedirect": true,
"network": "tcp,udp"
},
"sniffing":
{
"destOverride":
[
"http",
"tls",
"quic"
],
"enabled": true,
"routeOnly": true
},
"streamSettings":
{
"sockopt":
{
"tproxy": "tproxy"
}
},
"tag": "tproxy"
}
]
}

View File

@@ -0,0 +1,60 @@
{
"outbounds":
[
{
"protocol": "vless",
"settings":
{
"vnext":
[
{
"address": "1.1.1.1",
"port": 443,
"users":
[
{
"encryption": "none",
"flow": "xtls-rprx-vision",
"id": "00000000-0000-0000-0000-000000000000",
"level": 0
}
]
}
]
},
"streamSettings":
{
"network": "tcp",
"realitySettings":
{
"fingerprint": "chrome",
"publicKey": "",
"serverName": "",
"shortId": "",
"spiderX": "/"
},
"security": "reality"
},
"tag": "vless-reality"
},
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"settings":
{
"response":
{
"type": "http"
}
},
"tag": "block"
},
{
"protocol": "dns",
"tag": "dns"
}
]
}

View File

@@ -0,0 +1,99 @@
{
"routing": {
"rules": [
// Capture DNS
{
"inboundTag": ["redirect", "tproxy"],
"outboundTag": "dns",
"type": "field",
"port": 53
},
// Block QUIC
{
"inboundTag": ["redirect", "tproxy"],
"outboundTag": "block",
"type": "field",
"protocol": ["quic"]
},
// Force specific source IPs to go direct
{
"inboundTag": ["redirect", "tproxy"],
"outboundTag": "direct",
"type": "field",
"source": [
"192.168.2.255",
"192.168.2.254"
]
},
// Block common ads and other stuff
{
"inboundTag": ["redirect", "tproxy"],
"outboundTag": "block",
"type": "field",
"domain": [
"geosite:category-ads-all",
"google-analytics",
"analytics.yandex",
"appcenter.ms",
"app-measurement.com",
"firebase.io",
"crashlytics.com"
]
},
// Force BitTorrent to go through direct
{
"inboundTag": ["redirect", "tproxy"],
"outboundTag": "direct",
"type": "field",
"protocol": ["bittorrent"]
},
// Explicitly force direct
{
"inboundTag": ["redirect", "tproxy"],
"outboundTag": "direct",
"type": "field",
"domain": [
"regexp:^([\\w\\-\\.]+\\.)ru$", // .ru
"regexp:^([\\w\\-\\.]+\\.)su$", // .su
"regexp:^([\\w\\-\\.]+\\.)xn--p1ai$", // .рф
"regexp:^([\\w\\-\\.]+\\.)xn--p1acf$", // .рус
"regexp:^([\\w\\-\\.]+\\.)xn--80asehdb$", // .онлайн
"regexp:^([\\w\\-\\.]+\\.)xn--c1avg$", // .орг
"regexp:^([\\w\\-\\.]+\\.)xn--80aswg$", // .сайт
"regexp:^([\\w\\-\\.]+\\.)xn--80adxhks$", // .москва
"regexp:^([\\w\\-\\.]+\\.)moscow$", // .moscow
"regexp:^([\\w\\-\\.]+\\.)xn--d1acj3b$", // .дети
"regexp:^([\\w\\-\\.]+\\.)yandex$", // .yandex
"geosite:category-ru",
"geosite:category-gov-ru",
"geosite:yandex",
"geosite:steam",
"geosite:vk",
"geosite:category-gov-ru",
"regexp:^assets(\\d*?)\\.xboxlive\\.com$",
"domain:rt.ru",
"domain:ngenix.net",
"domain:plex.tv",
"geoip:ru",
"domain:kaspersky.com",
"domain:koronapay.com",
"domain:binance.com",
"domain:raiffeisen.ru",
"geosite:xiaomi",
"geosite:mihoyo",
"domain:xsolla.com",
"domain:download.developer.apple.com",
// "domain:aeza.net",
"domain:veesp.com"
]
},
// No rules found? Go vless-reality
{
"inboundTag": ["redirect", "tproxy"],
"outboundTag": "vless-reality",
"type": "field"
}
]
}
}

View File

@@ -0,0 +1,13 @@
{
"policy":
{
"levels":
{
"0":
{
// If you have issues with SSH connections, it's recommended to increase this value. See the docs
"connIdle": 30
}
}
}
}