Skip to content

client: Propagate HTTP TLS dialer to websocket #1519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions client/incus.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,11 @@ func (r *ProtocolIncus) rawWebsocket(url string) (*websocket.Conn, error) {

// Setup a new websocket dialer based on it
dialer := websocket.Dialer{
NetDialContext: httpTransport.DialContext,
TLSClientConfig: httpTransport.TLSClientConfig,
Proxy: httpTransport.Proxy,
HandshakeTimeout: time.Second * 5,
NetDialTLSContext: httpTransport.DialTLSContext,
NetDialContext: httpTransport.DialContext,
TLSClientConfig: httpTransport.TLSClientConfig,
Proxy: httpTransport.Proxy,
HandshakeTimeout: time.Second * 5,
}

// Create temporary http.Request using the http url, not the ws one, so that we can add the client headers
Expand Down
Loading