Commit Graph
20 Commits
Author SHA1 Message Date
TZGyn d5689ce70d Add connect-on-launch and notarized desktop release packaging 2026-10-30 22:25:03 +08:00
TZGyn 87f82e2c47 Add the Fyne desktop app (M5)
A cross-platform desktop UI over the same client service: status,
routes with add/remove/copy/open, live logs, settings, official-profile
import, and start/stop. It uses the existing JSON config and offers to
stop a running CLI daemon so the two do not fight over routes. The app
can autostart the service, refreshes status/config every few seconds,
and builds as a macOS .app via scripts/build-desktop-app.sh.
2026-10-30 22:21:58 +08:00
TZGyn ddcea99f37 Add a cross-platform desktop app (Fyne)
The tunnel client now has a desktop UI over the same internal/client
service: status with live connection state, routes with add/remove/copy,
live logs, settings, profile import, and a start/stop button that runs
the bridge in-process. It uses the existing ~/.config/tunnel/config.json
and shows a warning banner with a stop button when the CLI service is
already running and claiming the routes.
2026-10-29 21:32:21 +08:00
TZGyn e4ed31f161 Document the Homebrew release and release process 2026-10-26 06:43:32 +08:00
TZGyn ebae420ab1 Add the native Go client and finish M3 hardening
The new cmd/tunnel client keeps the API URL and tunnel identity in
~/.config/tunnel/config.json (0600), provisions the key/CSR and
certificate, terminates TLS, proxies to local routes, reloads routes
without a restart, and runs as a background service. `tunnel import`
takes over an existing official CLI profile, preserving its tunnel ID,
token, key and certificate.

Server hardening: per-IP and per-tunnel rate limits for creates and
binds, a CA cool-down after repeated ACME failures, a startup sweep for
stale _acme-challenge records, admin metrics, a 60-second half-close
timeout, and separate prioritized control / ordered data bridge queues
(with `end` ordered after the final bytes). The dashboard shows the new
metrics.
2026-10-26 00:32:31 +08:00
TZGyn cba7d2366b Fix truncated ClientHello parsing for some sizes
The handshake length expression combined shifts with +/|, so when bit 2
of the 24-bit length was set it computed four bytes too few. The
extensions block was then truncated, SNI and ALPN parsed as empty, and
the relay dropped the connection as "sni \"\" matches no tunnel
hostname". It only hit certain ClientHello sizes, so some routes or
ALPN choices reset while others worked.

Parenthesize the length and add a regression test with a synthetic
hello whose length sets bit 2.
2026-10-25 23:54:40 +08:00
TZGyn f4a63c884f Document the Traefik label loss and certificate refresh 2026-10-25 23:41:30 +08:00
TZGyn 437a2e447e Issue real certificates via ACME DNS-01
Tunnels now get a per-tunnel certificate from the configured ACME CA
(Let's Encrypt by default) with DNS-01 through Porkbun, keeping the
client's CSR and key. Issuance is asynchronous (issuing/ready/failed);
the account persists in the store, renewals run in a 30-day window with
retries, and a failed renewal keeps the old certificate serving.
Switching from the local CA reissues existing tunnels automatically,
and the admin dashboard shows the issuer and certificate state.

Verified against Pebble and Let's Encrypt staging.
2026-10-25 23:33:52 +08:00
TZGyn 05d326f47f Dashboard: link each route to its public URL 2026-10-25 16:40:35 +08:00
TZGyn bc52af33cf Rebuild the admin dashboard as a Svelte 5 + TypeScript app
Frontend in web/ (Vite via bun, pure CSS, no component libraries),
built to internal/dashboard/dist and embedded into the binary; the
Dockerfile builds it in a bun stage. Old static dashboard.html removed.
2026-10-25 16:34:21 +08:00
TZGyn f5fcdd7bbb Add admin dashboard at / with bearer-token overview API 2026-10-25 15:12:33 +08:00
TZGyn 4acf226455 Document the real webhook root causes (hook secret edits ignored, SHA tip fetch) 2026-10-25 15:03:33 +08:00
TZGyn 9c1680deb3 chore: webhook test 2 2026-10-25 14:59:34 +08:00
TZGyn 3780c672f1 chore: webhook deploy test 2026-10-25 14:55:27 +08:00
TZGyn 7dc2eaab29 Note the per-app webhook secret gotcha 2026-10-25 14:45:46 +08:00
TZGyn 89a4a3991b Document Gitea webhook verification details 2026-10-25 14:43:02 +08:00
TZGyn cbd367373e Document Coolify deployment facts (app uuid, labels, webhook) 2026-10-25 14:40:06 +08:00
TZGyn 94bdce6809 Track cmd/tunneld; scope gitignore to the built binary
The bare 'tunneld' ignore pattern also matched the cmd/tunneld
directory, so the server's main.go was never committed and the
Coolify build failed on COPY cmd. Also update deploy docs for the
Coolify/Traefik topology (API via HTTPS router, tunnel traffic via
TCP SNI passthrough).
2026-10-25 14:36:32 +08:00
TZGyn 4dc3d14a06 Add Dockerfile for Coolify deployment
Static non-root alpine image; tunneld must own host ports 443/80
directly since visitor TLS is SNI-routed and never proxy-terminated.
2026-10-25 13:53:58 +08:00
TZGyn 682a341010 M1: single-node OpenTunnel-compatible server
HTTP API per the recorded contract, bridge WebSocket, SNI relay with
pass-through tunnel TLS, local CA issuance, JSON store. Verified
end-to-end with the official opentunnel CLI.
2026-10-25 11:52:45 +08:00