mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-07 04:34:05 +08:00
338 lines
6.4 KiB
JSON
338 lines
6.4 KiB
JSON
{
|
|
"log": {
|
|
"disabled": false,
|
|
"level": "error",
|
|
"output": "__WORKDIR__/run/sing-box-c.log",
|
|
"timestamp": true
|
|
},
|
|
"dns": {
|
|
"servers": [
|
|
{
|
|
"tag": "default-dns",
|
|
"type": "udp",
|
|
"server": "202.96.128.86"
|
|
},
|
|
{
|
|
"tag": "system-dns",
|
|
"type": "local"
|
|
},
|
|
{
|
|
"tag": "main-dns",
|
|
"domain_resolver": {
|
|
"server": "default-dns",
|
|
"strategy": "ipv4_only"
|
|
},
|
|
"detour": "main-out",
|
|
"type": "https",
|
|
"server": "cloudflare-dns.com",
|
|
"server_port": 443,
|
|
"path": "/dns-query"
|
|
},
|
|
{
|
|
"tag": "china-dns",
|
|
"domain_resolver": {
|
|
"server": "default-dns",
|
|
"strategy": "ipv4_only"
|
|
},
|
|
"type": "udp",
|
|
"server": "223.5.5.5"
|
|
}
|
|
],
|
|
"rules": [
|
|
{
|
|
"query_type": [
|
|
64,
|
|
65
|
|
],
|
|
"action": "reject"
|
|
},
|
|
{
|
|
"query_type": [
|
|
35
|
|
],
|
|
"domain_suffix": [
|
|
"r.10086.cn",
|
|
"10086.cn",
|
|
"pub.3gppnetwork.org"
|
|
],
|
|
"action": "route",
|
|
"server": "default-dns"
|
|
},
|
|
{
|
|
"rule_set": "geosite-cn",
|
|
"action": "route",
|
|
"server": "china-dns"
|
|
}
|
|
],
|
|
"strategy": "ipv4_only",
|
|
"final": "main-dns"
|
|
},
|
|
"inbounds": [
|
|
{
|
|
"type": "direct",
|
|
"tag": "dns-in",
|
|
"listen": "127.0.0.1",
|
|
"listen_port": 5333
|
|
},
|
|
{
|
|
"type": "mixed",
|
|
"tag": "mixed-in",
|
|
"listen": "::",
|
|
"listen_port": 5330,
|
|
"set_system_proxy": false
|
|
},
|
|
{
|
|
"type": "tun",
|
|
"tag": "tun-in",
|
|
"interface_name": "singtun0",
|
|
"address": [
|
|
"172.19.0.1/30"
|
|
],
|
|
"mtu": 9000,
|
|
"auto_route": false,
|
|
"stack": "system"
|
|
}
|
|
],
|
|
"outbounds": [
|
|
{
|
|
"type": "direct",
|
|
"tag": "direct-out"
|
|
},
|
|
{
|
|
"type": "block",
|
|
"tag": "block-out"
|
|
},
|
|
{
|
|
"type": "urltest",
|
|
"tag": "main-out",
|
|
"outbounds": [
|
|
"cfg-n_anytls-out",
|
|
"cfg-n_vless_reality_ws-out",
|
|
"cfg-n_vmess_http-out",
|
|
"cfg-n_trojan_grpc-out",
|
|
"cfg-n_ss-out",
|
|
"cfg-n_hy2-out",
|
|
"cfg-n_snell-out",
|
|
"cfg-n_http-out",
|
|
"cfg-n_socks-out",
|
|
"cfg-n_shadowtls-out"
|
|
]
|
|
},
|
|
{
|
|
"type": "anytls",
|
|
"tag": "cfg-n_anytls-out",
|
|
"server": "a.example.com",
|
|
"server_port": 443,
|
|
"password": "secret",
|
|
"idle_session_check_interval": "30s",
|
|
"idle_session_timeout": "30s",
|
|
"tls": {
|
|
"enabled": true,
|
|
"server_name": "a.example.com",
|
|
"insecure": false
|
|
}
|
|
},
|
|
{
|
|
"type": "vless",
|
|
"tag": "cfg-n_vless_reality_ws-out",
|
|
"server": "b.example.com",
|
|
"server_port": 443,
|
|
"uuid": "3af88561-9c69-4b19-8f7e-f08d580bc339",
|
|
"flow": "xtls-rprx-vision",
|
|
"packet_encoding": "xudp",
|
|
"tls": {
|
|
"enabled": true,
|
|
"server_name": "b.example.com",
|
|
"utls": {
|
|
"enabled": true,
|
|
"fingerprint": "chrome"
|
|
},
|
|
"reality": {
|
|
"enabled": true,
|
|
"public_key": "4UAg690QziXeelpUJoAmXiim0gfQESSiJkNfvF-o8Uw",
|
|
"short_id": "abcd"
|
|
}
|
|
},
|
|
"transport": {
|
|
"type": "ws",
|
|
"path": "/ws?ed=2048",
|
|
"headers": {
|
|
"Host": "b.example.com"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "vmess",
|
|
"tag": "cfg-n_vmess_http-out",
|
|
"server": "c.example.com",
|
|
"server_port": 80,
|
|
"uuid": "3af88561-9c69-4b19-8f7e-f08d580bc339",
|
|
"security": "auto",
|
|
"global_padding": true,
|
|
"packet_encoding": "packetaddr",
|
|
"transport": {
|
|
"type": "http",
|
|
"host": "c.example.com",
|
|
"path": "/path",
|
|
"method": "GET"
|
|
}
|
|
},
|
|
{
|
|
"type": "trojan",
|
|
"tag": "cfg-n_trojan_grpc-out",
|
|
"server": "d.example.com",
|
|
"server_port": 443,
|
|
"password": "secret",
|
|
"tls": {
|
|
"enabled": true,
|
|
"server_name": "d.example.com",
|
|
"min_version": "1.2",
|
|
"max_version": "1.3",
|
|
"handshake_timeout": "15s",
|
|
"cipher_suites": "TLS_AES_128_GCM_SHA256"
|
|
},
|
|
"transport": {
|
|
"type": "grpc",
|
|
"service_name": "gs",
|
|
"permit_without_stream": true
|
|
}
|
|
},
|
|
{
|
|
"type": "shadowsocks",
|
|
"tag": "cfg-n_ss-out",
|
|
"server": "e.example.com",
|
|
"server_port": 8388,
|
|
"password": "secret",
|
|
"method": "aes-256-gcm",
|
|
"multiplex": {
|
|
"enabled": true,
|
|
"protocol": "h2mux",
|
|
"max_connections": 4,
|
|
"padding": true
|
|
},
|
|
"udp_over_tcp": {
|
|
"enabled": true,
|
|
"version": 2
|
|
}
|
|
},
|
|
{
|
|
"type": "hysteria2",
|
|
"tag": "cfg-n_hy2-out",
|
|
"server": "f.example.com",
|
|
"server_port": 443,
|
|
"server_ports": "20000:30000",
|
|
"password": "secret",
|
|
"hop_interval": "30s",
|
|
"up_mbps": 100,
|
|
"down_mbps": 500,
|
|
"obfs": {
|
|
"type": "salamander",
|
|
"password": "obfspass"
|
|
},
|
|
"bbr_profile": "conservative",
|
|
"tls": {
|
|
"enabled": true,
|
|
"server_name": "f.example.com"
|
|
}
|
|
},
|
|
{
|
|
"type": "snell",
|
|
"tag": "cfg-n_snell-out",
|
|
"server": "g.example.com",
|
|
"server_port": 443,
|
|
"psk": "psk123456789012",
|
|
"userkey": "ukey",
|
|
"reuse": true,
|
|
"obfs_mode": "http",
|
|
"obfs_host": "bing.com",
|
|
"version": 4
|
|
},
|
|
{
|
|
"type": "http",
|
|
"tag": "cfg-n_http-out",
|
|
"server": "h.example.com",
|
|
"server_port": 8080,
|
|
"username": "u",
|
|
"password": "p"
|
|
},
|
|
{
|
|
"type": "socks",
|
|
"tag": "cfg-n_socks-out",
|
|
"server": "i.example.com",
|
|
"server_port": 1080,
|
|
"username": "u",
|
|
"password": "p",
|
|
"version": "5"
|
|
},
|
|
{
|
|
"type": "shadowtls",
|
|
"tag": "cfg-n_shadowtls-out",
|
|
"server": "j.example.com",
|
|
"server_port": 443,
|
|
"password": "secret",
|
|
"version": 3,
|
|
"tls": {
|
|
"enabled": true,
|
|
"server_name": "j.example.com"
|
|
}
|
|
}
|
|
],
|
|
"route": {
|
|
"rules": [
|
|
{
|
|
"inbound": "dns-in",
|
|
"action": "hijack-dns"
|
|
},
|
|
{
|
|
"action": "sniff"
|
|
},
|
|
{
|
|
"action": "resolve",
|
|
"strategy": "prefer_ipv4"
|
|
},
|
|
{
|
|
"rule_set": "geoip-cn",
|
|
"action": "route",
|
|
"outbound": "direct-out"
|
|
}
|
|
],
|
|
"rule_set": [
|
|
{
|
|
"type": "remote",
|
|
"tag": "geoip-cn",
|
|
"format": "binary",
|
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
|
|
"update_interval": "24h",
|
|
"http_client": "hp-main-out"
|
|
},
|
|
{
|
|
"type": "remote",
|
|
"tag": "geosite-cn",
|
|
"format": "binary",
|
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
|
|
"update_interval": "24h",
|
|
"http_client": "hp-main-out"
|
|
}
|
|
],
|
|
"auto_detect_interface": true,
|
|
"default_domain_resolver": {
|
|
"server": "default-dns",
|
|
"strategy": "prefer_ipv4"
|
|
},
|
|
"final": "main-out"
|
|
},
|
|
"http_clients": [
|
|
{
|
|
"tag": "hp-main-out",
|
|
"detour": "main-out"
|
|
}
|
|
],
|
|
"experimental": {
|
|
"cache_file": {
|
|
"enabled": true,
|
|
"path": "/etc/homeproxy/cache.db"
|
|
}
|
|
},
|
|
"$schema": "https://sing-box.sagernet.org/schema.json"
|
|
}
|