From 5d76e940c7500ac37bb7031dcdb36334ad7fcc68 Mon Sep 17 00:00:00 2001 From: jmonson <4283299+jmonson@users.noreply.github.com> Date: Fri, 19 Feb 2021 12:27:22 -0500 Subject: [PATCH] Added support for proxy (#318) Co-authored-by: Jeff Monson --- websocket/websocket.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/websocket/websocket.go b/websocket/websocket.go index 4909f5a5..582db8f9 100644 --- a/websocket/websocket.go +++ b/websocket/websocket.go @@ -76,7 +76,10 @@ type defaultDialler struct { } func (dd *defaultDialler) Dial(url *url.URL, header http.Header) (*websocket.Conn, *http.Response, error) { - d := &websocket.Dialer{TLSClientConfig: dd.tlsConfig} + d := &websocket.Dialer{ + TLSClientConfig: dd.tlsConfig, + Proxy: http.ProxyFromEnvironment, + } return d.Dial(url.String(), header) }