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

2
v2/Cargo.lock generated
View file

@ -416,9 +416,11 @@ dependencies = [
"env_logger",
"futures-util",
"log",
"native-tls",
"serde",
"serde_json",
"tokio",
"tokio-native-tls",
"tokio-tungstenite",
"uuid",
]