modify default templates

This commit is contained in:
nite 2025-02-12 23:19:28 +08:00
parent 273856968a
commit 59ccf8a3c7
16 changed files with 141 additions and 364 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
sing-box merge -C ./templates/windows ./templates/example-windows.json
sing-box merge -C ./templates/linux ./templates/example-linux.json
sing-box merge -C ./templates/android ./templates/example-android.json
sing-box merge -C ./templates/windows ./templates/example-android.json

View File

@ -1,60 +0,0 @@
{
"dns": {
"servers": [
{
"tag": "google",
"address": "https://8.8.8.8/dns-query",
"detour": "default"
},
{
"tag": "local",
"address": "h3://223.5.5.5/dns-query",
"detour": "direct"
},
{
"tag": "refused",
"address": "rcode://refused"
}
],
"rules": [
{
"rule_set": "geosite-category-ads-all",
"server": "refused"
},
{
"outbound": "any",
"server": "local"
},
{
"clash_mode": "Direct",
"server": "local"
},
{
"clash_mode": "Global",
"server": "google"
},
{
"rule_set": "geosite-geolocation-cn",
"server": "local"
},
{
"type": "logical",
"mode": "and",
"rules": [
{
"rule_set": "geosite-geolocation-!cn",
"invert": true
},
{
"rule_set": "geoip-cn"
}
],
"server": "google",
"client_subnet": "114.114.114.114/24"
}
],
"final": "google",
"disable_cache": false,
"disable_expire": false
}
}

View File

@ -1,13 +0,0 @@
{
"experimental": {
"cache_file": {
"enabled": true
},
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "./ui",
"external_ui_download_detour": "default",
"default_mode": "Enhanced"
}
}
}

View File

@ -1,12 +0,0 @@
{
"inbounds": [
{
"type": "tun",
"auto_route": true,
"strict_route": true,
"sniff": true,
"address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"],
"exclude_interface": ["tailscale0"]
}
]
}

View File

@ -1,6 +0,0 @@
{
"log": {
"level": "info",
"timestamp": true
}
}

View File

@ -1,8 +0,0 @@
{
"ntp": {
"enabled": true,
"server": "ntp.aliyun.com",
"server_port": 123,
"interval": "30m"
}
}

View File

@ -1,21 +0,0 @@
{
"outbounds": [
{
"outbounds": ["<all-proxy-tags>", "direct"],
"tag": "default",
"type": "selector"
},
{
"tag": "direct",
"type": "direct"
},
{
"tag": "block",
"type": "block"
},
{
"tag": "dns",
"type": "dns"
}
]
}

View File

@ -1,53 +0,0 @@
{
"route": {
"rules": [
{
"type": "logical",
"mode": "or",
"rules": [
{
"protocol": "dns"
},
{
"port": 53
}
],
"outbound": "dns"
},
{
"ip_is_private": true,
"outbound": "direct"
},
{
"clash_mode": "Direct",
"outbound": "direct"
},
{
"clash_mode": "Global",
"outbound": "default"
},
{
"rule_set": "geosite-google",
"outbound": "default"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
]
}
],
"outbound": "direct"
}
],
"final": "default",
"auto_detect_interface": true
}
}

View File

@ -1,62 +0,0 @@
{
"route": {
"rule_set": [
{
"type": "remote",
"tag": "geosite-category-ads-all",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-geolocation-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-geolocation-!cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geoip-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-category-games@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-games@cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-steam@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-steam@cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-google",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs",
"download_detour": "default"
}
]
}
}

View File

@ -90,30 +90,29 @@
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns"
}
],
"route": {
"rules": [
{
"type": "logical",
"mode": "or",
"rules": [
{
"protocol": "dns"
},
{
"port": 53
}
"action": "resolve",
"strategy": "prefer_ipv4"
},
{
"action": "sniff",
"timeout": "1s"
},
{
"protocol": "dns",
"action": "hijack-dns"
},
{
"port": [
3478,
5348,
5349
],
"outbound": "dns"
"outbound": "direct"
},
{
"ip_is_private": true,
@ -132,18 +131,23 @@
"outbound": "default"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
]
}
"rule_set": "geosite-bahamut",
"outbound": "台湾(TW)"
},
{
"process_path_regex": [
"^.+/steam/compatibilitytools.d/.+",
"^.+/steamapps/common/.*"
],
"outbound": "direct"
},
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
],
"outbound": "direct"
}
@ -216,6 +220,7 @@
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "./ui",
"external_ui_download_url": "https://github.com/Zephyruso/zashboard/releases/latest/download/dist.zip",
"external_ui_download_detour": "default",
"default_mode": "Enhanced"
}

View File

@ -68,15 +68,15 @@
"inbounds": [
{
"type": "tun",
"tag": "tun-in",
"address": [
"172.16.0.1/30",
"192.168.135.1/30",
"fdfe:dcba:9876::1/126"
],
"auto_route": true,
"auto_redirect": true,
"strict_route": true,
"exclude_interface": "tailscale0",
"sniff": true
"route_exclude_address": "100.64.0.0/10"
}
],
"outbounds": [
@ -91,30 +91,29 @@
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns"
}
],
"route": {
"rules": [
{
"type": "logical",
"mode": "or",
"rules": [
{
"protocol": "dns"
},
{
"port": 53
}
"action": "resolve",
"strategy": "prefer_ipv4"
},
{
"action": "sniff",
"timeout": "1s"
},
{
"protocol": "dns",
"action": "hijack-dns"
},
{
"port": [
3478,
5348,
5349
],
"outbound": "dns"
"outbound": "direct"
},
{
"ip_is_private": true,
@ -133,18 +132,23 @@
"outbound": "default"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
]
}
"rule_set": "geosite-bahamut",
"outbound": "台湾(TW)"
},
{
"process_path_regex": [
"^.+/steam/compatibilitytools.d/.+",
"^.+/steamapps/common/.*"
],
"outbound": "direct"
},
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
],
"outbound": "direct"
}
@ -217,6 +221,7 @@
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "./ui",
"external_ui_download_url": "https://github.com/Zephyruso/zashboard/releases/latest/download/dist.zip",
"external_ui_download_detour": "default",
"default_mode": "Enhanced"
}

View File

@ -90,30 +90,29 @@
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns"
}
],
"route": {
"rules": [
{
"type": "logical",
"mode": "or",
"rules": [
{
"protocol": "dns"
},
{
"port": 53
}
"action": "resolve",
"strategy": "prefer_ipv4"
},
{
"action": "sniff",
"timeout": "1s"
},
{
"protocol": "dns",
"action": "hijack-dns"
},
{
"port": [
3478,
5348,
5349
],
"outbound": "dns"
"outbound": "direct"
},
{
"ip_is_private": true,
@ -132,18 +131,23 @@
"outbound": "default"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
]
}
"rule_set": "geosite-bahamut",
"outbound": "台湾(TW)"
},
{
"process_path_regex": [
"^.+/steam/compatibilitytools.d/.+",
"^.+/steamapps/common/.*"
],
"outbound": "direct"
},
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
],
"outbound": "direct"
}
@ -216,6 +220,7 @@
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "./ui",
"external_ui_download_url": "https://github.com/Zephyruso/zashboard/releases/latest/download/dist.zip",
"external_ui_download_detour": "default",
"default_mode": "Enhanced"
}

View File

@ -37,10 +37,6 @@
"rule_set": "geosite-bahamut",
"outbound": "台湾(TW)"
},
{
"domain_suffix": "online-fix.me",
"outbound": "香港(HK)"
},
{
"process_path_regex": [
"^.+/steam/compatibilitytools.d/.+",

View File

@ -6,6 +6,7 @@
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "./ui",
"external_ui_download_url": "https://github.com/Zephyruso/zashboard/releases/latest/download/dist.zip",
"external_ui_download_detour": "default",
"default_mode": "Enhanced"
}

View File

@ -8,14 +8,6 @@
{
"tag": "direct",
"type": "direct"
},
{
"tag": "block",
"type": "block"
},
{
"tag": "dns",
"type": "dns"
}
]
}

View File

@ -2,17 +2,20 @@
"route": {
"rules": [
{
"type": "logical",
"mode": "or",
"rules": [
{
"protocol": "dns"
},
{
"port": 53
}
],
"outbound": "dns"
"action": "resolve",
"strategy": "prefer_ipv4"
},
{
"action": "sniff",
"timeout": "1s"
},
{
"protocol": "dns",
"action": "hijack-dns"
},
{
"port": [3478, 5348, 5349],
"outbound": "direct"
},
{
"ip_is_private": true,
@ -31,18 +34,23 @@
"outbound": "default"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
]
}
"rule_set": "geosite-bahamut",
"outbound": "台湾(TW)"
},
{
"process_path_regex": [
"^.+/steam/compatibilitytools.d/.+",
"^.+/steamapps/common/.*"
],
"outbound": "direct"
},
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
],
"outbound": "direct"
}