Hiddify Core
The engine of the Hiddify app, on its own, on the command line.
Hiddify Core (hiddify-core) is the part of the Hiddify app that makes the connection. You can run the same engine without the app, with one command, on a server, a router or a computer without a screen.
Where can I use it?
-
Inside the Hiddify app
On Android, iOS, Windows, macOS and Linux, this core works behind the connect button.
-
On a server
A proxy client or server with no desktop, running as an always-on service.
-
On a router
Install it on OpenWrt so every device at home goes through it. OpenWrt guide
-
On a computer
On Linux and Windows, as a local proxy or a VPN for the whole system (on macOS, use the Hiddify app).
How does it work?
Give the core only your proxies; it builds the rest.
flowchart LR
A["Links, a subscription<br/>or a Clash / Xray config"] --> B(("hiddify-core"))
B --> C["Local proxy<br/>127.0.0.1:12334"]
B --> D["VPN for the whole system<br/>(TUN)"]
The core is built on hiddify-sing-box, Hiddify's version of sing-box. So every sing-box config works in it, and it adds dozens of protocols and anti-censorship tricks that upstream sing-box does not have.
Install
This command detects your system and processor, installs the core and sets it up as a service:
The config is /etc/hiddify-core/config.json. After editing it, restart the service:
On OpenWrt: /etc/init.d/hiddify-core restart
Get the file for your system from the releases page and unpack it.
- Linux: take
hiddify-core-linux-<processor>.tar.gz(for exampleamd64orarm64). Keeplibcronet.sonext tohiddify-core, and run./hiddify-corefrom a terminal. - Windows: take
hiddify-lib-windows-amd64.tar.gz. The command-line program in it isHiddifyCli.exe: run it from a terminal, with the same commands as on this page (HiddifyCli.exe run -c links.txt). - macOS: there is no command-line build for macOS. Use the Hiddify app, or the Docker image below.
HiddifyCli is now hiddify-core
The command-line program used to be called HiddifyCli. Since version 5.9 it is called hiddify-core, and the examples on this page use that name. Only the Windows build still names the file HiddifyCli.exe; the commands are the same.
Run: run or srun?
Pick one, depending on what you have:
-
run: you only have proxies
Share links, a subscription link, or a Clash or Xray config.
The core builds the rest of the config by itself: a local proxy or a VPN, DNS, routing and automatic choice of the fastest server.
-
srun: you have a full sing-box config
A config that must run exactly as written, such as a server config.
The core adds nothing to it and runs it like sing-box itself, with every Hiddify feature.
run examples
A file of links, one link per line:
Or a subscription link directly, which updates by itself:
An HTTP and SOCKS5 proxy opens on 127.0.0.1:12334. Point your browser or apps to it.
Every app goes through the VPN. Needs root or administrator rights.
What can run read?
- Links of every protocol the app supports, one per line, plain or base64
- Subscription links, even inside a file next to other links
- A sing-box JSON config (only its
outboundsandendpointsare taken) - A Clash or mihomo YAML config (its
proxiessection) - An Xray JSON config
- A WireGuard
.conffile
With --full-config, the inbounds, DNS and rules of a sing-box config are kept too.
srun tips
| You want | Command |
|---|---|
| Several files, merged together | hiddify-core srun -c base.json -c outbounds.json |
Every .json file in a folder |
hiddify-core srun -C /etc/hiddify-core/conf.d |
| Read from standard input | cat config.json \| hiddify-core srun -c stdin |
- Reload without downtime: send
SIGHUP; the new config is checked first. - Stop:
SIGINTorSIGTERM.
From proxies to a full config you can edit by hand
- Turn links into sing-box outbounds:
hiddify-core parse links.txt -o outbounds.json - Build the full client config:
hiddify-core build -c outbounds.json -o config.json - Edit
config.jsonand run it:hiddify-core srun -c config.json
What does it add to sing-box?
-
Xray transports
XHTTP, mKCP, XDRIVE, finalmask, raw and VLESS encryption, inside sing-box itself.
-
More protocols
Free WARP, AmneziaWG, Psiphon, Mieru, Sudoku, TrustTunnel, reverse tunnel and more.
-
Tunnels over DNS
DNSTT, MasterDNS and Soar, which find working resolvers by themselves.
-
Anti-censorship tricks
-
Groups and monitoring
Balancer, fallback, better URL test and background monitoring of delay and exit IP.
-
Smart DNS
Quick comparison
| Hiddify Core | sing-box | Xray | mihomo | |
|---|---|---|---|---|
| sing-box configs | ||||
| Reads links, subscriptions, Clash and Xray | Xray only | Clash only | ||
| Builds a client config from proxies by itself | ||||
| XHTTP and mKCP transports | ||||
| WARP, AmneziaWG, Psiphon, DNS tunnels | partly | |||
| Control API | gRPC and Clash API | Clash API | gRPC | Clash API |
- Coming from Xray? Xray links and JSON configs (even the
extrafield of XHTTP) work as they are, and you can use them next to Hysteria2, WARP and DNS tunnels in one config. - Coming from mihomo? A Clash subscription works with
runwithout changes, with the groups you know (select, URL test, fallback, balancer).
Next steps
-
Every command and flag of
hiddify-core. -
A page for every protocol, transport and DNS feature.
-
Install it on a router, step by step.
-
What the app and the core need to know about version 5. Code: hiddify-core and hiddify-sing-box.