English
Deliberate design differences
These differences are deliberate: ours does not try to match the reference here.
| What | In the reference | Ours | Why |
|---|---|---|---|
| Configuration format | sing-box JSON, Xray JSON | Only our own YAML; JSON is neither read nor converted | JSON would bring the quirks of sing-box's Go decoding (case-insensitive keys, duplicate keys, null) into loading and reload; YAML errors point at a line and column |
| Entities | Lists with tag | Maps "name → description"; tag is an error | Uniqueness of names is ensured by the structure |
| Entity type | The type field | The key of the protocol/kind block (vless:, transport: {ws:}, rank: {delay:}) | One way to write it; protocol-dependent blocks (tls, transport, mux) are nested in its block |
| Addresses | server + server_port, listen + listen_port | One host:port string; the pair is an error | Shorter, no desynchronization |
| Groups | selector, urltest outbounds; Xray balancers | The groups section with members and rank: manual|order|delay|stable, pick, spread | One model instead of three; balancing among several best ones |
| Refusal | The block outbound, the reject action | Only the to: block action; a block outbound is an error (crates/native-config/src/entity.rs, outbound) | One rule — one action; final: block creates the hidden outbound itself |
| A rule | action + fields in one object, type: logical, invert | match + exactly one of do/to; the logic any/all/not (modules/routing/router/src/syntax.rs) | It is visible whether a rule ends the route |
route.final | An outbound name; otherwise the first one | Mandatory; accepts everything to does | No implicit "first outbound" |
| Rule-sets | route.rule_set | The rule_sets section; route.rule_set is an error (crates/native-config/src/rules.rs, route) | Rule-sets are needed by both route and dns |
| An outbound's DNS | domain_resolver on dial, route.default_domain_resolver | Leading dns.rules rules with outbound: <name>/"*" (modules/dns/dns/src/syntax.rs, resolver_prefix) | All DNS in one section |
| DNS servers | dns.servers as a list, type: tls | dns.upstreams as a map, the kind dot, bootstrap instead of a server's domain_resolver | tls is a settings block; bootstrap chains are impossible by construction |
| Fakeip | A fakeip server, a route action to it | The dns.fakeip pool and the do: fakeip label, the answer is transformed after to (modules/dns/dns/src/router.rs, label_fake_ip) | Fakeip does not reach internal queries; NXDOMAIN/empty answers are honest |
| Independent DNS cache | independent_cache is optional (deprecated in 1.14) | Always separate per upstream | One upstream — one answer |
| Repetition in YAML | — | Anchors, aliases, merge keys, tags are forbidden (libs/yaml); the replacement is outbounds.defaults | Repetition is visible in the dashboard and when editing |
| Subscriptions | Not in sing-box (outbound providers only in forks) | The subscriptions section; servers are <subscription>/<name>, referenced only through groups | The composition changes on update |
| Reload | Recreates everything | Rebuilds only what changed; reload policies on the section, the inbound, the outbound, the rule (crates/api/src/dispatch.rs, Policies) | Connections are not torn without need |
| Capture | tun with auto_route/auto_redirect | tun as in the reference and, in addition, tproxy + auto_nft with the capture set computed from the rules; to: bypass | With auto_nft, traffic bypassing the proxy stays in the kernel |
| Build | Build tags | Modules and features; a type outside the build — is not built in (feature …) (crates/kernel/src/modules.rs) | Small binaries for routers |
| Management | Clash API, V2Ray API | Our own Admin API and dashboard (app/ui) | Working with the YAML text, preview/apply/rollback |
| Cache file | A bbolt database | A directory of journals (modules/system/cache/src/enabled.rs) | Writing without blocking the data path |
Support for other formats is not added "just in case".