feat: HTTPS support for web bridge (--tls flag)

Generates a self-signed certificate at startup for HTTPS.
Required for mic access on Android/remote browsers (getUserMedia
needs a secure context).

Usage: wzp-web --port 9090 --relay 127.0.0.1:4433 --tls
Browser: accept the self-signed cert warning, then mic works.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-27 18:56:00 +04:00
parent 66f720f1ee
commit 61d6fb173d
2 changed files with 53 additions and 17 deletions

View File

@@ -21,6 +21,11 @@ anyhow = "1"
axum = { version = "0.8", features = ["ws"] }
tower-http = { version = "0.6", features = ["fs"] }
futures = "0.3"
axum-server = { version = "0.7", features = ["tls-rustls"] }
rcgen = "0.13"
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
rustls-pki-types = "1"
tokio-rustls = "0.26"
[[bin]]
name = "wzp-web"