Added support for proxy (#318)

Co-authored-by: Jeff Monson <jeff.monson@armis.com>
This commit is contained in:
jmonson 2021-02-19 12:27:22 -05:00 committed by GitHub
parent 1670ee87fb
commit 5d76e940c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -76,7 +76,10 @@ type defaultDialler struct {
} }
func (dd *defaultDialler) Dial(url *url.URL, header http.Header) (*websocket.Conn, *http.Response, error) { 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) return d.Dial(url.String(), header)
} }