"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "components/engine/vendor/golang.org/x/net/proxy/socks5.go" between
docker-ce-19.03.2.tar.gz and docker-ce-19.03.3.tar.gz

About: Docker CE is a project to pack, ship and run any application as a lightweight container. Docker containers can run anywhere, on a laptop or at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more. Community edition.

socks5.go  (docker-ce-19.03.2):socks5.go  (docker-ce-19.03.3)
skipping to change at line 20 skipping to change at line 20
"golang.org/x/net/internal/socks" "golang.org/x/net/internal/socks"
) )
// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given // SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given
// address with an optional username and password. // address with an optional username and password.
// See RFC 1928 and RFC 1929. // See RFC 1928 and RFC 1929.
func SOCKS5(network, address string, auth *Auth, forward Dialer) (Dialer, error) { func SOCKS5(network, address string, auth *Auth, forward Dialer) (Dialer, error) {
d := socks.NewDialer(network, address) d := socks.NewDialer(network, address)
if forward != nil { if forward != nil {
d.ProxyDial = func(_ context.Context, network string, address str if f, ok := forward.(ContextDialer); ok {
ing) (net.Conn, error) { d.ProxyDial = func(ctx context.Context, network string, a
return forward.Dial(network, address) ddress string) (net.Conn, error) {
return f.DialContext(ctx, network, address)
}
} else {
d.ProxyDial = func(ctx context.Context, network string, a
ddress string) (net.Conn, error) {
return dialContext(ctx, forward, network, address
)
}
} }
} }
if auth != nil { if auth != nil {
up := socks.UsernamePassword{ up := socks.UsernamePassword{
Username: auth.User, Username: auth.User,
Password: auth.Password, Password: auth.Password,
} }
d.AuthMethods = []socks.AuthMethod{ d.AuthMethods = []socks.AuthMethod{
socks.AuthMethodNotRequired, socks.AuthMethodNotRequired,
socks.AuthMethodUsernamePassword, socks.AuthMethodUsernamePassword,
 End of changes. 1 change blocks. 
3 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)