rpcc: Inherit proxy configuration from environment This is what the gorilla/websocket default dialer does already, so it makes sense to use it by default. Fixes #94 (or at least partially).
diff --git a/rpcc/conn.go b/rpcc/conn.go index aa210df..3bcef1d 100644 --- a/rpcc/conn.go +++ b/rpcc/conn.go
@@ -9,6 +9,7 @@ "io" "log" "net" + "net/http" "sync" "github.com/gorilla/websocket" @@ -122,6 +123,7 @@ if netDial == nil { netDial = func(ctx context.Context, addr string) (io.ReadWriteCloser, error) { ws := &c.dialOpts.wsDialer + ws.Proxy = http.ProxyFromEnvironment if ws.WriteBufferSize == 0 { // Set the default size for use in writeLimiter.