Documentation
¶
Index ¶
- type Base
- type Direct
- type Fallback
- type FallbackOption
- type Http
- type HttpOption
- type LoadBalance
- type LoadBalanceOption
- type NopConn
- func (rw *NopConn) Close() error
- func (rw *NopConn) LocalAddr() net.Addr
- func (rw *NopConn) Read(b []byte) (int, error)
- func (rw *NopConn) RemoteAddr() net.Addr
- func (rw *NopConn) SetDeadline(time.Time) error
- func (rw *NopConn) SetReadDeadline(time.Time) error
- func (rw *NopConn) SetWriteDeadline(time.Time) error
- func (rw *NopConn) Write(b []byte) (int, error)
- type Proxy
- type Reject
- type Selector
- type SelectorOption
- type ShadowSocks
- type ShadowSocksOption
- type Socks5
- type Socks5Option
- type URLTest
- type URLTestOption
- type Vmess
- type VmessOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶ added in v0.11.0
type Base struct {
// contains filtered or unexported fields
}
func (*Base) MarshalJSON ¶ added in v0.11.0
func (*Base) Type ¶ added in v0.11.0
func (b *Base) Type() C.AdapterType
type Fallback ¶
type Fallback struct {
*Base
// contains filtered or unexported fields
}
func NewFallback ¶
func NewFallback(option FallbackOption, proxies []C.Proxy) (*Fallback, error)
func (*Fallback) MarshalJSON ¶ added in v0.10.0
type FallbackOption ¶
type Http ¶ added in v0.10.0
type Http struct {
*Base
// contains filtered or unexported fields
}
func NewHttp ¶ added in v0.10.0
func NewHttp(option HttpOption) *Http
type HttpOption ¶ added in v0.10.0
type LoadBalance ¶ added in v0.12.0
type LoadBalance struct {
*Base
// contains filtered or unexported fields
}
func NewLoadBalance ¶ added in v0.12.0
func NewLoadBalance(option LoadBalanceOption, proxies []C.Proxy) (*LoadBalance, error)
func (*LoadBalance) Destroy ¶ added in v0.13.0
func (lb *LoadBalance) Destroy()
func (*LoadBalance) MarshalJSON ¶ added in v0.12.0
func (lb *LoadBalance) MarshalJSON() ([]byte, error)
type LoadBalanceOption ¶ added in v0.12.0
type NopConn ¶
type NopConn struct{}
func (*NopConn) RemoteAddr ¶
RemoteAddr is fake function for net.Conn
func (*NopConn) SetDeadline ¶
SetDeadline is fake function for net.Conn
func (*NopConn) SetReadDeadline ¶
SetReadDeadline is fake function for net.Conn
func (*NopConn) SetWriteDeadline ¶
SetWriteDeadline is fake function for net.Conn
type Proxy ¶ added in v0.13.0
type Proxy struct {
C.ProxyAdapter
// contains filtered or unexported fields
}
func NewProxy ¶ added in v0.13.0
func NewProxy(adapter C.ProxyAdapter) *Proxy
func (*Proxy) DelayHistory ¶ added in v0.13.0
func (p *Proxy) DelayHistory() []C.DelayHistory
func (*Proxy) LastDelay ¶ added in v0.13.0
LastDelay return last history record. if proxy is not alive, return the max value of int16.
func (*Proxy) MarshalJSON ¶ added in v0.13.0
type Selector ¶
type Selector struct {
*Base
// contains filtered or unexported fields
}
func (*Selector) MarshalJSON ¶ added in v0.10.0
type SelectorOption ¶
type ShadowSocks ¶
type ShadowSocks struct {
*Base
// contains filtered or unexported fields
}
func NewShadowSocks ¶
func NewShadowSocks(option ShadowSocksOption) (*ShadowSocks, error)
func (*ShadowSocks) MarshalJSON ¶ added in v0.10.0
func (ss *ShadowSocks) MarshalJSON() ([]byte, error)
type ShadowSocksOption ¶
type ShadowSocksOption struct {
Name string `proxy:"name"`
Server string `proxy:"server"`
Port int `proxy:"port"`
Password string `proxy:"password"`
Cipher string `proxy:"cipher"`
Plugin string `proxy:"plugin,omitempty"`
PluginOpts map[string]interface{} `proxy:"plugin-opts,omitempty"`
// deprecated when bump to 1.0
Obfs string `proxy:"obfs,omitempty"`
ObfsHost string `proxy:"obfs-host,omitempty"`
}
type Socks5 ¶
type Socks5 struct {
*Base
// contains filtered or unexported fields
}
func NewSocks5 ¶
func NewSocks5(option Socks5Option) *Socks5
type Socks5Option ¶
type URLTest ¶
type URLTest struct {
*Base
// contains filtered or unexported fields
}
func NewURLTest ¶
func NewURLTest(option URLTestOption, proxies []C.Proxy) (*URLTest, error)
func (*URLTest) MarshalJSON ¶ added in v0.10.0
type URLTestOption ¶
type Vmess ¶
type Vmess struct {
*Base
// contains filtered or unexported fields
}
func NewVmess ¶
func NewVmess(option VmessOption) (*Vmess, error)
type VmessOption ¶
type VmessOption struct {
Name string `proxy:"name"`
Server string `proxy:"server"`
Port int `proxy:"port"`
UUID string `proxy:"uuid"`
AlterID int `proxy:"alterId"`
Cipher string `proxy:"cipher"`
TLS bool `proxy:"tls,omitempty"`
Network string `proxy:"network,omitempty"`
WSPath string `proxy:"ws-path,omitempty"`
WSHeaders map[string]string `proxy:"ws-headers,omitempty"`
SkipCertVerify bool `proxy:"skip-cert-verify,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.