You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add proxyproto support
this is useful for scenarios in which uptermd is behind a proxy,
in order for it to properly show IP addresses associated with
ssh connections.
Also see https://github.com/haproxy/haproxy/blob/master/doc/proxy-protocol.txt
* README: add traefik section
* Bump go-proxyproto to the latest
* Add comment about --proxy-protocol
* Improve README on Traefik
* Rename --proxy-protocol to --ssh-proxy-protocol to be clear
Uptermd only supports PROXY protocol for ssh listener. Make this
explicit to avoid confusion.
---------
Co-authored-by: Owen Ou <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -237,6 +237,60 @@ systemctl daemon-reload
237
237
systemctl start uptermd
238
238
```
239
239
240
+
### Traefik
241
+
242
+
Below is an example `docker-compose` configuration for deploying `uptermd` behind [Traefik](https://doc.traefik.io/traefik/), including support for both SSH and WebSocket connections:
The `--ssh-proxy-protocol` flag (or `UPTERMD_SSH_PROXY_PROTOCOL=true` environment variable) tells `uptermd` to expect the [PROXY protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) header on incoming SSH connections. This is essential when using Traefik (or other TCP proxies like HAProxy or AWS ELB) to preserve the real client IP address.
281
+
**If you enable `--ssh-proxy-protocol`, all incoming SSH connections must come through a proxy that supports and is configured to use the PROXY protocol. Direct SSH connections will fail, as `uptermd` will expect the protocol header.**
282
+
283
+
- **Entrypoints:**
284
+
Make sure to configure the appropriate [Traefik entrypoints](https://doc.traefik.io/traefik/routing/entrypoints/). This example uses two: one for SSH (`uptermd` on port `2222`) and one for WebSocket/HTTPS (`websecure` on port `443`).
285
+
286
+
- **WebSocket:**
287
+
The WebSocket service allows clients to connect to `uptermd` over HTTPS, which is useful in restrictive network environments.
288
+
289
+
- **Certificates:**
290
+
Replace `<your cert resolver here>` with your actual Traefik certificate resolver for TLS.
291
+
292
+
For more details on Traefik TCP and HTTP routing, see the [Traefik documentation](https://doc.traefik.io/traefik/routing/overview/).
293
+
240
294
## :balance_scale: Comparison with Prior Arts
241
295
242
296
Upterm stands as a modern alternative to [Tmate](https://tmate.io).
cmd.PersistentFlags().StringSliceP("hostname", "", nil, "server hostname for public-key authentication certificate principals. If empty, public-key authentication is used instead.")
31
+
cmd.PersistentFlags().BoolP("ssh-proxy-protocol", "", false, "enable PROXY protocol support for the SSH listener (for use behind TCP proxies like Traefik, HAProxy, or AWS ELB)")
0 commit comments