mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
f12b6064d6
Bumps the golang-dependencies group with 4 updates: [github.com/golang/protobuf](https://github.com/golang/protobuf), [golang.org/x/crypto](https://github.com/golang/crypto), [golang.org/x/net](https://github.com/golang/net) and [golang.org/x/sys](https://github.com/golang/sys). Updates `github.com/golang/protobuf` from 1.5.3 to 1.5.4 - [Release notes](https://github.com/golang/protobuf/releases) - [Commits](https://github.com/golang/protobuf/compare/v1.5.3...v1.5.4) Updates `golang.org/x/crypto` from 0.20.0 to 0.21.0 - [Commits](https://github.com/golang/crypto/compare/v0.20.0...v0.21.0) Updates `golang.org/x/net` from 0.21.0 to 0.22.0 - [Commits](https://github.com/golang/net/compare/v0.21.0...v0.22.0) Updates `golang.org/x/sys` from 0.17.0 to 0.18.0 - [Commits](https://github.com/golang/sys/compare/v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: github.com/golang/protobuf dependency-type: direct:production update-type: version-update:semver-patch dependency-group: golang-dependencies - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-dependencies - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-dependencies - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
30 lines
678 B
Go
30 lines
678 B
Go
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package websocket
|
|
|
|
import (
|
|
"context"
|
|
"crypto/tls"
|
|
"net"
|
|
)
|
|
|
|
func dialWithDialer(ctx context.Context, dialer *net.Dialer, config *Config) (conn net.Conn, err error) {
|
|
switch config.Location.Scheme {
|
|
case "ws":
|
|
conn, err = dialer.DialContext(ctx, "tcp", parseAuthority(config.Location))
|
|
|
|
case "wss":
|
|
tlsDialer := &tls.Dialer{
|
|
NetDialer: dialer,
|
|
Config: config.TlsConfig,
|
|
}
|
|
|
|
conn, err = tlsDialer.DialContext(ctx, "tcp", parseAuthority(config.Location))
|
|
default:
|
|
err = ErrBadScheme
|
|
}
|
|
return
|
|
}
|