Client Setup¶
This guide covers connecting as a client after receiving a config bundle from the server operator.
1. Receive Config Bundle¶
The server admin will provide you with a zip file containing:
config.yaml— client configuration (relay address, tunnel mappings, SSH user)id_ed25519— your SSH private keyid_ed25519.pub— your SSH public key
2. Upload Config¶
Via Dashboard (Recommended)¶
Choose Client mode on first run. Then drag-and-drop the zip file into the upload area, or click to browse.
Via CLI¶
Extract the zip contents into the config directory:
3. Connect¶
Via Dashboard¶
Click Connect on the client status page. The dashboard shows real-time progress as the Xray tunnel and SSH port forwarding start.
Via CLI¶
This starts:
- Xray client tunnel to the relay (VLESS + XHTTP + TLS)
- SSH connection through Xray to the server (public key auth)
- Local port listeners for all configured tunnel mappings
4. Verify¶
Test the tunnel by connecting to your mapped local ports. For example, if PostgreSQL is mapped:
The connection goes through the tunnel transparently.
5. Run as a Service (Optional)¶
To keep the client running in the background and auto-connect on boot:
The service runs tw dashboard, which auto-connects the client if relay_host is configured. See Installation — Install as a System Service.
Reconnecting¶
If the server admin updates your configuration, the dashboard shows a "Configuration has changed. Reconnect to apply." notification. Click Reconnect to apply changes without a full restart.
Auto-Reconnection¶
The client automatically reconnects with exponential backoff if the connection drops:
- 2s for the first 8 attempts
- 4s, then 8s, then 16s, then 30s max
- Successful connection resets the backoff immediately