From 4c9ce17994d41340373546170e91682ed1df0a11 Mon Sep 17 00:00:00 2001 From: nite07 Date: Sat, 19 Oct 2024 18:19:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Modify=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/example-linux.json | 241 ++++++++++++++++++ .../{example.json => example-windows.json} | 6 +- 2 files changed, 243 insertions(+), 4 deletions(-) create mode 100644 templates/example-linux.json rename templates/{example.json => example-windows.json} (95%) diff --git a/templates/example-linux.json b/templates/example-linux.json new file mode 100644 index 0000000..4a6ca2a --- /dev/null +++ b/templates/example-linux.json @@ -0,0 +1,241 @@ +{ + "log": { + "level": "info", + "timestamp": true + }, + "dns": { + "independent_cache": true, + "fakeip": { + "enabled": true, + "inet4_range": "198.18.0.0/15", + "inet6_range": "fc00::/18" + }, + "strategy": "prefer_ipv4", + "rules": [ + { + "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" + }, + { + "query_type": ["A", "AAAA"], + "server": "fakeip" + } + ], + "servers": [ + { + "address": "tls://8.8.8.8", + "tag": "google" + }, + { + "address": "https://223.5.5.5/dns-query", + "detour": "direct", + "tag": "local" + }, + { + "tag": "fakeip", + "address": "fakeip" + } + ] + }, + "inbounds": [ + { + "type": "tun", + "auto_route": true, + "auto_redirect": true, + "strict_route": true, + "sniff": true, + "sniff_override_destination": true, + "address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"] + } + ], + "outbounds": [ + { + "outbounds": ["", "direct"], + "tag": "default", + "type": "selector" + }, + { + "tag": "direct", + "type": "direct" + }, + { + "tag": "block", + "type": "block" + }, + { + "tag": "dns", + "type": "dns" + } + ], + "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" + }, + { + "type": "logical", + "mode": "or", + "rules": [ + { + "port": 853 + }, + { + "network": "udp", + "port": 443 + }, + { + "protocol": "stun" + } + ], + "outbound": "block" + }, + { + "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" + } + ], + "rule_set": [ + { + "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-google@cn", + "format": "binary", + "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google@cn.srs", + "download_detour": "default" + }, + { + "type": "remote", + "tag": "geosite-google-play@cn", + "format": "binary", + "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google-play@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" + } + ], + "final": "default", + "auto_detect_interface": true + }, + "experimental": { + "cache_file": { + "enabled": true + }, + "clash_api": { + "default_mode": "Enhanced", + "external_controller": "127.0.0.1:9090", + "external_ui": "./ui", + "external_ui_download_detour": "default" + } + } +} diff --git a/templates/example.json b/templates/example-windows.json similarity index 95% rename from templates/example.json rename to templates/example-windows.json index c899b5e..26ea0c2 100644 --- a/templates/example.json +++ b/templates/example-windows.json @@ -71,9 +71,7 @@ "strict_route": true, "sniff": true, "sniff_override_destination": true, - "address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"], - "route_exclude_address": ["100.64.0.0/10", "fd7a:115c:a1e0::/48"], - "route_exclude_address_set": ["geoip-cn"] + "address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"] } ], "outbounds": [ @@ -156,7 +154,7 @@ "geosite-steam@cn" ] }, - { "process_path_regex": [".*steamapps[\\/]common.*"] } + { "process_path_regex": ["^.+steamapps\\\\common.+"] } ], "outbound": "direct" }