Skip to content

Instantly share code, notes, and snippets.

@krisstibex
Last active August 31, 2025 10:21
Show Gist options
  • Select an option

  • Save krisstibex/82ec9d8c05f0fb1a596d3d40739314c8 to your computer and use it in GitHub Desktop.

Select an option

Save krisstibex/82ec9d8c05f0fb1a596d3d40739314c8 to your computer and use it in GitHub Desktop.
{
"log": {
"disabled": false,
"level": "info",
"timestamp": true,
"output": ""
},
"ntp": {
"enabled": true,
"server": "time.apple.com",
"server_port": 123,
"interval": "30m"
},
"providers": [
{
"type": "remote",
"url": "",
"user_agent": "sing-box",
"download_detour": "🇨🇳 直连",
"tag": "miku"
}
],
"inbounds": [
{
"type": "mixed",
"listen": "127.0.0.1",
"listen_port": 7890,
"set_system_proxy": true
},
{
"type": "tun",
"tag": "tun",
"address": [
"172.18.0.1/30",
"fdfe:dcba:9876::1/126"
],
"mtu": 9000,
"auto_route": true,
"stack": "mixed",
"platform": {
"http_proxy": {
"enabled": true,
"server": "127.0.0.1",
"server_port": 7890
}
}
}
],
"outbounds": [
{
"type": "selector",
"tag": "🇭🇰 香港",
"interrupt_exist_connections": true,
"include": "(🇭🇰)|(香港)|(Hong)|(HK)",
"providers": [
"miku"
]
},
{
"type": "selector",
"tag": "🇹🇼 台湾",
"interrupt_exist_connections": true,
"include": "(🇨🇳)|(台湾)|(Tai)|(TW)",
"providers": [
"miku"
]
},
{
"type": "selector",
"tag": "🇸🇬 新加坡",
"interrupt_exist_connections": true,
"include": "(🇸🇬)|(新加坡)|(Singapore)|(SG)",
"providers": [
"miku"
]
},
{
"type": "selector",
"tag": "🇯🇵 日本",
"interrupt_exist_connections": true,
"include": "(🇯🇵)|(日本)|(Japan)|(JP)",
"providers": [
"miku"
]
},
{
"type": "selector",
"tag": "🇺🇸 美国",
"interrupt_exist_connections": true,
"include": "(🇺🇸)|(美国)|(States)|(US)",
"providers": [
"miku"
]
},
{
"type": "selector",
"tag": "🏳️ 其他",
"interrupt_exist_connections": true,
"exclude": "(🇭🇰|香港|Hong|HK|🇨🇳|台湾|Tai|TW|🇸🇬|新加坡|Singapore|SG|🇯🇵|日本|Japan|JP|🇺🇸|美国|States|US)",
"providers": [
"miku"
]
},
{
"type": "selector",
"tag": "🔍 Bing",
"interrupt_exist_connections": true,
"outbounds": [
"🇨🇳 直连",
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "🌐 Google",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "▶️ YouTube",
"interrupt_exist_connections": true,
"outbounds": [
"🇨🇳 直连",
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "💿 Spotify",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇭🇰 香港"
},
{
"type": "selector",
"tag": "📺 Netflix",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇹🇼 台湾"
},
{
"type": "selector",
"tag": "📹 Disney+",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "🎥 bilibili",
"interrupt_exist_connections": true,
"outbounds": [
"🇨🇳 直连",
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇨🇳 直连"
},
{
"type": "selector",
"tag": "🎬 TikTok",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇯🇵 日本"
},
{
"type": "selector",
"tag": "💬 X",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "🧑‍🤝‍🧑 FaceBook",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "✈️ Telegram",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇸🇬 新加坡"
},
{
"type": "selector",
"tag": "🤖 AI",
"interrupt_exist_connections": true,
"outbounds": [
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "📦 Github",
"interrupt_exist_connections": true,
"outbounds": [
"🇨🇳 直连",
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "direct",
"tag": "🇨🇳 直连"
},
{
"type": "selector",
"tag": "🐟 漏网之鱼",
"interrupt_exist_connections": true,
"outbounds": [
"🇨🇳 直连",
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国"
],
"default": "🇺🇸 美国"
},
{
"type": "selector",
"tag": "GLOBAL",
"interrupt_exist_connections": true,
"outbounds": [
"🇨🇳 直连",
"🇭🇰 香港",
"🇹🇼 台湾",
"🇸🇬 新加坡",
"🇯🇵 日本",
"🇺🇸 美国",
"🏳️ 其他"
]
}
],
"route": {
"rules": [
{
"action": "sniff",
"sniffer": [
"http",
"tls",
"quic",
"dns"
]
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"port": 53
},
{
"protocol": "dns"
}
],
"action": "hijack-dns"
},
{
"action": "route",
"clash_mode": "direct",
"outbound": "🇨🇳 直连"
},
{
"action": "route",
"clash_mode": "global",
"outbound": "GLOBAL"
},
{
"action": "reject",
"protocol": "quic"
},
{
"action": "reject",
"rule_set": [
"Category-Ads"
]
},
{
"action": "route",
"domain_suffix": [
".",
"arpa",
"bogon",
"local",
".in-addr.arpa",
".ip6.arpa",
"_udp",
"_tcp"
],
"outbound": "🇨🇳 直连"
},
{
"action": "route",
"rule_set": [
"Apple"
],
"outbound": "🇨🇳 直连"
},
{
"action": "route",
"rule_set": [
"Github"
],
"outbound": "📦 Github"
},
{
"action": "route",
"rule_set": [
"OpenAI",
"Claude",
"Gemini"
],
"outbound": "🤖 AI"
},
{
"action": "route",
"rule_set": [
"Telegram",
"Telegram_asn",
"Telegram_IP"
],
"outbound": "✈️ Telegram"
},
{
"action": "route",
"rule_set": [
"FaceBook"
],
"outbound": "🧑‍🤝‍🧑 FaceBook"
},
{
"action": "route",
"rule_set": [
"X"
],
"outbound": "💬 X"
},
{
"action": "route",
"rule_set": [
"TikTok"
],
"outbound": "🎬 TikTok"
},
{
"action": "route",
"rule_set": [
"哔哩国际"
],
"outbound": "🎥 bilibili"
},
{
"action": "route",
"rule_set": [
"Spotify"
],
"outbound": "💿 Spotify"
},
{
"action": "route",
"rule_set": [
"Disney"
],
"outbound": "📹 Disney+"
},
{
"action": "route",
"rule_set": [
"Netflix"
],
"outbound": "📺 Netflix"
},
{
"action": "route",
"rule_set": [
"Youtube"
],
"outbound": "▶️ YouTube"
},
{
"action": "route",
"rule_set": [
"Google"
],
"outbound": "🌐 Google"
},
{
"action": "route",
"rule_set": [
"Bing",
"Bing-CN"
],
"outbound": "🔍 Bing"
},
{
"action": "route",
"rule_set": [
"GeoSite-Private"
],
"outbound": "🇨🇳 直连"
},
{
"action": "route",
"rule_set": [
"GeoSite-CN"
],
"outbound": "🇨🇳 直连"
},
{
"action": "route",
"rule_set": [
"GeoIP-Private"
],
"outbound": "🇨🇳 直连"
},
{
"action": "route",
"rule_set": [
"GeoIP-CN"
],
"outbound": "🇨🇳 直连"
},
{
"action": "route",
"rule_set": [
"GeoLocation-!CN"
],
"outbound": "🐟 漏网之鱼"
}
],
"rule_set": [
{
"tag": "Category-Ads",
"type": "remote",
"url": "https://adrules.top/adrules-singbox.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Apple",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/Repcz/Tool/X/sing-box/Rules/Apple.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Spotify",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/Repcz/Tool/X/sing-box/Rules/Spotify.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "OpenAI",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-openai.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Claude",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-anthropic.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Gemini",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google-gemini.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Bing",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-bing.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Bing-CN",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-bing@cn.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Youtube",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-youtube.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "FaceBook",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-facebook.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "X",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-x.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Github",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-github.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Netflix",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-netflix.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Disney",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-disney.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "哔哩国际",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-bilibili.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "TikTok",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-tiktok.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Telegram",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-telegram.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Telegram_asn",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/yyhhyyyyyy/sing-box-ruleset/main/ip/telegram_asn.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Telegram_IP",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/yyhhyyyyyy/sing-box-ruleset/main/ip/telegram.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "Google",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "GeoIP-Private",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/private.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "GeoSite-Private",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/private.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "GeoIP-CN",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/cn.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "GeoSite-CN",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/cn.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
},
{
"tag": "GeoLocation-!CN",
"type": "remote",
"url": "https://git.repcz.link/raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/geolocation-!cn.srs",
"format": "binary",
"download_detour": "🇭🇰 香港"
}
],
"auto_detect_interface": true,
"final": "🐟 漏网之鱼",
"default_domain_resolver": {
"server": "public"
}
},
"dns": {
"servers": [
{
"type": "local",
"tag": "system"
},
{
"tag": "local",
"type": "udp",
"server": "223.5.5.5"
},
{
"tag": "public",
"type": "https",
"server": "dns.alidns.com",
"domain_resolver": "local"
},
{
"tag": "foreign",
"type": "https",
"server": "1.1.1.1"
},
{
"tag": "fakeip",
"type": "fakeip",
"inet4_range": "198.18.0.0/15",
"inet6_range": "fc00::/18"
}
],
"rules": [
{
"query_type": "HTTPS",
"action": "reject"
},
{
"domain_suffix": [
".",
"arpa",
"bogon",
"local",
".in-addr.arpa",
".ip6.arpa",
"_udp",
"_tcp"
],
"server": "system"
},
{
"domain": [
"token.safebrowsing.apple"
],
"server": "foreign"
},
{
"clash_mode": "direct",
"server": "local"
},
{
"clash_mode": "global",
"server": "foreign"
},
{
"rule_set": [
"GeoSite-CN"
],
"server": "local"
},
{
"query_type": [
"A",
"AAAA"
],
"server": "fakeip",
"rewrite_ttl": 1
}
],
"final": "foreign",
"strategy": "ipv4_only",
"independent_cache": true
},
"experimental": {
"clash_api": {
"external_controller": "[::]:9090",
"external_ui": "ui",
"secret": "Miku",
"external_ui_download_url": "https://git.repcz.link/github.com/Zephyruso/zashboard/releases/latest/download/dist.zip",
"default_mode": "rule"
},
"cache_file": {
"enabled": true,
"path": "cache.db",
"store_fakeip": true
}
}
}
{
"dns": {
"servers": [
{
"tag": "cloudflare",
"type": "https",
"server": "1.1.1.1",
"detour": "Proxy"
},
{
"tag": "ali",
"type": "https",
"server": "223.6.6.6"
},
{
"tag": "remote_fakeip",
"type": "fakeip",
"inet4_range": "198.18.0.0/15",
"inet6_range": "fc00::/18"
}
],
"rules": [
{
"clash_mode": "全局直连",
"action": "route",
"server": "ali"
},
{
"clash_mode": "全局代理",
"action": "route",
"server": "remote_fakeip"
},
{
"query_type": "HTTPS",
"action": "reject"
},
{
"query_type": [
"A",
"AAAA"
],
"action": "route",
"server": "remote_fakeip",
"rewrite_ttl": 1
},
{
"rule_set": [
"ChinaDomain",
"Apple"
],
"action": "route",
"server": "ali"
}
],
"final": "cloudflare",
"independent_cache": true
},
"providers": [
{
"type": "local",
"tag": "flower",
"path": "node.json"
}
],
"outbounds": [
{
"tag": "direct",
"type": "direct"
},
{
"tag": "Proxy",
"type": "selector",
"outbounds": [
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan",
"direct"
],
"default": "direct",
"interrupt_exist_connections": true
},
{
"tag": "AI",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Google",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Microsoft",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan",
"direct"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Twitter",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Telegram",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Emby",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan",
"direct"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Game",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan",
"direct"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Spotify",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan",
"direct"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "ProxyMedia",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "Final",
"type": "selector",
"outbounds": [
"Proxy",
"🇭🇰 HongKong",
"🇺🇸 United States",
"🇸🇬 Singapore",
"🇯🇵 Japan",
"🇨🇳 Taiwan",
"direct"
],
"default": "Proxy",
"interrupt_exist_connections": true
},
{
"tag": "🇭🇰 HongKong",
"type": "selector",
"include": "(🇭🇰)|(香港)|(Hong)|(HK)",
"providers": [
"flower"
],
"interrupt_exist_connections": false
},
{
"tag": "🇺🇸 United States",
"type": "selector",
"include": "(🇺🇸)|(美国)|(States)|(US)",
"providers": [
"flower"
],
"interrupt_exist_connections": false
},
{
"tag": "🇸🇬 Singapore",
"type": "selector",
"include": "(🇸🇬)|(新加坡)|(Singapore)|(SG)",
"providers": [
"flower"
],
"interrupt_exist_connections": false
},
{
"tag": "🇯🇵 Japan",
"type": "selector",
"include": "(🇯🇵)|(日本)|(Japan)|(JP)",
"providers": [
"flower"
],
"interrupt_exist_connections": false
},
{
"tag": "🇨🇳 Taiwan",
"type": "selector",
"include": "(🇨🇳)|(台湾)|(Tai)|(TW)",
"providers": [
"flower"
],
"interrupt_exist_connections": false
}
],
"route": {
"default_domain_resolver": {
"server": "ali"
},
"rule_set": [
{
"tag": "Ads",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Ads_SukkaW.srs",
"download_detour": "direct"
},
{
"tag": "Telegram",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Telegram.srs",
"download_detour": "direct"
},
{
"tag": "YouTube",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/YouTube.srs",
"download_detour": "direct"
},
{
"tag": "Google",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Google.srs",
"download_detour": "direct"
},
{
"tag": "Microsoft",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Microsoft.srs",
"download_detour": "direct"
},
{
"tag": "OneDrive",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/OneDrive.srs",
"download_detour": "direct"
},
{
"tag": "Github",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Github.srs",
"download_detour": "direct"
},
{
"tag": "Twitter",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Twitter.srs",
"download_detour": "direct"
},
{
"tag": "Apple",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Apple.srs",
"download_detour": "direct"
},
{
"tag": "AppleProxy",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/AppleProxy.srs",
"download_detour": "direct"
},
{
"tag": "AI",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/category-ai-chat-!cn.srs",
"download_detour": "direct"
},
{
"tag": "Emby",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Emby.srs",
"download_detour": "direct"
},
{
"tag": "Epic",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Epic.srs",
"download_detour": "direct"
},
{
"tag": "Steam",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Steam.srs",
"download_detour": "direct"
},
{
"tag": "Spotify",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Spotify.srs",
"download_detour": "direct"
},
{
"tag": "Bahamut",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Bahamut.srs",
"download_detour": "direct"
},
{
"tag": "Netflix",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Netflix.srs",
"download_detour": "direct"
},
{
"tag": "Disney",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/Disney.srs",
"download_detour": "direct"
},
{
"tag": "PrimeVideo",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/PrimeVideo.srs",
"download_detour": "direct"
},
{
"tag": "HBO",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/HBO.srs",
"download_detour": "direct"
},
{
"tag": "TikTok",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Repcz/Tool/raw/X/sing-box/Rules/TikTok.srs",
"download_detour": "direct"
},
{
"tag": "ChinaDomain",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/cn.srs",
"download_detour": "direct"
},
{
"tag": "ChinaIP",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/github.com/Loyalsoldier/geoip/raw/release/srs/cn.srs",
"download_detour": "direct"
},
{
"tag": "geolocation-!cn",
"type": "remote",
"format": "binary",
"url": "https://git.repcz.link/raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/singbox_rule_set/geosite-geolocation-!cn.srs",
"download_detour": "direct"
}
],
"rules": [
{
"action": "sniff",
"sniffer": [
"http",
"tls",
"quic",
"dns"
],
"timeout": "500ms"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"port": 53
},
{
"protocol": "dns"
}
],
"action": "hijack-dns"
},
{
"ip_is_private": true,
"action": "route",
"outbound": "direct"
},
{
"clash_mode": "全局直连",
"action": "route",
"outbound": "direct"
},
{
"clash_mode": "全局代理",
"action": "route",
"outbound": "Proxy"
},
{
"rule_set": [
"Ads"
],
"action": "reject"
},
{
"rule_set": [
"AI"
],
"action": "route",
"outbound": "AI"
},
{
"rule_set": [
"YouTube",
"Google"
],
"action": "route",
"outbound": "Google"
},
{
"rule_set": [
"Microsoft",
"OneDrive",
"Github"
],
"action": "route",
"outbound": "Microsoft"
},
{
"rule_set": [
"Twitter"
],
"action": "route",
"outbound": "Twitter"
},
{
"rule_set": [
"Telegram"
],
"action": "route",
"outbound": "Telegram"
},
{
"rule_set": [
"Emby"
],
"action": "route",
"outbound": "Emby"
},
{
"rule_set": [
"Steam",
"Epic"
],
"action": "route",
"outbound": "Game"
},
{
"rule_set": [
"Bahamut",
"Netflix",
"Disney",
"PrimeVideo",
"HBO",
"TikTok"
],
"action": "route",
"outbound": "ProxyMedia"
},
{
"rule_set": [
"AppleProxy"
],
"action": "route",
"outbound": "🇭🇰 HongKong"
},
{
"rule_set": [
"geolocation-!cn"
],
"action": "route",
"outbound": "Proxy"
},
{
"action": "resolve"
},
{
"rule_set": [
"ChinaDomain",
"ChinaIP",
"Apple"
],
"action": "route",
"outbound": "direct"
}
],
"auto_detect_interface": true,
"final": "Final"
},
"log": {
"disabled": false,
"level": "info",
"timestamp": true
},
"experimental": {
"cache_file": {
"enabled": true,
"store_fakeip": true
},
"clash_api": {
"default_mode": "规则模式",
"external_controller": "127.0.0.1:9191",
"external_ui": "ui",
"external_ui_download_url": "https://git.repcz.link/github.com/Zephyruso/zashboard/releases/latest/download/dist.zip",
"external_ui_download_detour": "Proxy"
}
},
"inbounds": [
{
"type": "mixed",
"listen": "127.0.0.1",
"listen_port": 7080,
"set_system_proxy": false
},
{
"type": "tun",
"address": [
"172.18.0.1/30",
"fdfe:dcba:9876::1/126"
],
"platform": {
"http_proxy": {
"enabled": true,
"server": "127.0.0.1",
"server_port": 7080
}
},
"stack": "mixed",
"auto_route": true
}
]
}
#!/bin/bash
echo -ne "\033]0;sing-box cli\007"
if [[ -n "$SUDO_PASSWORD" ]]; then
echo "$SUDO_PASSWORD" | sudo -S true
else
sudo true
fi
cd "$(dirname "$0")"
# 日志模式: 默认 console
LOG_MODE="${LOG_MODE:-console}"
LOG_FILE="sing-box.log"
case "$LOG_MODE" in
file)
sudo ./sing-box run -c config.json -D . > "$LOG_FILE" 2>&1
;;
both)
sudo ./sing-box run -c config.json -D . 2>&1 | tee "$LOG_FILE"
;;
*)
sudo ./sing-box run -c config.json -D . 2>&1
;;
esac
{
"config/automatic-disconnection": "true",
"config/auto-upgrade-core": "false",
"config/display-global-by-mode": "true",
"config/swipe-in-pages": "true",
"config/source-ip-label-list": "[]",
"config/speedtest-timeout": "5000",
"config/icon-margin-right": "6",
"config/auto-disconnect-idle-udp-time": "300",
"config/table-column-pinning": "{\"left\":[],\"right\":[]}",
"config/show-statistics-when-sidebar-collapsed": "true",
"config/use-connecticon-card": "false",
"config/auto-disconnect-idle-udp": "false",
"config/dashboard-transparent": "72",
"config/medium-latency": "800",
"config/collapse-group-map": "{\"Final\":false,\"Proxy\":true,\"AI\":false,\"Google\":false,\"Microsoft\":false,\"Twitter\":false,\"Telegram\":false,\"Emby\":false,\"Game\":false,\"Spotify\":false,\"ProxyMedia\":false,\"🇭🇰 HongKong\":false,\"🇺🇸 United States\":false,\"🇸🇬 Singapore\":false,\"🇨🇳 Taiwan\":false,\"🇯🇵 Japan\":false,\"✈️ Telegram\":false,\"💬 X\":false,\"🧑‍🤝‍🧑 FaceBook\":false,\"🎬 TikTok\":false,\"🎥 bilibili\":false,\"📺 Netflix\":false,\"📹 Disney+\":false,\"▶️ YouTube\":false,\"🌐 Google\":false,\"🔍 Bing\":false,\"🤖 AI\":false,\"📦 Github\":false,\"🐟 漏网之鱼\":false,\"GLOBAL\":false,\"proxy\":false,\"final\":false,\"🇭🇰 香港\":false,\"🇺🇸 美国\":false,\"hk\":false,\"miku\":true,\"🇹🇼 台湾\":false,\"🇯🇵 日本\":false,\"🇸🇬 新加坡\":false}",
"config/display-all-features": "true",
"config/check-upgrade-core": "true",
"config/table-sorting": "[]",
"config/split-overview-page": "true",
"config/geoip-info-api": "ipapi.is",
"config/icon-size": "14",
"config/is-sidebar-collapsed": "false",
"config/theme": "default",
"config/truncate-proxy-name": "true",
"config/source-ip-label-map": "{}",
"config/group-proxies-by-provider": "false",
"config/default-theme": "light",
"config/low-latency": "400",
"config/hide-unavailable-proxies": "false",
"config/independent-latency-test": "true",
"config/emoji": "twemoji",
"config/proxy-chain-direction": "normal",
"config/hidden-group-map": "{}",
"config/auto-ip-check": "true",
"config/icon-reflect-list": "[{\"name\":\"🇭🇰 香港\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Hong_Kong.png\",\"uuid\":\"97b86d9c-9a92-4d2d-ab10-f30806f2eeaf\"},{\"name\":\"🇹🇼 台湾\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Taiwan.png\",\"uuid\":\"4f936f75-71ce-4a47-9c1b-d1d9a56672c1\"},{\"name\":\"🇸🇬 新加坡\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Singapore.png\",\"uuid\":\"bdd19190-1c9a-4862-938c-347d5cfa0d08\"},{\"name\":\"🇯🇵 日本\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Japan.png\",\"uuid\":\"2db91ead-6eab-4cff-a231-04ebd6b5c5df\"},{\"name\":\"🇺🇸 美国\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/United_States.png\",\"uuid\":\"6b58c6c6-ba3b-4a38-84db-815f992bd874\"},{\"name\":\"🔍 Bing\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Microsoft.png\",\"uuid\":\"d4882964-ae8e-498a-89c5-aaa14421f6fc\"},{\"name\":\"🌐 Google\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Google.png\",\"uuid\":\"07f177dc-91e5-4162-bf19-f21129e65ed3\"},{\"name\":\"▶️ YouTube\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/YouTube.png\",\"uuid\":\"2e6360e9-5d6a-440a-854b-e69a59d8da27\"},{\"name\":\"💿 Spotify\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Spotify.png\",\"uuid\":\"845a28ba-5d11-4186-8d5a-e439ade15f06\"},{\"name\":\"📺 Netflix\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Netflix.png\",\"uuid\":\"f5e7c0a9-ea44-41f8-b1dc-f395fd995763\"},{\"name\":\"📹 Disney+\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Disney%2B.png\",\"uuid\":\"be8c4d3d-cbb5-4c30-b16d-dfefb37cd8c2\"},{\"name\":\"🎥 bilibili\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/bilibili.png\",\"uuid\":\"2fc91f6a-edd0-41b2-9c85-488ae54a4b2c\"},{\"name\":\"🎬 TikTok\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/TikTok.png\",\"uuid\":\"1fd71315-3cc1-4016-ba84-abd310c70c57\"},{\"name\":\"💬 X\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Twitter.png\",\"uuid\":\"ef5f92c0-a34c-4710-8a8b-fe8a843e7c29\"},{\"name\":\"🧑‍🤝‍🧑 FaceBook\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Facebook.png\",\"uuid\":\"7bf62152-c71a-4e39-9e83-6530008281ed\"},{\"name\":\"✈️ Telegram\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Telegram.png\",\"uuid\":\"41764f33-2f48-4976-8cb1-4a671a868518\"},{\"name\":\"🤖 AI\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/AI.png\",\"uuid\":\"e61feb19-b4b3-4d95-82ad-71858fa6822d\"},{\"name\":\"📦 Github\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/GitHub.png\",\"uuid\":\"474a4a62-8d6e-47fd-8aa5-ce2640b9aa2a\"},{\"name\":\"🐟 漏网之鱼\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Final.png\",\"uuid\":\"ff034a04-f086-4fcb-944a-aa4981813731\"},{\"name\":\"GLOBAL\",\"icon\":\"https://github.com/Koolson/Qure/raw/master/IconSet/Color/Global.png\",\"uuid\":\"8d910e09-1ce6-40e9-8830-33bac2cb5d4c\"}]",
"config/display-latency-in-rule": "true",
"config/scroll-animation-effect": "true",
"config/proxies-count-mode": "aliveTotal",
"config/speedtest-url": "https://www.gstatic.com/generate_204",
"config/language": "zh-CN",
"config/quick-filter-regex": "direct|dns-out",
"config/table-width-mode": "auto",
"config/custom-themes": "[]",
"config/custom-global-node-name": "GLOBAL",
"config/connection-sort-type": "host",
"config/proxy-sort-type": "defaultsort",
"config/log-retention-limit": "1000",
"config/connecticon-table-size": "small",
"config/auto-connection-check": "true",
"config/show-ip-and-connection-info": "true",
"config/log-level": "info",
"config/auto-theme": "true",
"config/font": "MiSans",
"setup/api-list": "[{\"protocol\":\"http\",\"host\":\"127.0.0.1\",\"port\":\"9090\",\"secondaryPath\":\"\",\"password\":\"\",\"label\":\"\",\"uuid\":\"f6bfd813-ec2d-4836-85c9-eb84063d03be\"},{\"protocol\":\"http\",\"host\":\"127.0.0.1\",\"port\":\"9090\",\"secondaryPath\":\"\",\"password\":\"Miku\",\"label\":\"\",\"uuid\":\"93776244-b9e5-46a0-9923-fc0e2ccc6ffa\"}]",
"config/ipv6-map": "{}",
"config/connection-table-columns": "[\"close\",\"host\",\"type\",\"rule\",\"chains\",\"dlSpeed\",\"ulSpeed\",\"dl\",\"ul\",\"connectTime\"]",
"config/number-of-charts-in-sidebar": "1",
"config/proxy-group-icon-size": "24",
"setup/active-uuid": "93776244-b9e5-46a0-9923-fc0e2ccc6ffa",
"config/use-smart-group-sort": "false",
"config/swipe-in-tabs": "false",
"config/display-proxies-relationship": "true",
"config/min-proxy-card-width": "145",
"config/proxy-preview-type": "auto",
"config/disable-pull-to-refresh": "true",
"config/proxy-card-size": "large",
"config/ipv6-test": "false",
"config/connection-sort-direction": "asc",
"config/auto-upgrade": "true",
"config/two-columns": "true",
"config/proxy-group-icon-margin": "6",
"config/custom-background-image": "local-image-1755766631776",
"config/connection-card-lines": "[[\"host\",\"connectTime\"],[\"type\",\"dl\",\"ul\"],[\"chains\",\"dlSpeed\",\"close\"]]",
"config/blur-intensity": "3",
"config/display-now-node-in-rule": "true",
"config/import-settings-url": "",
"config/manage-hidden-group-mode": "false",
"config/log-search-history": "[\"down\",\"arpa\"]",
"config/dark-theme": "dark",
"config/table-column-width": "{\"close\":50,\"host\":320,\"chains\":320,\"rule\":200,\"dl\":80,\"dlSpeed\":80,\"ul\":80,\"ulSpeed\":80,\"type\":150,\"process\":150,\"sourceIP\":150,\"sourcePort\":100,\"sniffHost\":200,\"destination\":150,\"connectTime\":100}",
"config/auto-import-settings": "false",
"config/quick-filter-enabled": "false"
}

Comments are disabled for this gist.