中文

Tutorials

sing-box setup: free, and every protocol supported

Installing and configuring sing-box on Windows, macOS, iOS and Android. Why it is the only free full-featured option on iPhone, how its JSON config maps onto Clash concepts, and when Hysteria2 is worth switching to.

By MaoUpdated 2026-08-215 min read

sing-box occupies a different niche from Clash: it is a general proxy platform. Any protocol, every platform, official clients, no cost.

Why it is worth having

On iOS it is the only free complete option

The most practical reason:

ClientPrice
Shadowrocket~$2.99
StashMore
LoonMid
sing-boxFree

Feature-wise it gives up nothing, and its protocol coverage is broader. You pay in interface polish.

New protocols arrive here first

Hysteria2, TUIC, VLESS + Reality, AnyTLS — sing-box is typically earliest and most complete.

If your provider issues nodes on a very recent protocol, sing-box is the safe bet.

One config, every device

Windows, macOS, Linux, iOS and Android all have official clients sharing a config format. Set it up once.

Installing

PlatformSource
iOSApp Store — search sing-box (may need a non-local Apple ID)
AndroidGoogle Play, or the APK from official GitHub Releases
Windows / macOS / LinuxOfficial GitHub Releases

On desktop you choose between the command-line core (write your own config) and a community GUI wrapper. Beginners should take the GUI, or simply use Clash Verge Rev, which handles most of the same protocols — see Clash Verge Rev setup.

Importing a subscription

Mobile

  1. Open sing-box
  2. Profiles
  3. Top right +
  4. Type: Remote
  5. Name: anything
  6. URL: your subscription link
  7. Save and wait for the fetch
  8. Tap the profile so it becomes active

Step 8 again — imported is not enabled.

  1. Back on the home screen, flip the toggle
  2. Allow the VPN configuration prompt on first run

Desktop

The GUI flow is similar. The command-line core reads a config.json:

sing-box run -c config.json

What the config looks like

sing-box uses JSON, not YAML:

{
  "log": { "level": "info" },
  "dns": {
    "servers": [
      { "tag": "remote", "address": "https://8.8.8.8/dns-query" },
      { "tag": "local", "address": "223.5.5.5", "detour": "direct" }
    ]
  },
  "inbounds": [
    { "type": "mixed", "listen": "127.0.0.1", "listen_port": 7890 }
  ],
  "outbounds": [
    {
      "type": "hysteria2",
      "tag": "proxy",
      "server": "example.com",
      "server_port": 443,
      "password": "your-password",
      "tls": { "enabled": true, "server_name": "example.com" }
    },
    { "type": "direct", "tag": "direct" }
  ],
  "route": {
    "rules": [
      { "rule_set": "geoip-cn", "outbound": "direct" },
      { "rule_set": "geosite-cn", "outbound": "direct" }
    ],
    "final": "proxy"
  }
}

Mapping to Clash concepts:

Clashsing-boxPurpose
proxiesoutboundsNode definitions
proxy-groupsoutbounds (selector type)Policy groups
rulesroute.rulesRouting
mixed-portinboundsLocal listener
MATCH fallbackroute.finalDefault outbound

Using a subscription, you never touch any of this.

Hysteria2 deserves its own section

sing-box handles Hysteria2 best, and Hysteria2 is notably better than TCP-based protocols on lossy connections.

It runs on QUIC (UDP), with its own congestion control and forward error correction, so a few dropped packets do not collapse throughput the way TCP retransmission does.

Where it wins:

SituationWhy
Residential peak hoursMany home lines see 3–10% loss in the evening
Mobile networksConsiderably more loss than fixed lines
Mediocre long-haul routesMany hops, more opportunity to drop

Where it fails:

Full comparison: SS vs VMess vs Trojan vs Hysteria2.

Common problems

Config parse failure

JSON syntax. Usually:

Any JSON validator will point at the line.

Subscription imports empty

Walkthrough: No nodes after importing.

iOS keeps dropping

The usual iOS suspects, identical to Shadowrocket:

  1. Connect On Demand off
  2. iCloud Private Relay off
  3. Low Power Mode off

Details in Shadowrocket setup — the causes and fixes are the same.

You want graphical rule editing

The official client is deliberately spare here. If you want to edit rules often, browse the connection list, or route by process, Clash Verge Rev's interface is more comfortable.

What I actually run: sing-box on the iPhone, because it is free and sufficient; Clash Verge Rev on the desktop, because the interface is pleasant. Both fed by the same provider in their respective formats.

Questions people keep asking

How is sing-box different from Clash?

sing-box is a general proxy platform with the broadest protocol support — Hysteria2, TUIC, VLESS with Reality, AnyTLS — configured in JSON. Clash-family clients use YAML, have a more mature rule ecosystem and friendlier interfaces. There is heavy overlap; choose based on your nodes' protocols and which interface you prefer.

Is it really free on iOS?

Yes. The official iOS client is free on the App Store, though you may need an Apple ID from another region. It is the only free full-featured option on iPhone — Shadowrocket and Stash both cost money.

Can it use a Clash subscription?

Not the Clash YAML directly, but most providers publish a sing-box format subscription alongside it. If yours only offers Clash format, run it through a subscription converter.

Why does Hysteria2 work best here?

Hysteria2 is a first-class protocol in the sing-box ecosystem. Clash's Mihomo core supports it too, but sing-box tends to track new features sooner. For very recent protocols, sing-box usually has the best compatibility.

Written from my own testing. Conditions change; if something here has gone stale, email [email protected] and I will update it with a date.

Read next