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.
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:
| Client | Price |
|---|---|
| Shadowrocket | ~$2.99 |
| Stash | More |
| Loon | Mid |
| sing-box | Free |
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
| Platform | Source |
|---|---|
| iOS | App Store — search sing-box (may need a non-local Apple ID) |
| Android | Google Play, or the APK from official GitHub Releases |
| Windows / macOS / Linux | Official 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
- Open sing-box
- Profiles
- Top right +
- Type: Remote
- Name: anything
- URL: your subscription link
- Save and wait for the fetch
- Tap the profile so it becomes active
Step 8 again — imported is not enabled.
- Back on the home screen, flip the toggle
- 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:
| Clash | sing-box | Purpose |
|---|---|---|
proxies | outbounds | Node definitions |
proxy-groups | outbounds (selector type) | Policy groups |
rules | route.rules | Routing |
mixed-port | inbounds | Local listener |
MATCH fallback | route.final | Default 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:
| Situation | Why |
|---|---|
| Residential peak hours | Many home lines see 3–10% loss in the evening |
| Mobile networks | Considerably more loss than fixed lines |
| Mediocre long-haul routes | Many hops, more opportunity to drop |
Where it fails:
- Your network restricts UDP. Some campus and corporate networks block it outright.
- UDP is being actively disrupted at that moment.
- Large clock skew between client and server also causes trouble.
Full comparison: SS vs VMess vs Trojan vs Hysteria2.
Common problems
Config parse failure
JSON syntax. Usually:
- A trailing comma after the last element
- Curly quotes instead of straight ones
- Unbalanced brackets
Any JSON validator will point at the line.
Subscription imports empty
- Wrong format (Clash YAML given to sing-box)
- Dead link
- No route out, so the fetch never completed
Walkthrough: No nodes after importing.
iOS keeps dropping
The usual iOS suspects, identical to Shadowrocket:
- Connect On Demand off
- iCloud Private Relay off
- 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.
Read next
- Shadowrocket setup
- SS vs VMess vs Trojan vs Hysteria2
- Clash Verge Rev setup
- How to actually test a free node
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.