func init() { proxy.RegisterDialerType("socks5+unix", func(u *url.URL, d proxy.Dialer) (proxy.Dialer, error) { var auth *proxy.Auth if u.User != nil { auth = &proxy.Auth{ User: u.User.Username(), } if p, ok := u.User.Password(); ok { auth.Password = p } } return proxy.SOCKS5("unix", u.Path, auth, d) }) }
func init() { proxy.RegisterDialerType("http", newHTTP) }
func init() { proxy.RegisterDialerType("socks4a", newSOCKS4) }
func init() { proxy.RegisterDialerType("socks4", func(u *url.URL, d proxy.Dialer) (proxy.Dialer, error) { return &socks4{url: u, dialer: d}, nil }) }
func init() { // Despite the scheme name, this really is SOCKS4. proxy.RegisterDialerType("socks4a", newSOCKS4) }
func init() { proxy.RegisterDialerType("http", httpDialType) }
func init() { proxy.RegisterDialerType("socks5+unix", socks5UnixProxy) proxy.RegisterDialerType("tor-auto", torAutoProxy) }