- Exposes a localhost SOCKS5/HTTP proxy (default - per-app routing), or
- Replaces your system default route (
--all- sudo prompt on first run), or - Spawns a wrapped child process routed through the tunnel (
-- <cmd>).
Arguments
| Argument | Required | Default |
|---|---|---|
region | no | Geolocate-and-pick. Persisted to your config dir (see overview). |
Examples
Quickest start - auto-pick region, per-app proxy, live status line:· €0.04). On --all and per-app modes, you see this line; when wrapping a child process, the child’s stdout owns the screen and the line is suppressed (the server-terminate poll still runs).
Explicit region, persisted:
HTTPS_PROXY / HTTP_PROXY / ALL_PROXY into the child env:
--proxy-server flag and a dedicated --user-data-dir, so the browser routes through the tunnel without touching your normal profile:
browser-profiles/ folder, so re-launching tunnelbyte fsn -- brave keeps your logins and bookmarks across sessions. Different regions get different profiles so cookies don’t leak across exit IPs.
System-wide - your default route changes for the duration:
Flags
| Flag | Default | Purpose |
|---|---|---|
--all | off | Route the system default through the tunnel. Requires elevated privileges on first run. |
--region | (positional arg) | Override the region without writing to the persisted file. |
-v, --verbose | off | Show handshake / route diagnostics. |
What happens under the hood
- Resolve region: positional arg →
--regionflag → persisted file → geo auto-pick. - POST
/v1/sessionsto create a session and receive awg_config. - Bring up a userspace WireGuard interface in-process. No
wg-quick, no kernel module, no sudo for the interface itself. On Linux with--all, switches to kernel WireGuard for the higher throughput. - Either:
- Default: start a localhost SOCKS5/HTTP proxy bound to a random port.
--all: prompt for sudo, install a0.0.0.0/0route via the tunnel.-- <cmd>: launch the child with proxy env vars set (CLI commands) or with--proxy-server+ a fresh--user-data-dir(known Chromium browsers).
- Poll
/v1/sessions/{id}every 10 seconds. Renders bytes/elapsed/cost/quota live in TTY mode; appends once per minute on non-TTY (logs, pipes). - Sleep until Ctrl-C, server-side expiration, or quota exhaustion.
- On exit: tear down the WireGuard interface; restore routing if
--all.
Failure modes
- Quota exhausted (exit 2): tier daily cap hit. The error body lists
bytes_used,session_seconds, andresets_at. Wait, or signup / upgrade. - Server-terminate (exit 3): the server ended the running session - quota hit mid-session, idle (>5 min without handshake), or tier max-session time. The reason prints to stderr.
- No active node: that region has no healthy nodes right now (503 +
available: [...]in the body). Try one of the listed regions.
See also
- Routing modes - per-app vs
--allvs wrapped children in depth. - Tiers - what each tier gets you.
tunnelbyte regions- what’s currently available.