Documentation
¶
Index ¶
- Variables
- func CreateTransport(o *Options) *http.Transport
- func GetFreePort() (int, error)
- func IsDomain(s string) bool
- func IsHost(s string) bool
- func IsIP(s string) bool
- func New(proxyURL string, options ...Option) (*http.Client, error)
- func Ping(host string, port string, timeout time.Duration) bool
- func ProxyHTTP(u *url.URL, o *Options) (http.RoundTripper, error)
- func ProxySocks4(u *url.URL, o *Options) (http.RoundTripper, error)
- func ProxySocks5(u *url.URL, o *Options) (http.RoundTripper, error)
- func RegisterParser(proto string, f FuncParser)
- func RegisterProxy(proto string, f ProxyFunc)
- func SetDeadline(conn net.Conn, timeout time.Duration, disableKeepAlives bool) (net.Conn, error)
- func WithRecover(dial func() (net.Conn, error)) (conn net.Conn, err error)
- type Bool
- type Dialer
- type FuncParser
- type Int
- type Option
- type Options
- type ProxyFunc
- type String
- type URL
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownProtocol = errors.New("proxyclient: unknown proxy protocol") ErrInvalidHost = errors.New("proxyclient: invalid proxy host") )
Functions ¶
func CreateTransport ¶ added in v0.0.2
func GetFreePort ¶ added in v0.0.2
func ProxySocks4 ¶
func ProxySocks5 ¶
func RegisterParser ¶ added in v0.0.3
func RegisterParser(proto string, f FuncParser)
func RegisterProxy ¶
func SetDeadline ¶ added in v0.0.8
Types ¶
type Bool ¶ added in v0.0.5
type Bool struct {
// contains filtered or unexported fields
}
func (*Bool) MarshalJSON ¶ added in v0.0.5
func (*Bool) UnmarshalJSON ¶ added in v0.0.5
type Int ¶ added in v0.0.3
type Int struct {
// contains filtered or unexported fields
}
func (*Int) MarshalJSON ¶ added in v0.0.3
func (*Int) UnmarshalJSON ¶ added in v0.0.3
type String ¶ added in v0.0.5
type String struct {
// contains filtered or unexported fields
}
func (*String) MarshalJSON ¶ added in v0.0.5
func (*String) UnmarshalJSON ¶ added in v0.0.5
Source Files
¶
Click to show internal directories.
Click to hide internal directories.