Documentation ¶
Index ¶
- Constants
- Variables
- func Fetch(p Proxy, req *http.Request) (*http.Response, error)
- func SetReadDeadline(t time.Time) error
- func SetWriteDeadline(t time.Time) error
- type PingAddr
- type PingConn
- func (pc *PingConn) Close() error
- func (pc *PingConn) LocalAddr() net.Addr
- func (pc *PingConn) Read(p []byte) (n int, err error)
- func (pc *PingConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (pc *PingConn) RemoteAddr() net.Addr
- func (pc *PingConn) SetDeadline(t time.Time) error
- func (pc *PingConn) SetReadDeadline(t time.Time) error
- func (pc *PingConn) SetWriteDeadline(t time.Time) error
- func (pc *PingConn) Write(p []byte) (n int, err error)
- func (pc *PingConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- type Proxies
- type Proxy
- func NewBaseProxy(c protect.Controller) Proxy
- func NewExitProxy(c protect.Controller) Proxy
- func NewGroundProxy() Proxy
- func NewHTTPProxy(id string, c protect.Controller, po *settings.ProxyOptions) (Proxy, error)
- func NewPipProxy(id string, ctl protect.Controller, po *settings.ProxyOptions) (Proxy, error)
- func NewPipWsProxy(id string, ctl protect.Controller, po *settings.ProxyOptions) (Proxy, error)
- func NewSocks5Proxy(id string, ctl protect.Controller, po *settings.ProxyOptions) (Proxy, error)
- type WgProxy
Constants ¶
View Source
const ( Block = x.Block Base = x.Base Exit = x.Exit OrbotS5 = x.OrbotS5 OrbotH1 = x.OrbotH1 SOCKS5 = x.SOCKS5 HTTP1 = x.HTTP1 WG = x.WG PIPH2 = x.PIPH2 PIPWS = x.PIPWS NOOP = x.NOOP INTERNET = x.INTERNET TZZ = x.TZZ TUP = x.TUP TOK = x.TOK TKO = x.TKO END = x.END NOMTU = 0 MAXMTU = 65535 )
View Source
const (
FAST = x.WGFAST
)
Variables ¶
View Source
var PROXYGATEWAY = &gw{ok: true}
PROXYGATEWAY is a Router that routes everything.
View Source
var PROXYNOGATEWAY = &gw{ok: false}
PROXYNOGATEWAY is a Router that routes nothing.
Functions ¶
func SetReadDeadline ¶
func SetWriteDeadline ¶
Types ¶
type PingAddr ¶
type PingAddr struct {
// contains filtered or unexported fields
}
func PingAddrFromAddr ¶
type PingConn ¶
type PingConn struct {
// contains filtered or unexported fields
}
func (*PingConn) RemoteAddr ¶
type Proxies ¶
type Proxies interface { x.Proxies // Get returns a transport from this multi-transport. ProxyFor(id string) (Proxy, error) }
func NewProxifier ¶
func NewProxifier(c protect.Controller, o x.ProxyListener) Proxies
type Proxy ¶
type Proxy interface { x.Proxy // Dial returns a connection to this proxy. Dial(network, addr string) (protect.Conn, error) // Announce returns a packet-oriented udp connection on this proxy. Announce(network, local string) (protect.PacketConn, error) // Accept returns a listener for this proxy. Accept(network, local string) (protect.Listener, error) // Dialer returns the dialer for this proxy, which is an // adapter for protect.RDialer interface, but with the caveat that // not all Proxy instances implement DialTCP and DialUDP, though are // guaranteed to implement Dial. Dialer() *protect.RDial // contains filtered or unexported methods }
func NewBaseProxy ¶
func NewBaseProxy(c protect.Controller) Proxy
func NewExitProxy ¶
func NewExitProxy(c protect.Controller) Proxy
func NewGroundProxy ¶
func NewGroundProxy() Proxy
func NewHTTPProxy ¶
func NewHTTPProxy(id string, c protect.Controller, po *settings.ProxyOptions) (Proxy, error)
func NewPipProxy ¶
func NewPipProxy(id string, ctl protect.Controller, po *settings.ProxyOptions) (Proxy, error)
func NewPipWsProxy ¶
func NewPipWsProxy(id string, ctl protect.Controller, po *settings.ProxyOptions) (Proxy, error)
func NewSocks5Proxy ¶
func NewSocks5Proxy(id string, ctl protect.Controller, po *settings.ProxyOptions) (Proxy, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.