You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the client.go there is NewClient function which I think I need to change to add support for connection through proxy.
The way I see it is to add something along the lines of
if (config.Proxy != nil) {
err = newProxyConn(config.Proxy)
if err != nil {
return
}
}
before err = hybiClientHandshake(config, br, bw) call.
Function newProxyConn will basically send a CONNECT request to the proxy server and then websocket will proceed.
This of course will require Proxy to be added to Config struct.
This seems too easy to be true. I'm new to golang and probably missing something. All comments and suggestions are welcome.
The text was updated successfully, but these errors were encountered:
I'd like to add proxy support to websocket.
In the
client.go
there isNewClient
function which I think I need to change to add support for connection through proxy.The way I see it is to add something along the lines of
before
err = hybiClientHandshake(config, br, bw)
call.Function
newProxyConn
will basically send aCONNECT
request to the proxy server and then websocket will proceed.This of course will require
Proxy
to be added toConfig
struct.This seems too easy to be true. I'm new to
golang
and probably missing something. All comments and suggestions are welcome.The text was updated successfully, but these errors were encountered: