One listener, three jobs
The proxy, the admin API and the console share a port. TLS terminates on a second listener and hands requests to the same router.
WISP · SINGLE-BINARY PROXY
Wisp is a self-hosted Wisp proxy with its console built in. Run one file, open one page, and manage tokens, live traffic and policy — no second server, no config sprawl.
./wisp --port 6680 --admin-password 'choose-one'
01 — WHY ONE BINARY
No sidecar, no second port for the UI, no external database. The binary serves the Wisp WebSocket, the admin API and the console from one axum app; configuration and traffic history live next to it.
The proxy, the admin API and the console share a port. TLS terminates on a second listener and hands requests to the same router.
config.json and stats.json are written where you run the binary. --dir moves them; nothing is hidden in a system database.
Set an admin password at startup and the console asks for it. The hash lives in config.json; sessions are cookies.
02 — THE CONSOLE
Every screen ships inside the binary. State, streams, tokens, policy and security — one page, no separate dashboard to deploy.
Proxy state, totals, per-minute bytes and connections, top destinations and the newest streams.
Screenshots from the real console running with demo traffic.
03 — WHAT IT DOES
Tokens, accounting, charts, TLS and policy — the parts you actually operate, not a demo.
Create named tokens, copy their URLs, rotate secrets, disable or delete them. Each token keeps its own counters.
Host, port, resolved IP, token, start time, duration, upload and download bytes, state and close reason for every stream.
Bytes in and out per minute and connections opened, over 1 hour, 6 hours or 24 hours.
A rustls listener serves the console over HTTPS and the proxy over WSS; the plain listener keeps working.
A salted SHA-256 password hash, a session cookie on every admin route, and a login screen instead of an open console.
Allow or block private and loopback destinations, require tokens, and set the log level.
The NSH web app is compiled into the binary. No Node runtime, no separate web server, no build step on the target.
Light, dark and system themes, English and Chinese, a collapsible sidebar, keyboard operation and phone layouts.
04 — HOW IT WORKS
Clients speak Wisp v1 over a WebSocket. The server gates the token, applies the destination policy, opens a TCP stream and accounts every byte. The console and admin API are served by the same app.
Frame: [type u8][stream id u32 LE][payload]
| Byte | Packet | Payload |
|---|---|---|
| 0x01 | CONNECT | stream type, port, hostname |
| 0x02 | DATA | payload bytes |
| 0x03 | CONTINUE | buffer credit |
| 0x04 | CLOSE | reason code |
TCP only; UDP CONNECTs are refused with 0x41. Close reasons cover voluntary, network, invalid, unreachable, timeout, refused, blocked and throttled.
05 — SECURITY
The console can change policy, mint tokens and stop the proxy. Treat it like an admin surface: password, TLS, and a service account that cannot touch the rest of the box.
[Service]
User=wisp
ExecStart=/usr/local/bin/wisp --tls-cert /var/lib/wisp/tls/cert.pem \
--tls-key /var/lib/wisp/tls/key.pem --tls-port 6681
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
NoNewPrivileges=yes
A self-signed certificate is fine on a private network; browsers warn until it is accepted.
06 — EVERYWHERE
The console follows the system theme, switches between English and Chinese, and turns the traffic table into cards on a narrow screen.




Same binary, same data. The layout adapts; the console does not become a second product.
07 — QUICK START
Build once, run it anywhere. The console is embedded, so there is nothing else to install on the target.
Rust 1.85+ and the NSH CLI build the console and embed it into the server.
scripts/build-release.sh
Pick a port, set an admin password, and add TLS if clients will use WSS.
server/target/release/wisp \
--port 6680 \
--admin-password 'choose-one' \
--tls-cert cert.pem --tls-key key.pem --tls-port 6681
Sign in, create a token, and point a client at its URL.
https://192.168.1.10:6681/
wss://192.168.1.10:6681/t/<secret>/
On Windows the binary is wisp.exe; use PowerShell and backslash paths. The plain listener stays on ws://…:6680/.
08 — GET WISP
The release binary embeds the console. Build it from source, or drop the file on a server and run it.
wisp · glibc · systemd unit in deploy/
wisp · run from Terminal
wisp.exe · run from PowerShell
Version 0.2.0 · MIT license · Rust 1.85+ and NSH to build.
09 — FAQ
No. The console is compiled into the binary and served by the same axum app as the proxy and the API.
In the working directory: config.json and stats.json. --dir moves both. Tokens are plaintext in config.json.
Yes. Pass --tls-cert and --tls-key; the TLS listener defaults to port 6681 and serves both HTTPS and WSS. The plain listener stays available.
Yes. Point unkernel at ws://host:6680/ or a token URL such as ws://host:6680/t/<secret>/. On an HTTPS page, use the WSS listener.
No. Wisp v1 TCP streams are implemented; UDP CONNECTs are refused with close code 0x41.
The server ends the stream when either side closes, records the close reason, and closes the destination socket. Active streams disappear from the dashboard immediately.