MCPcopy
hub / github.com/golang/net / Dialer

Struct Dialer

internal/socks/socks.go:121–139  ·  view source on GitHub ↗

A Dialer holds SOCKS-specific options.

Source from the content-addressed store, hash-verified

119
120// A Dialer holds SOCKS-specific options.
121type Dialer struct {
122 cmd Command // either CmdConnect or cmdBind
123 proxyNetwork string // network between a proxy server and a client
124 proxyAddress string // proxy server address
125
126 // ProxyDial specifies the optional dial function for
127 // establishing the transport connection.
128 ProxyDial func(context.Context, string, string) (net.Conn, error)
129
130 // AuthMethods specifies the list of request authentication
131 // methods.
132 // If empty, SOCKS client requests only AuthMethodNotRequired.
133 AuthMethods []AuthMethod
134
135 // Authenticate specifies the optional authentication
136 // function. It must be non-nil when AuthMethods is not empty.
137 // It must return an error when the authentication is failed.
138 Authenticate func(context.Context, io.ReadWriter, AuthMethod) error
139}
140
141// DialContext connects to the provided address on the provided
142// network.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected