feat: add TLS support to bterminal-relay

Add optional --tls-cert and --tls-key CLI args. When provided, the relay
wraps TCP streams with native-tls before WebSocket upgrade. Refactored
to generic accept_ws_with_auth<S> and run_ws_session<S> to avoid code
duplication between plain and TLS paths. Client side already supports
wss:// URLs via connect_async with native-tls feature.
This commit is contained in:
Hibryda 2026-03-12 05:21:33 +01:00 committed by DexterFromLab
parent 7e65ee2360
commit de8d1488e2
3 changed files with 108 additions and 9 deletions

View file

@ -17,6 +17,8 @@ log = "0.4"
env_logger = "0.11"
tokio = { version = "1", features = ["full"] }
tokio-tungstenite = { version = "0.21", features = ["native-tls"] }
tokio-native-tls = "0.3"
native-tls = "0.2"
futures-util = "0.3"
clap = { version = "4", features = ["derive"] }
uuid = { version = "1", features = ["v4"] }