Documentation ¶
Index ¶
- Variables
- func Dial(c *Config, network, address string) (net.Conn, error)
- type Client
- func (c *Client) Close() error
- func (c *Client) Connect() error
- func (c *Client) IsConnected() bool
- func (c *Client) LocalAddr() net.Addr
- func (c *Client) Read(b []byte) (int, error)
- func (c *Client) RemoteAddr() net.Addr
- func (c *Client) SetDeadline(t time.Time) error
- func (c *Client) SetReadDeadline(t time.Time) error
- func (c *Client) SetWriteDeadline(t time.Time) error
- func (c *Client) Write(b []byte) (int, error)
- type Config
- type Dialer
- type DialerFunc
- type ProxyConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotConnected = errors.New("client is not connected")
)
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithDialer ¶
func (*Client) IsConnected ¶
func (*Client) RemoteAddr ¶
type Dialer ¶
func MakeDialer ¶
func ProxyDialer ¶
func ProxyDialer(config *ProxyConfig, forward Dialer) (Dialer, error)
type DialerFunc ¶
type ProxyConfig ¶
type ProxyConfig struct { // URL of the SOCKS proxy. Scheme must be socks5. Username and password can be // embedded in the URL. URL string `config:"proxy_url"` // Resolve names locally instead of on the SOCKS server. LocalResolve bool `config:"proxy_use_local_resolver"` }
ProxyConfig holds the configuration information required to proxy connections through a SOCKS5 proxy server.
func (*ProxyConfig) Validate ¶
func (c *ProxyConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.