kenzok8-small/sing-box/files/config.json.example
2023-09-23 22:23:13 +08:00

237 lines
5.1 KiB
Plaintext

{
"log": {
"disabled": false,
"level": "warn",
"output": "/tmp/sing-box.log",
"timestamp": true
},
"experimental": {
"clash_api": {
"external_controller": "0.0.0.0:9090",
"external_ui": "",
"secret": "********",
"direct_io": true,
"default_mode": "rule",
"store_selected": true,
"cache_file": "cache.db"
}
},
"dns": {
"servers": [
{
"tag": "google",
"address": "tls://8.8.8.8"
},
{
"tag": "local",
"address": "tls://1.12.12.12",
"detour": "direct"
}
],
"rules": [
{
"domain": "mydomain.com",
"geosite": "cn",
"server": "local"
}
],
"strategy": "ipv4_only"
},
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"endpoint_independent_nat": true,
"stack": "system",
"sniff": true
},
{
"type": "mixed",
"tag": "SOCKS-in",
"listen": "::",
"listen_port": *****
},
{
"type": "shadowsocks",
"tag": "SS-in",
"listen": "::",
"listen_port": *****,
"sniff": true,
"method": "2022-blake3-aes-128-gcm",
"password": "bZzjl2DAXUs02L2Sosgu7A==",
"users": [
{
"name": "User1",
"password": "SGEFjWc+VgNGBXe1JhoRfg=="
},
{
"name": "User2",
"password": "XoXhbj4V9cMXfuUXF/C+cg=="
}
]
}
],
"outbounds": [
{
"type": "selector",
"tag": "Proxy-out",
"outbounds": [
"URL-Test",
"direct",
"Shadowsocks-ShadowTLS-out",
"Trojan-GRPC-out",
"Trojan-WebSocket-out",
"Hysteria-out"
],
"default": "URL-Test"
},
{
"type": "urltest",
"tag": "URL-Test",
"outbounds": [
"Shadowsocks-ShadowTLS-out",
"Trojan-GRPC-out",
"Trojan-WebSocket-out",
"Hysteria-out"
],
"url": "http://www.gstatic.com/generate_204",
"interval": "1m",
"tolerance": 50
},
{
"type": "shadowsocks",
"tag": "Shadowsocks-ShadowTLS-out",
"detour": "Shadowsocks-ShadowTLS",
"method": "2022-blake3-aes-128-gcm",
"password": "F7cx1ASHX/eqQwed+pISzw==:CB8sXcYLzf1P5dUizIzYVg==",
"multiplex": {
"enabled": true,
"max_connections": 4,
"min_streams": 4,
"max_streams": 0
}
},
{
"type": "shadowtls",
"tag": "Shadowsocks-ShadowTLS",
"server": "***.***.***.***",
"server_port": *****,
"version": 2,
"password": "************",
"tls": {
"enabled": true,
"server_name": "something.example.org"
}
},
{
"type": "trojan",
"tag": "Trojan-GRPC-out",
"server": "***.***.***.***",
"server_port": *****,
"password": "************",
"transport": {
"type": "grpc",
"service_name": "************"
},
"tls": {
"enabled": true,
"disable_sni": false,
"server_name": "yours.example.org",
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
}
},
{
"type": "trojan",
"tag": "WebSocket-out",
"server": "***.***.***.***",
"server_port": *****,
"password": "************",
"transport": {
"type": "ws",
"path": "/************",
"early_data_header_name": "Sec-WebSocket-Protocol"
},
"tls": {
"enabled": true,
"disable_sni": false,
"server_name": "yours.example.org",
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
},
"multiplex": {
"enabled": true,
"max_connections": 4,
"min_streams": 4,
"max_streams": 0
}
},
{
"type": "hysteria",
"tag": "Hysteria-out",
"server": "***.***.***.***",
"server_port": *****,
"up_mbps": 100,
"down_mbps": ,
"obfs": "************",
"auth_str": "************",
"tls": {
"enabled": true,
"disable_sni": false,
"server_name": "yours.example.org",
"alpn": [
"h3"
]
}
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"inbound": [
"SOCKS-in"
],
"outbound": "Proxy-out"
},
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geosite": "category-ads-all",
"outbound": "block"
},
{
"geosite": "cn",
"geoip": [
"cn",
"private"
],
"outbound": "direct"
},
{
"protocol": "quic",
"outbound": "block"
}
],
"auto_detect_interface": true
}
}