SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address with an optional username and password. See RFC 1928 and RFC 1929.
(network, addr string, auth *proxy_Auth, forward proxy_Dialer)
| 273 | // SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address |
| 274 | // with an optional username and password. See RFC 1928 and RFC 1929. |
| 275 | func proxy_SOCKS5(network, addr string, auth *proxy_Auth, forward proxy_Dialer) (proxy_Dialer, error) { |
| 276 | s := &proxy_socks5{ |
| 277 | network: network, |
| 278 | addr: addr, |
| 279 | forward: forward, |
| 280 | } |
| 281 | if auth != nil { |
| 282 | s.user = auth.User |
| 283 | s.password = auth.Password |
| 284 | } |
| 285 | |
| 286 | return s, nil |
| 287 | } |
| 288 | |
| 289 | type proxy_socks5 struct { |
| 290 | user, password string |