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 ¶
type Base struct {
// contains filtered or unexported fields
}
func (*Base) MarshalJSON ¶
func (*Base) Type ¶
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 ¶
type FallbackOption ¶
type Http ¶
type Http struct { *Base // contains filtered or unexported fields }
func NewHttp ¶
func NewHttp(option HttpOption) *Http
type HttpOption ¶
type LoadBalance ¶
type LoadBalance struct { *Base // contains filtered or unexported fields }
func NewLoadBalance ¶
func NewLoadBalance(option LoadBalanceOption, proxies []C.Proxy) (*LoadBalance, error)
func (*LoadBalance) Destroy ¶
func (lb *LoadBalance) Destroy()
func (*LoadBalance) MarshalJSON ¶
func (lb *LoadBalance) MarshalJSON() ([]byte, error)
type LoadBalanceOption ¶
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 ¶
type Proxy struct { C.ProxyAdapter // contains filtered or unexported fields }
func NewProxy ¶
func NewProxy(adapter C.ProxyAdapter) *Proxy
func (*Proxy) DelayHistory ¶
func (p *Proxy) DelayHistory() []C.DelayHistory
func (*Proxy) LastDelay ¶
LastDelay return last history record. if proxy is not alive, return the max value of int16.
func (*Proxy) MarshalJSON ¶
type Selector ¶
type Selector struct { *Base // contains filtered or unexported fields }
func (*Selector) MarshalJSON ¶
type SelectorOption ¶
type ShadowSocks ¶
type ShadowSocks struct { *Base // contains filtered or unexported fields }
func NewShadowSocks ¶
func NewShadowSocks(option ShadowSocksOption) (*ShadowSocks, error)
func (*ShadowSocks) MarshalJSON ¶
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 ¶
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.