Last active
July 14, 2024 09:10
-
-
Save w311ang/2abf7bae572ed4d9efae2fb2794600a6 to your computer and use it in GitHub Desktop.
A template config of sing-box. Moved to https://github.com/w311ang/my_singbox_template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "dns": { | |
| "servers": [ | |
| { | |
| "tag": "cloudflare", | |
| "address": "tcp://1.1.1.1", | |
| "strategy": "ipv4_only" | |
| }, | |
| { | |
| "tag": "cloudflare_审计", | |
| "address": "tcp://1.1.1.1", | |
| "strategy": "ipv4_only", | |
| "detour": "审计" | |
| }, | |
| { | |
| "tag": "cloudflare_OpenAI", | |
| "address": "tcp://1.1.1.1", | |
| "strategy": "ipv4_only", | |
| "detour": "OpenAI" | |
| }, | |
| { | |
| "tag": "local", | |
| "address": "udp://223.5.5.5", | |
| "detour": "direct" | |
| } | |
| ], | |
| "rules": [ | |
| { | |
| "outbound": "any", | |
| "server": "local" | |
| }, | |
| { | |
| "clash_mode": "Direct", | |
| "server": "local" | |
| }, | |
| { | |
| "clash_mode": "Global", | |
| "server": "cloudflare" | |
| }, | |
| { | |
| "rule_set": "geosite-geolocation-cn", | |
| "server": "local" | |
| }, | |
| { | |
| "type": "logical", | |
| "mode": "and", | |
| "rules": [ | |
| { | |
| "rule_set": "geosite-geolocation-!cn", | |
| "invert": true | |
| }, | |
| { | |
| "rule_set": "geoip-cn" | |
| } | |
| ], | |
| "server": "local" | |
| }, | |
| { | |
| "rule_set": "审计", | |
| "server": "cloudflare_审计" | |
| }, | |
| { | |
| "rule_set": "geosite-openai", | |
| "server": "cloudflare_OpenAI" | |
| }, | |
| { | |
| "clash_mode": "Default", | |
| "server": "cloudflare" | |
| } | |
| ] | |
| }, | |
| "inbounds": [ | |
| { | |
| "type": "mixed", | |
| "tag": "mixed-in", | |
| "listen": "::1", | |
| "listen_port": 1080, | |
| "sniff": true | |
| }, | |
| { | |
| "type": "tun", | |
| "tag": "tun-in", | |
| "address": [ | |
| "172.18.0.1/30", | |
| "fdfe:dcba:9876::1/126" | |
| ], | |
| "auto_route": true, | |
| "strict_route": true, | |
| "include_android_user": [ | |
| 0, | |
| 999 | |
| ], | |
| "platform": { | |
| "http_proxy": { | |
| "enabled": true, | |
| "server": "::1", | |
| "server_port": 1080 | |
| } | |
| }, | |
| "sniff": true | |
| } | |
| ], | |
| "outbounds": [ | |
| { | |
| "type": "selector", | |
| "tag": "select", | |
| "outbounds": [ | |
| "auto" | |
| ] | |
| }, | |
| { | |
| "type": "urltest", | |
| "tag": "auto", | |
| "outbounds": [] | |
| }, | |
| { | |
| "type": "selector", | |
| "tag": "审计", | |
| "outbounds": [ | |
| "select" | |
| ] | |
| }, | |
| { | |
| "type": "selector", | |
| "tag": "OpenAI", | |
| "outbounds": [ | |
| "select" | |
| ] | |
| }, | |
| { | |
| "type": "direct", | |
| "tag": "direct" | |
| }, | |
| { | |
| "type": "block", | |
| "tag": "block" | |
| }, | |
| { | |
| "type": "dns", | |
| "tag": "dns-out" | |
| } | |
| ], | |
| "route": { | |
| "rules": [ | |
| { | |
| "clash_mode": "Direct", | |
| "outbound": "direct" | |
| }, | |
| { | |
| "clash_mode": "Global", | |
| "outbound": "select" | |
| }, | |
| { | |
| "protocol": "dns", | |
| "outbound": "dns-out" | |
| }, | |
| { | |
| "geoip": [ | |
| "private" | |
| ], | |
| "outbound": "direct" | |
| }, | |
| { | |
| "protocol": "quic", | |
| "outbound": "block" | |
| }, | |
| { | |
| "rule_set": "审计", | |
| "outbound": "审计" | |
| }, | |
| { | |
| "rule_set": "geosite-openai", | |
| "outbound": "OpenAI" | |
| }, | |
| { | |
| "clash_mode": "Default", | |
| "outbound": "select" | |
| } | |
| ], | |
| "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": "direct" | |
| }, | |
| { | |
| "type": "remote", | |
| "tag": "geosite-geolocation-!cn", | |
| "format": "binary", | |
| "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs", | |
| "download_detour": "direct" | |
| }, | |
| { | |
| "type": "remote", | |
| "tag": "geoip-cn", | |
| "format": "binary", | |
| "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs", | |
| "download_detour": "direct" | |
| }, | |
| { | |
| "type": "remote", | |
| "tag": "geosite-openai", | |
| "format": "binary", | |
| "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-openai.srs", | |
| "download_detour": "direct" | |
| }, | |
| { | |
| "type": "inline", | |
| "tag": "审计", | |
| "rules": [ | |
| { | |
| "domain_regex": [ | |
| "(.*.||)(dafahao|minghui|dongtaiwang|epochtimes|ntdtv|falundafa|wujieliulan).(org|com|net)" | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| "experimental": { | |
| "cache_file": { | |
| "enabled": true, | |
| "store_rdrc": true | |
| }, | |
| "clash_api": { | |
| "external_controller": "127.0.0.1:9090", | |
| "external_ui": "dashboard", | |
| "default_mode": "Default" | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment