websocket icon indicating copy to clipboard operation
websocket copied to clipboard

Is https not supported?

Open yuting-fan opened this issue 3 years ago • 6 comments

It looks like gorilla websocket intends to support https, e.g logic here.

However, https is not registered during init here.

This caused https to be considered as an unknown proxy when we use https proxy, error thrown from here.

Is this a bug? Shouldn't the proxy_RegisterDialerType be initialized with https?

yuting-fan avatar Jun 22 '22 18:06 yuting-fan

Websockets does support https. The client dialers expect you to pass scheme wss://, not https://.

That being said, the behavior your mentioning IMO is an issue (so picky about scheme), but bottom line is that gorilla websocket does support TLS and will connect to an https server.

ayjayt avatar Jul 21 '23 06:07 ayjayt

Infuriating: https://github.com/gorilla/websocket/blob/9111bb834a68b893cebbbaed5060bdbc1d9ab7d2/client.go#L174

ayjayt avatar Jul 21 '23 14:07 ayjayt

The issue is asking about support for HTTPS proxy servers, not whether the package supports WSS or not.

To reduce confusion, the issue title should be changed to "Are HTTPS proxy servers supported?"

ghost avatar Jul 21 '23 17:07 ghost