sing-box config generator: a full client config from a subscription
Paste links, a base64 subscription, a Clash config or sing-box outbounds and get a whole client config.json that sing-box runs as it is: DNS through the VPN, TUN for the whole device or a local proxy, several servers with the fastest picked automatically, and your country's sites direct if you want. Pick 1.12–1.13 or 1.14+: the fields that changed between them are written the way your version reads them. Nothing leaves your browser.
Runs in your browser, nothing is sent
Check your connection
Links and subscriptions
Network and router
DNS and addresses
sing-box versionsing-box version prints it
How programs get in
sing-box creates a virtual adapter and takes the traffic of every program. Needs administrator rights.
What goes through the VPN
Everything goes through the VPN except the local network.
Paste servers and config.json shows up here.
Everything is worked out in your browser: keys and addresses are not sent anywhere.
Veli builds the config itself: paste a link, a subscription or a file into Add. Free, no sign-up.
Download VeliReference
What's in the config
Each section of the config.json the generator writes, in order.
- log
- What sing-box writes to its log: level info, with the time.
- dns
- Two resolvers. remote is DNS over HTTPS to 1.1.1.1 sent through the VPN: it answers ordinary lookups. local is the system resolver: it resolves the servers' own names and, with your country direct, the country's sites.
- inbounds
- How traffic gets into sing-box: a TUN adapter with auto_route and strict_route, or a mixed proxy (SOCKS5 and HTTP) on 127.0.0.1:10808.
- outbounds
- Your servers, then direct. With several servers, proxy is a selector to switch by hand and auto is a urltest that keeps the fastest.
- route
- Rules in order: sniff reads the site name from the connection, hijack-dns hands DNS queries to the dns section, the local network goes direct, then your country's lists; everything else goes to proxy. default_domain_resolver resolves server names with local.
- route.rule_set
- The country's lists from SagerNet: sites from sing-geosite and networks from sing-geoip, in binary .srs, downloaded through proxy.
- experimental.cache_file
- cache.db keeps the downloaded lists and the server picked in proxy between starts.
sing-box 1.12–1.13 and 1.14+: what's written differently
The generator writes each field the way the chosen version reads it. The table comes from the same code that builds the config.
| Field | sing-box 1.12–1.13 | sing-box 1.14+ |
|---|---|---|
| route.rule_set[] Which outbound downloads the lists. 1.14 added http_client, deprecated download_detour and removes it in 1.16; 1.12 and 1.13 don't know http_client and won't start with it. Docs/configuration/rule-set/configuration/shared/http-client/deprecated | "download_detour": "proxy" | "http_client": { "detour": "proxy" } |
The same in both versions
- dns.servers[]since 1.12
- DNS servers are objects with type and server. Address strings like tls://8.8.8.8 are deprecated since 1.12 and refused since 1.14.
- route.default_domain_resolversince 1.12
- Server names are resolved by default_domain_resolver, not by outbound rules in DNS.
- route.rules[].actionsince 1.11
- sniff and hijack-dns are rule actions. The sniff fields on inbounds and the block and dns outbounds were removed in 1.13.
- inbounds[].addresssince 1.10
- TUN addresses go in one address list; inet4_address and inet6_address were removed in 1.12.
- inbounds[].stacksince 1.15
- stack isn't written: it is deprecated in 1.15, where gvisor and mixed need a build tag, so sing-box takes its default stack.
Countries and their lists
Which SagerNet lists send a country direct. Where there is no list of sites, the country's own domains go direct.
| Country | Sites | Networks |
|---|---|---|
| China | geosite-cn | geoip-cn |
| Iran | geosite-category-ir | geoip-ir |
| Russia | geosite-category-ru | geoip-ru |
| Turkey | .tr | geoip-tr |
| UAE | .ae .xn--mgbaam7a8h | geoip-ae |
| Vietnam | .vn | geoip-vn |
| Indonesia | .id | geoip-id |
| India | .in .xn--h2brj9c | geoip-in |
| Pakistan | .pk .xn--mgbai9azgqp6j | geoip-pk |
| Egypt | .eg .xn--wgbh1c | geoip-eg |
| Saudi Arabia | .sa .xn--mgberp4a5d4ar | geoip-sa |
| Uzbekistan | .uz | geoip-uz |
| Kazakhstan | .kz .xn--80ao21a | geoip-kz |
| Belarus | .by .xn--90ais | geoip-by |
| Ukraine | .ua .xn--j1amh | geoip-ua |
| Hong Kong | .hk .xn--j6w193g | geoip-hk |
| Myanmar | .mm | geoip-mm |
| Turkmenistan | geosite-category-tm | geoip-tm |
FAQ
How do I make a sing-box config from a subscription?
Open the subscription address in the browser and copy what it shows: a base64 block, a list of links or a Clash config. Paste it here, pick the sing-box version, TUN or a local proxy and the routing, then download config.json and start it with sing-box run -c config.json. The page doesn't open the address itself and sends nothing anywhere.
What changed in the sing-box 1.12 config?
DNS servers got a new format: an object with type and server instead of an address string like tls://8.8.8.8, and address_resolver became domain_resolver. Server names are resolved by route.default_domain_resolver or by domain_resolver on the outbound, not by outbound rules in DNS. The old format still worked in 1.12 and 1.13 with a warning; 1.14 refuses it.
Why does sing-box warn that legacy DNS servers are deprecated?
The config has DNS servers written the old way, like "address": "https://…". sing-box 1.12 and 1.13 start with a warning, 1.14 and newer don't start at all. This generator writes only the new format, {"type": "https", "server": "1.1.1.1"}, so the warning doesn't come up.
TUN or a system proxy?
TUN creates a virtual network adapter and takes the traffic of every program: games, terminals, apps that ignore proxy settings. It needs administrator rights (sudo on macOS and Linux). A local proxy on 127.0.0.1:10808 needs no rights, but only the programs pointed at it use the VPN: a browser or the system proxy.
What's different in a config for sing-box 1.14?
Remote rule sets are downloaded through http_client: {"detour": "proxy"}. The old download_detour is deprecated in 1.14 and removed in 1.16, and 1.12–1.13 don't know http_client, so the generator writes the one your version reads. The rest of the config is the same for both.