Cross-platform desktop tool (macOS / Windows / Linux) for managing SSH tunnels and Kubernetes port-forwards to remote infrastructure โ with one click from the system tray.
๐ ๏ธ Status: personal project ยท Stack: Go 1.25 + Wails v2 + Svelte 5
If you work against a remote / corporate dev environment through a jump-host VPN + Kubernetes review stands, you probably have a ~/bin pile of shell scripts that:
127.0.0.2, 127.0.0.3, โฆ),kubectl port-forward supervisors so they don't die on sleep/wake,.env files in your projects when you switch namespaces,/etc/hosts and kick dnsmasq so the right domains resolve.Portway is a polished desktop replacement for that pile. Everything runs from a single tray-bar app with persistent state, auto-recovery, and native OS integration.
kubectl port-forward processes with automatic restart on failure, sleep-aware.dnsmasq config so *.example.com resolves to loopback aliases;%SystemRoot%\System32\drivers\etc\hosts..env auto-patching โ when switching Kubernetes namespaces, recursively finds .env* files in your project tree and rewrites the connection variables (REDIS_HOST, KAFKA_HOST, MS_CFG_NAMESPACE, etc.).WM_POWERBROADCAST on Windows) so tunnels survive laptop suspend for up to ~12 hours and recover automatically./etc/hosts management needed.| Area | Technology |
|---|---|
| Desktop shell | Wails v2 (Go โ JS bridge) |
| Backend | Go 1.25 (single binary per platform) |
| Frontend | Svelte 5 + Vite 6 + TypeScript 5.7 |
| Native integration | macOS: PF (Packet Filter), dnsmasq, NSWorkspaceLinux: PF / iptables, D-BusWindows: hosts file, WM_POWERBROADCAST |
| CI/CD | GitHub Actions (planned) |
| License | MIT |
.
โโโ app.go # Wails-bound methods (Go โ JS API surface)
โโโ main*.go # Platform entry points (darwin / linux / windows)
โโโ setup_{darwin,linux,windows}.go # Per-platform install / privilege bootstrap
โโโ sleep_{linux,windows}.go # Native sleep/wake hooks
โโโ tray_*.go # System tray per platform
โโโ cmd/
โ โโโ jumphost-setup/ # Small CLI to configure an SSH jump-host
โโโ internal/
โ โโโ config/ # JSON config (~/.portway/config.json), defaults, schema
โ โโโ tunnel/ # SSH tunnel supervisor, IP resolution, PF anchor wiring
โ โโโ portforward/ # kubectl port-forward supervisor + .env patcher
โ โโโ logger/ # Structured logs
โ โโโ platform/ # OS-specific helpers (privilege elevation, etc.)
โโโ frontend/ # Svelte 5 UI (Vite 6)
โโโ build/ # App icons, Wails build metadata, platform assets
Prerequisites:
go install github.com/wailsapp/wails/v2/cmd/wails@latest# Dev mode with hot reload (Go + frontend)
wails dev
# Tests (Go side)
go test ./internal/...
# Production build (macOS example)
./build.sh darwin
On first launch Portway creates ~/.portway/config.json with a minimal example configuration. Edit it through the Settings screen or by hand. The defaults ship with placeholder services (service-a.example.com, git.example.com, k8s-api.example.com) โ swap them for your real targets.
Key sections:
| Section | Purpose |
|---|---|
ssh |
Jump-host (host, remoteUser, keyPath) |
tunnels[] |
SSH local-forwards (localIP:localPort โ remoteHost:remotePort) |
k8s |
kubectl context + list of port-forward services |
paths.searchDir |
Root folder scanned for .env* files |
pf.anchorName |
macOS PF anchor name (default portway_pf) |
A few reasons:
dnsmasq config across macOS / Windows / Linux teammates, a GUI with persistent state beats bash + cron.MIT โ use, fork, adapt freely.