aceberg/unbox
1
0
Fork
You've already forked unbox
0
CLI tool for sing-box: auto switch proxies; convert VLESS, Trojan and Hysteria2 links into sing-box config https://hub.docker.com/r/aceberg/unbox
  • Go 97%
  • Makefile 1.9%
  • Dockerfile 1%
  • Shell 0.1%
2026年07月10日 03:12:09 +07:00
.github README upd 2026年04月26日 21:46:24 +07:00
android Release v0.1.2 2026年04月28日 04:08:13 +07:00
assets Logo and Screenshot 2026年06月17日 01:47:04 +07:00
configs Release 0.1.0 2026年04月26日 18:30:34 +07:00
internal Better func names 2026年07月10日 03:12:09 +07:00
pkg Better func names 2026年07月10日 03:12:09 +07:00
.gitignore Parse VLESS 2026年04月22日 05:22:08 +07:00
.goreleaser.yaml Release v0.1.2 2026年04月28日 04:08:13 +07:00
.version Release v0.3.2 2026年07月02日 21:26:07 +07:00
CHANGELOG.md Release v0.3.2 2026年07月02日 21:26:07 +07:00
Dockerfile Release v0.2.2 2026年06月13日 04:24:03 +07:00
go.mod Select server 2026年06月04日 22:27:38 +07:00
LICENSE Initial commit 2026年04月21日 15:16:29 +07:00
main.go Struct to URL 2026年07月01日 14:55:50 +07:00
Makefile Struct to URL 2026年07月01日 14:55:50 +07:00
README.md Release v0.3.1 2026年07月01日 19:34:00 +07:00

Main-Docker Binary-release Binary-Android

unbox


Unbox is a CLI tool for sing-box that can do 5 things:

  1. Convert a file with vless://,hysteria2://,trojan:// links to full sing-box config
  2. Convert sing-box config outbounds to URLs
  3. Remove unreachable nodes from sing-box config file (uses sing-box Clash API)
  4. Remove duplicate outbounds from sing-box config file
  5. Keep connection alive. Switch to another proxy immediately if not. Optional - switch to a faster proxy (uses sing-box Clash API)

Screenshot

Expand

Screenshot_1

Install

Expand

Docker

There are DockerHub and GitHub images:

docker pull aceberg/unbox
docker pull ghcr.io/aceberg/unbox

Binary

All available binaries are listed in the latest release.
For amd64 there is an apt repo.

Android and Termux

For arm64 there are android and termux.deb files.

Convert file with URLs to sing-box config

Expand

Here VLESS.txt is a file with vless://,hysteria2://,trojan:// links. Unbox will ignore anything else in the file, including other protocols and comments.

unbox -f VLESS.txt

In this example sing-box.tmpl.json is a template sing-box config and sing-box.json is where unbox will put generated config.

unbox -f VLESS.txt -t sing-box.tmpl.json -o sing-box.json -j

Docker

docker run -it -v /your/local/path:/data \
 aceberg/unbox \
 -f /data/VLESS.txt \
 -t /data/sing-box.tmpl.json \
 -o /data/sing-box.json
Key Description Default
-f Path to file with links VLESS.txt
-j Validate and Indent JSON output
-n Rename tags. If used, will rename tags to tag1, tag2...
-o Path to output file
-t Path to template sing-box config. Example here. There are only two variables available in template: {{ .Unbox_tags }} and {{ .Unbox_outbounds }}

Convert sing-box config outbounds to URLs

Expand
unbox -i sing-box.json > URLs.txt
Key Description Default
-i Path to sing-box config file

Remove unreachable nodes from sing-box config

Expand
unbox -a "http://127.0.0.1:9090" -o sing-box.json
Key Description Default
-a URL to sing-box Clash API
-as Clash API secret
-o Path to sing-box config file

Remove duplicate outbounds from sing-box config

Expand
unbox -d -o sing-box.json
Key Description Default
-d Deduplicate
-o Path to sing-box config file

Keep connection alive and switch if not

Expand

Use the -k flag to run unbox in keepalive mode

unbox -a "http://127.0.0.1:9090" -k
Key Description Default
-a URL to sing-box Clash API
-as Clash API secret
-da Delay between checks of all proxy servers (seconds). Use 0 to disable 300
-db Delay between checks of 3-4 backup servers (seconds). Use 0 to disable 30
-dm Delay between checks of the main server (seconds). Use 0 to disable 5
-ds Delay between auto switch to a faster proxy attempts (seconds). Use 0 to disable 300
-k Keepalive mode
-u URL to test proxies. https://www.gstatic.com/generate_204 will be used if empty

Thanks