trunk icon indicating copy to clipboard operation
trunk copied to clipboard

can't set 'insecure' flag for websocket proxies with server

Open flumm opened this issue 6 months ago • 2 comments

when trying to proxy a websocket path like this:

[[proxy]]
backend = "wss://192.168.0.50:8443/some/path"
ws = true
insecure = true

When using trunk serve then, I get the following error when trying to establish the websocket connection:

2025-06-18T07:40:03.106229Z ERROR error establishing WebSocket connection to backend wss://192.168.0.50:8443/some/path for proxy error=Io(Custom { kind: InvalidData, error: InvalidCertificate(UnknownIssuer) })

is there any way currently to make this work with self-signed/untrusted certificates ?

flumm avatar Jun 18 '25 07:06 flumm

I think insecure=true should be the way. Maybe we are missing something there.

ctron avatar Jun 26 '25 13:06 ctron

Created a pull request for this: https://github.com/trunk-rs/trunk/pull/1007

chunnoo avatar Aug 04 '25 22:08 chunnoo