Documentation ¶
Index ¶
- func ParseProxy(mapping map[string]interface{}) (C.Proxy, error)
- type Base
- type Direct
- type Http
- type HttpOption
- 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 PacketConn
- type Proxy
- func (p *Proxy) Alive() bool
- func (p *Proxy) DelayHistory() []C.DelayHistory
- func (p *Proxy) Dial(metadata *C.Metadata) (C.Conn, error)
- func (p *Proxy) DialContext(ctx context.Context, metadata *C.Metadata) (C.Conn, error)
- func (p *Proxy) LastDelay() (delay uint16)
- func (p *Proxy) MarshalJSON() ([]byte, error)
- func (p *Proxy) URLTest(ctx context.Context, url string) (t uint16, err error)
- type Reject
- type ShadowSocks
- type ShadowSocksOption
- type Snell
- type SnellOption
- type Socks5
- type Socks5Option
- type Vmess
- type VmessOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) SupportUDP ¶ added in v0.14.0
func (*Base) Type ¶ added in v0.11.0
func (b *Base) Type() C.AdapterType
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 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 PacketConn ¶ added in v0.18.0
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) DialContext ¶ added in v0.16.0
func (*Proxy) LastDelay ¶ added in v0.13.0
LastDelay return last history record. if proxy is not alive, return the max value of uint16.
func (*Proxy) MarshalJSON ¶ added in v0.13.0
type ShadowSocks ¶
type ShadowSocks struct { *Base // contains filtered or unexported fields }
func NewShadowSocks ¶
func NewShadowSocks(option ShadowSocksOption) (*ShadowSocks, error)
func (*ShadowSocks) DialContext ¶ added in v0.16.0
func (*ShadowSocks) DialUDP ¶ added in v0.14.0
func (ss *ShadowSocks) DialUDP(metadata *C.Metadata) (C.PacketConn, 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"` UDP bool `proxy:"udp,omitempty"` 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 Snell ¶ added in v0.16.0
type Snell struct { *Base // contains filtered or unexported fields }
func NewSnell ¶ added in v0.16.0
func NewSnell(option SnellOption) (*Snell, error)
type SnellOption ¶ added in v0.16.0
type Socks5 ¶
type Socks5 struct { *Base // contains filtered or unexported fields }
func NewSocks5 ¶
func NewSocks5(option Socks5Option) *Socks5
func (*Socks5) DialContext ¶ added in v0.16.0
type Socks5Option ¶
type Socks5Option struct { Name string `proxy:"name"` Server string `proxy:"server"` Port int `proxy:"port"` UserName string `proxy:"username,omitempty"` Password string `proxy:"password,omitempty"` TLS bool `proxy:"tls,omitempty"` UDP bool `proxy:"udp,omitempty"` SkipCertVerify bool `proxy:"skip-cert-verify,omitempty"` }
type Vmess ¶
type Vmess struct { *Base // contains filtered or unexported fields }
func NewVmess ¶
func NewVmess(option VmessOption) (*Vmess, error)
func (*Vmess) DialContext ¶ added in v0.16.0
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"` UDP bool `proxy:"udp,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.