Proxy Config Reference

Proxy config field reference — Clash YAML vs sing-box JSON

The same setting in both formats, with the semantic difference spelled out. Most failed migrations are not missing fields — they are fields that exist in both formats, share a name, and mean something narrower in one of them.

Ports and entry points

ConceptClash / mihomosing-box
HTTP + SOCKS on one portmixed-port: 7890inbounds[type=mixed], listen_port
Separate HTTP / SOCKSport: / socks-port:two inbounds: type: http, type: socks
TUN adaptertun: blockinbounds[type=tun]
LAN exposureallow-lan: true + bind-addresslisten: "0.0.0.0" per inbound

allow-lan: true without bind-address is the usual "phone cannot connect" cause. On Windows the Windows Firewall does the same thing — the adapter is up, the port is bound to localhost only.

DNS

ConceptClash / mihomosing-box
Enable DNSdns.enable: truedns.servers non-empty
Synthetic answersenhanced-mode: fake-ipno fake-ip concept — always resolves
Bypass listfake-ip-filterdns.rules → direct server
Bootstrap resolverdefault-nameservernot needed (servers addressed by IP or detour)
Per-outbound isolationimplicitdns.independent_cache: true

Clash can answer with a fake IP before resolving; sing-box always resolves. That is why a config with 40 fake-ip-filter entries has no direct sing-box equivalent — each entry becomes a dns.rules branch instead.

independent_cache matters more than it looks. Without it a domain resolved for direct is reused for proxy, producing a split-tunnel DNS leak that only shows up on sites whose answer differs by region.

TUN and routing

ConceptClash / mihomosing-box
Auto routetun.auto-routeroute.auto_detect_interface + tun.auto_route
Interface detectiontun.auto-detect-interfaceroute.auto_detect_interface
Stacktun.stack: mixed / gvisor / systemtun.stack: mixed / gvisor / system
DNS hijacktun.dns-hijackprotocol: dns route rule → dns-out
Block bypassnot exposedtun.strict_route
MTUtun.mtutun.mtu

strict_route has no Clash equivalent. It is what stops apps from ignoring the TUN adapter, and on Windows it closes the DNS-leak path. A migrated config that leaks DNS where Clash did not is usually missing exactly this field.

auto-route without auto-detect-interface is accepted by both formats and breaks on both. The route table gets an entry pointing at an interface that cannot carry the traffic. Symptom is "connected, no internet" — never a config error.

Rules

ConceptClash / mihomosing-box
Inline rulerules: ["DOMAIN-SUFFIX,x,DIRECT"]route.rules[{domain_suffix, outbound}]
Remote listrule-providers with behaviorroute.rule_set, format: binary
List formatdomain / ipcidr / classicalbinary .srs or JSON source
Default actionMATCH,PROXY (must be last)route.final
Skip DNS for IP rulesno-resolveimplicit

behavior is the field that fails silently. A behavior: domain provider loaded from a classical list parses, reports success, and matches nothing. Check the first non-comment line of the source file: DOMAIN-SUFFIX, means it is classical.

Proxy nodes

FieldClash / mihomosing-box
VLESS flowflow: xtls-rprx-visionflow: xtls-rprx-vision
TLS SNIservername (vmess) / sni (trojan)tls.server_name (uniform)
Skip verificationskip-cert-verify: truetls.insecure: true
uTLS fingerprintclient-fingerprint: chrometls.utls.fingerprint
Realityreality-opts.public-keytls.reality.public_key

Clash splits the SNI field by protocol — servername for vmess, sni for trojan. sing-box unifies everything under tls.server_name. Copying a Clash node block into sing-box and only changing type is how you get a TLS handshake failure against a valid certificate.

Validate before you debug

mihomo -t -f config.yaml          # Clash / Clash Verge Rev profile
sing-box check -c config.json     # sing-box
sing-box rule-set compile x.json  # rule set before deploying

A passing check means the structure is valid. It says nothing about whether auto-detect-interface is set, whether behavior matches the file, or whether independent_cache is on. Those are the failures you are actually chasing.

Working configs

clash-config-examples Complete annotated config.yaml for mihomo and Clash Verge Rev, plus a sing-box config.json — every field with what breaks when it is wrong. clash-error-codes 20 exact error strings from Clash Verge Rev, v2rayN, v2rayNG, Hiddify, sing-box and FlClash, each mapped to its failure stage. proxy-client-matrix 10 clients compared field by field: platform, core, TUN, rule system, licence, price model. subscription-format-notes base64 node lists vs Clash YAML vs sing-box JSON, and why conversion silently drops nodes.