Documentation
¶
Index ¶
- func DelayTest(proxy C.Proxy, url string) (t int16, err error)
- type Direct
- type DirectAdapter
- type Fallback
- type FallbackOption
- type HTTPAdapter
- 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 Reject
- type RejectAdapter
- type Selector
- type SelectorOption
- type ShadowSocks
- type ShadowSocksOption
- type ShadowsocksAdapter
- type Socks5
- type Socks5Adapter
- type Socks5Option
- type URLTest
- type URLTestOption
- type Vmess
- type VmessAdapter
- type VmessOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Direct ¶
type Direct struct{}
func (*Direct) MarshalJSON ¶ added in v0.10.0
func (*Direct) Type ¶
func (d *Direct) Type() C.AdapterType
type DirectAdapter ¶
type DirectAdapter struct {
// contains filtered or unexported fields
}
DirectAdapter is a directly connected adapter
type Fallback ¶
type Fallback struct {
// contains filtered or unexported fields
}
func NewFallback ¶
func NewFallback(option FallbackOption, proxies []C.Proxy) (*Fallback, error)
func (*Fallback) MarshalJSON ¶ added in v0.10.0
func (*Fallback) Type ¶
func (f *Fallback) Type() C.AdapterType
type FallbackOption ¶
type HTTPAdapter ¶ added in v0.10.0
type HTTPAdapter struct {
// contains filtered or unexported fields
}
HTTPAdapter is a proxy adapter
func (*HTTPAdapter) Close ¶ added in v0.10.0
func (ha *HTTPAdapter) Close()
Close is used to close connection
func (*HTTPAdapter) Conn ¶ added in v0.10.0
func (ha *HTTPAdapter) Conn() net.Conn
type Http ¶ added in v0.10.0
type Http struct {
// contains filtered or unexported fields
}
func NewHttp ¶ added in v0.10.0
func NewHttp(option HttpOption) *Http
func (*Http) MarshalJSON ¶ added in v0.10.0
func (*Http) Type ¶ added in v0.10.0
func (h *Http) Type() C.AdapterType
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 Reject ¶
type Reject struct {
}
func (*Reject) MarshalJSON ¶ added in v0.10.0
func (*Reject) Type ¶
func (r *Reject) Type() C.AdapterType
type RejectAdapter ¶
type RejectAdapter struct {
// contains filtered or unexported fields
}
RejectAdapter is a reject connected adapter
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
func (*Selector) MarshalJSON ¶ added in v0.10.0
func (*Selector) Type ¶
func (s *Selector) Type() C.AdapterType
type SelectorOption ¶
type ShadowSocks ¶
type ShadowSocks struct {
// contains filtered or unexported fields
}
func NewShadowSocks ¶
func NewShadowSocks(option ShadowSocksOption) (*ShadowSocks, error)
func (*ShadowSocks) Generator ¶
func (ss *ShadowSocks) Generator(metadata *C.Metadata) (adapter C.ProxyAdapter, err error)
func (*ShadowSocks) MarshalJSON ¶ added in v0.10.0
func (ss *ShadowSocks) MarshalJSON() ([]byte, error)
func (*ShadowSocks) Name ¶
func (ss *ShadowSocks) Name() string
func (*ShadowSocks) Type ¶
func (ss *ShadowSocks) Type() C.AdapterType
type ShadowSocksOption ¶
type ShadowsocksAdapter ¶
type ShadowsocksAdapter struct {
// contains filtered or unexported fields
}
ShadowsocksAdapter is a shadowsocks adapter
func (*ShadowsocksAdapter) Close ¶
func (ss *ShadowsocksAdapter) Close()
Close is used to close connection
func (*ShadowsocksAdapter) Conn ¶
func (ss *ShadowsocksAdapter) Conn() net.Conn
type Socks5 ¶
type Socks5 struct {
// contains filtered or unexported fields
}
func NewSocks5 ¶
func NewSocks5(option Socks5Option) *Socks5
func (*Socks5) MarshalJSON ¶ added in v0.10.0
func (*Socks5) Type ¶
func (ss *Socks5) Type() C.AdapterType
type Socks5Adapter ¶
type Socks5Adapter struct {
// contains filtered or unexported fields
}
Socks5Adapter is a shadowsocks adapter
func (*Socks5Adapter) Conn ¶
func (ss *Socks5Adapter) Conn() net.Conn
type Socks5Option ¶
type URLTest ¶
type URLTest struct {
// contains filtered or unexported fields
}
func NewURLTest ¶
func NewURLTest(option URLTestOption, proxies []C.Proxy) (*URLTest, error)
func (*URLTest) MarshalJSON ¶ added in v0.10.0
func (*URLTest) Type ¶
func (u *URLTest) Type() C.AdapterType
type URLTestOption ¶
type Vmess ¶
type Vmess struct {
// contains filtered or unexported fields
}
func NewVmess ¶
func NewVmess(option VmessOption) (*Vmess, error)
func (*Vmess) MarshalJSON ¶ added in v0.10.0
func (*Vmess) Type ¶
func (v *Vmess) Type() C.AdapterType
type VmessAdapter ¶
type VmessAdapter struct {
// contains filtered or unexported fields
}
VmessAdapter is a vmess adapter
func (*VmessAdapter) Conn ¶
func (v *VmessAdapter) Conn() net.Conn
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.