A Dialer holds SOCKS-specific options.
| 119 | |
| 120 | // A Dialer holds SOCKS-specific options. |
| 121 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected