Tunnel — publish a home server without opening a port
What it does
A NanumOS server at home or in an office usually sits behind a router, so nobody outside can reach it. The tunnel lets that server call a NanumOS server that has a public internet address (the edge) first, and the edge brings each visitor down that line to the home server. No port forwarding and no fixed address are needed.
Basics
Think of a parcel locker. You never give out your home address: visitors go to the locker in town (the edge), and your home server has a private corridor to the locker that it keeps open. The locker only sends visitors who ask for a registered name down the corridor. What to do now: type tunnel status in the terminal.
How to use it
- Bandwidth cap (edge): put
limit NAME KBPS(one tunnel) orlimit-default KBPS(all) inedge.conf, then restart the edge. Each tunnel then moves at most that many kilobytes a second (both directions together); visitors wait, nothing is dropped. - See the state:
tunnel status— "tunnel connected · links 2/2 · last connected …" or "tunnel down · why …". For programs:tunnel status --json. The checkup (os_check) row 「터널」 says the same. - Cut it off (revoke): on the edge,
tunnel revoke NAME --yes— that server's key stops working at once and its links close within a second. To use it again, join with a new invite code. - Without
--yesa command only says what it would do and changes nothing (the assistant asks with an approval card first, then adds--yes). - If the line drops, the home server reconnects by itself (starting at 0.5 s, at most 30 s apart). Meanwhile the edge shows visitors a page "the tunnel to the server is down right now" (502) that retries every 10 seconds.
How it works
tunnel originon the home server connects out to the edge's tunnel door (TCP 7844). By default it keeps two lines (links 2), so one can drop while the other carries on. Two servers joined under the same name share the load and cover for each other.- When a visitor reaches the edge's web door, the edge reads the request's
Host:and looks up which home server owns that name in itsoriginslist. A name not on the list gets 404;CONNECTor a request that names another site gets 400 — the edge is not an open proxy. - Inside the one connection each visitor gets a small stream. Each stream has its own allowance (a 256 KiB window), so one big video does not hold up other visitors. Partial video requests (Range, 206) pass through unchanged.
- The home server only connects to the places in its own
serve NAME ADDRESS:PORTlines. If the edge sent a wrong name, the home server refuses it. - Both sides ping every 5 seconds; after three missed answers the line counts as down and is dialled again.
Technical details
- Code:
user/tunnel/tunnel.c(edge, origin, commands),noise.c(Noise_IK_25519_ChaChaPoly_BLAKE2b with Monocypher's X25519, ChaCha20-Poly1305 and BLAKE2b),proto.c(records, frames, the request header, invite codes). Contractdocs/contracts/TUNNEL.md. - Frames: a 2-byte length + ciphertext (one frame); a frame = type 1 + stream number 4 + payload. Types: HELLO, OPEN (host name), OPEN_OK, DATA, FIN, RST, WINDOW, PING/PONG, BYE.
- Files: edge
edge.key,edge.conf,origins(name, public key, host names),invites(only a hash of each code); home serverorigin.key,origin.conf. State:/tmp/tunnel-UID/edge.stateandorigin.state(not saved). - HTTPS: the web door is plain HTTP today. Public HTTPS is the edge's
httpsd(certificates and the reverse proxy, NFLARE-EDGE) taking the request and handing it to this web door. - Every parser on the receiving side (records, frames, the request header, invite codes, handshake messages) is fuzzed (
tests/fuzz/tunnel).
Common questions
- Do I need to change my router? No. The home server only connects outward.
- Can the edge see my site's content? The edge moves the bytes between visitors and your server, so whoever runs the edge can see what passes (the same as with Cloudflare Tunnel). That is why the edge is a NanumOS server you run yourself.
- What if an invite code leaks? It works once and expires. If it is still unused, remove it on the edge with
tunnel revoke NAME --yes.
What this app takes
| Takes | Visitor requests that arrive at the edge (passed only to the service you published). |
| Sends | Home server → the one edge you chose: the published service's answers and this machine's public key. Nothing goes anywhere else. |
| Turn off | Home server: service tunnel stop · edge: tunnel revoke NAME --yes or service tunnel-edge stop. |
NanumOS 0.1.15511 · 2026-11-25