sing-box
$ sing-box Community High Risksing-box is a high-performance Go proxy engine supporting inbound/outbound HTTP, SOCKS5, Shadowsocks, VMess, VLESS, and TUN virtual interfaces. Provides sing-box check and sing-box format for offline config validation before launching the sing-box run -c config.json daemon.
brew install sing-box Acts as a local OS network proxy daemon and TUN packet router (sing-box run); MCP servers cannot manage local sockets or TUN interfaces.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Includes non-interactive check, format, and version subcommands with clean exit codes, though run is a long-lived daemon and lacks a structured CLI query output.
sing-box check -cprovides pre-flight config validationsing-box runoperates as a blocking daemon
Offline check is safe, but running TUN inbounds alters host routing tables with root privileges and config.json contains plaintext proxy secrets.
- TUN mode requires root/admin and alters system routing
- Proxy credentials reside in plaintext inside
config.json
Single static Go binary available via Homebrew, Linux packages, go install, and GitHub Releases.
- Available via
brew install sing-boxand cross-platform releases
Consolidates dozens of proxy protocols, DNS routing, and rule-sets into one fast binary.
- Unified HTTP/SOCKS5/Shadowsocks/TUN routing engine
Actively maintained SagerNet open-source project (SagerNet/sing-box) under GPL-3.0.
- Active releases in
SagerNet/sing-box
Detailed structured configuration reference at sing-box.sagernet.org and built-in --help.
- Official configuration docs at sing-box.sagernet.org
Security, Auth & Guardrails
Stores proxy server endpoints, user credentials, and TLS keys inside JSON configuration files passed via -c (e.g. config.json).
Free, GPL-3.0 open-source Go binary.
# sing-box Agent Rules - Always run `sing-box check -c config.json` before starting or reloading a proxy config. - Never enable `tun` inbound or system-proxy flags unattended—TUN modifies host routing tables and requires elevated privileges. - Avoid printing raw `config.json` secrets into logs.
Agent-Ready Command Recipes
Safe Read-Only Queries
sing-box check -c config.json
Parses and validates all inbound, outbound, and route rules in config.json with exit code 0 on success.
sing-box version
Outputs the sing-box version, Go runtime, and compiled feature tags (e.g., with_gvisor, with_clash_api).
Controlled Writes & Previews
sing-box format -w -c config.json
Canonicalizes JSON indentation and key ordering in config.json after validating syntax.
Strengths for Agents
- +
sing-box check -ccatches schema and routing errors offline before starting the daemon. - + Single static binary covering HTTP, SOCKS5, Shadowsocks, and TUN networking.
Caveats & Pitfalls
- ! TUN inbounds require elevated privileges and alter host-wide network routing.
- !
config.jsontypically stores proxy passwords/UUIDs in plaintext.