1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-05 00:50:24 +08:00

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

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)
} }