- deprecate sockets.GetProxyEnv, sockets.DialerFromEnvironment - add support for unix sockets on Windows - remove legacy CBC cipher suites from client config - align client and server defaults to be the same. - remove support for encrypted TLS private keys. - nat: optimize ParsePortSpec full diff: https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
24 lines
509 B
Go
24 lines
509 B
Go
package sockets
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
"net/http"
|
|
"time"
|
|
|
|
"github.com/Microsoft/go-winio"
|
|
)
|
|
|
|
func configureNpipeTransport(tr *http.Transport, proto, addr string) error {
|
|
// No need for compression in local communications.
|
|
tr.DisableCompression = true
|
|
tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
|
|
return winio.DialPipeContext(ctx, addr)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func dialPipe(addr string, timeout time.Duration) (net.Conn, error) {
|
|
return winio.DialPipe(addr, &timeout)
|
|
}
|