Documentation
¶
Index ¶
- Variables
- type ConnectionCheckFailed
- type DialerInitFailed
- type ErrorInfo
- type InvalidPort
- type InvalidScheme
- type InvalidURL
- type InvalidUsername
- type Proxy
- func (p *Proxy) Auth() *ProxyAuth
- func (p *Proxy) CheckConnection(u string) error
- func (p *Proxy) DialContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (p *Proxy) GetHttpTransport() *http.Transport
- func (p *Proxy) GetSocks5Dialer() (*proxy.Dialer, error)
- func (p *Proxy) GetStringURL() string
- func (p *Proxy) GetURL() *url.URL
- func (p *Proxy) Host() string
- func (p *Proxy) Port() uint16
- func (p *Proxy) Scheme() string
- func (p *Proxy) UpdateSession(session *discordgo.Session) error
- type ProxyAuth
Constants ¶
This section is empty.
Variables ¶
View Source
var PROXY_SCHEMES []string = []string{"http", "socks5"}
View Source
var RE_PROXY_USERNAME *regexp.Regexp = regexp.MustCompile(`^[a-zA-Z0-9-_\.]+$`)
Functions ¶
This section is empty.
Types ¶
type ConnectionCheckFailed ¶
type ConnectionCheckFailed struct{ ErrorInfo }
type DialerInitFailed ¶
type DialerInitFailed struct{ ErrorInfo }
type InvalidPort ¶
type InvalidPort struct{ ErrorInfo }
type InvalidScheme ¶
type InvalidScheme struct{ ErrorInfo }
type InvalidURL ¶
type InvalidURL struct{ ErrorInfo }
type InvalidUsername ¶
type InvalidUsername struct{ ErrorInfo }
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy server struct. You must create it using following constructors:
- NewProxy(scheme string, host string, port uint16, auth *ProxyAuth)
- NewProxyFromURL(url *net/url.Url)
- NewProxyFromStringURL(url string)
NOTE: If proxy does not use authentication, set "auth" parameter to nil
func NewProxyFromStringURL ¶
func (*Proxy) CheckConnection ¶
func (*Proxy) DialContext ¶
func (*Proxy) GetHttpTransport ¶
func (*Proxy) GetStringURL ¶
type ProxyAuth ¶
type ProxyAuth struct {
// contains filtered or unexported fields
}
Proxy server authentication. You must create it using following constructors:
- NewAuth(user string)
- NewPasswordAuth(user string, password string)
func NewPasswordAuth ¶
func (*ProxyAuth) IsPasswordSet ¶
Returns false if password is empty string and true if password is not empty.
Click to show internal directories.
Click to hide internal directories.