docs: add readme and example of template.json
This commit is contained in:
322
config/template.json
Normal file
322
config/template.json
Normal file
@ -0,0 +1,322 @@
|
||||
{
|
||||
"log": {
|
||||
"level": "error",
|
||||
"timestamp": true
|
||||
},
|
||||
"dns": {
|
||||
"cache_capacity": 16384,
|
||||
"servers": [
|
||||
{
|
||||
"tag": "dns-remote",
|
||||
"address": "tls://208.67.222.222",
|
||||
"client_subnet": "{{ ansible_host }}"
|
||||
},
|
||||
{
|
||||
"tag": "dns-local",
|
||||
"address": "195.208.4.1"
|
||||
},
|
||||
{
|
||||
"tag": "dns-block",
|
||||
"address": "rcode://success"
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"rule_set": [
|
||||
"category-ads-all",
|
||||
"adobe"
|
||||
],
|
||||
"server": "dns-block",
|
||||
"disable_cache": true
|
||||
},
|
||||
{
|
||||
"domain_suffix": [
|
||||
"habr.com"
|
||||
],
|
||||
"rule_set": [
|
||||
"telegram",
|
||||
"google"
|
||||
],
|
||||
"server": "dns-remote"
|
||||
},
|
||||
{
|
||||
"domain_suffix": [
|
||||
".ru",
|
||||
".su",
|
||||
".ru.com",
|
||||
".ru.net",
|
||||
"{{ marzban_domain }}",
|
||||
"wikipedia.org"
|
||||
],
|
||||
"domain_keyword": [
|
||||
"xn--",
|
||||
"ozon",
|
||||
"wildberries",
|
||||
"aliexpress"
|
||||
],
|
||||
"rule_set": [
|
||||
"gov-ru",
|
||||
"yandex",
|
||||
"vk",
|
||||
"mailru",
|
||||
"duckduckgo",
|
||||
"mozilla",
|
||||
"category-android-app-download",
|
||||
"gitlab",
|
||||
"debian",
|
||||
"canonical",
|
||||
"torrent-clients"
|
||||
],
|
||||
"server": "dns-local"
|
||||
},
|
||||
{
|
||||
"process_name": [
|
||||
"qbittorrent.exe",
|
||||
"thunderbird.exe",
|
||||
"Obsidian.exe",
|
||||
"javaw.exe"
|
||||
],
|
||||
"server": "dns-local"
|
||||
},
|
||||
{
|
||||
"inbound": [
|
||||
"tun-in"
|
||||
],
|
||||
"server": "dns-remote"
|
||||
}
|
||||
],
|
||||
"final": "dns-local"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "tun",
|
||||
"tag": "tun-in",
|
||||
"interface_name": "tun0",
|
||||
"stack": "system",
|
||||
"address": "172.19.0.1/28",
|
||||
"auto_route": true,
|
||||
"strict_route": true,
|
||||
"sniff_override_destination": true
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "direct",
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "selector",
|
||||
"tag": "proxy",
|
||||
"outbounds": null
|
||||
},
|
||||
{
|
||||
"type": "urltest",
|
||||
"tag": "Fastest",
|
||||
"outbounds": null,
|
||||
"url": "https://www.gstatic.com/generate_204",
|
||||
"interval": "15m0s"
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"rules": [
|
||||
{
|
||||
"action": "sniff"
|
||||
},
|
||||
{
|
||||
"protocol": "dns",
|
||||
"action": "hijack-dns"
|
||||
},
|
||||
{
|
||||
"ip_is_private": true,
|
||||
"outbound": "direct"
|
||||
},
|
||||
{
|
||||
"rule_set": [
|
||||
"category-ads-all",
|
||||
"adobe"
|
||||
],
|
||||
"action": "reject",
|
||||
"method": "drop"
|
||||
},
|
||||
{
|
||||
"domain_suffix": [
|
||||
"habr.com"
|
||||
],
|
||||
"rule_set": [
|
||||
"telegram",
|
||||
"google"
|
||||
],
|
||||
"outbound": "proxy"
|
||||
},
|
||||
{
|
||||
"domain_suffix": [
|
||||
".ru",
|
||||
".su",
|
||||
".ru.com",
|
||||
".ru.net",
|
||||
"{{ marzban_domain }}",
|
||||
"wikipedia.org"
|
||||
],
|
||||
"domain_keyword": [
|
||||
"xn--",
|
||||
"ozon",
|
||||
"wildberries",
|
||||
"aliexpress"
|
||||
],
|
||||
"ip_cidr": [
|
||||
"{{ ansible_host }}"
|
||||
],
|
||||
"rule_set": [
|
||||
"gov-ru",
|
||||
"yandex",
|
||||
"vk",
|
||||
"mailru",
|
||||
"duckduckgo",
|
||||
"mozilla",
|
||||
"category-android-app-download",
|
||||
"gitlab",
|
||||
"debian",
|
||||
"canonical",
|
||||
"torrent-clients"
|
||||
],
|
||||
"outbound": "direct"
|
||||
},
|
||||
{
|
||||
"action": "resolve",
|
||||
"strategy": "prefer_ipv4"
|
||||
},
|
||||
{
|
||||
"rule_set": [
|
||||
"geoip-ru"
|
||||
],
|
||||
"outbound": "direct"
|
||||
},
|
||||
{
|
||||
"process_name": [
|
||||
"qbittorrent.exe",
|
||||
"thunderbird.exe",
|
||||
"Obsidian.exe",
|
||||
"javaw.exe"
|
||||
],
|
||||
"outbound": "direct"
|
||||
},
|
||||
{
|
||||
"domain_suffix": [
|
||||
"deb.home.net"
|
||||
],
|
||||
"outbound": "direct"
|
||||
},
|
||||
{
|
||||
"inbound": [
|
||||
"tun-in"
|
||||
],
|
||||
"outbound": "proxy"
|
||||
}
|
||||
],
|
||||
"rule_set": [
|
||||
{
|
||||
"tag": "torrent-clients",
|
||||
"type": "remote",
|
||||
"format": "source",
|
||||
"url": "https://raw.githubusercontent.com/FPPweb3/sb-rule-sets/main/torrent-clients.json"
|
||||
},
|
||||
{
|
||||
"tag": "geoip-ru",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geoip/raw/rule-set/geoip-ru.srs"
|
||||
},
|
||||
{
|
||||
"tag": "gov-ru",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-category-gov-ru.srs"
|
||||
},
|
||||
{
|
||||
"tag": "yandex",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-yandex.srs"
|
||||
},
|
||||
{
|
||||
"tag": "google",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-google.srs"
|
||||
},
|
||||
{
|
||||
"tag": "telegram",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-telegram.srs"
|
||||
},
|
||||
{
|
||||
"tag": "vk",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-vk.srs"
|
||||
},
|
||||
{
|
||||
"tag": "mailru",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-mailru.srs"
|
||||
},
|
||||
{
|
||||
"tag": "duckduckgo",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-duckduckgo.srs"
|
||||
},
|
||||
{
|
||||
"tag": "mozilla",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-mozilla.srs"
|
||||
},
|
||||
{
|
||||
"tag": "category-android-app-download",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-category-android-app-download.srs"
|
||||
},
|
||||
{
|
||||
"tag": "adobe",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-adobe.srs"
|
||||
},
|
||||
{
|
||||
"tag": "gitlab",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-gitlab.srs"
|
||||
},
|
||||
{
|
||||
"tag": "debian",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-debian.srs"
|
||||
},
|
||||
{
|
||||
"tag": "canonical",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-canonical.srs"
|
||||
},
|
||||
{
|
||||
"tag": "category-ads-all",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://github.com/SagerNet/sing-geosite/raw/rule-set/geosite-category-ads-all.srs"
|
||||
}
|
||||
],
|
||||
"auto_detect_interface": true,
|
||||
"override_android_vpn": true
|
||||
},
|
||||
"experimental": {
|
||||
"cache_file": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user