adapters

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direct

type Direct struct {
	// contains filtered or unexported fields
}

func NewDirect

func NewDirect(traffic *C.Traffic) *Direct

func (*Direct) Generator

func (d *Direct) Generator(addr *C.Addr) (adapter C.ProxyAdapter, err error)

func (*Direct) Name

func (d *Direct) Name() string

type DirectAdapter

type DirectAdapter struct {
	// contains filtered or unexported fields
}

DirectAdapter is a directly connected adapter

func (*DirectAdapter) Close

func (d *DirectAdapter) Close()

Close is used to close connection

func (*DirectAdapter) Conn

func (d *DirectAdapter) Conn() net.Conn

Conn is used to http request

func (*DirectAdapter) ReadWriter

func (d *DirectAdapter) ReadWriter() io.ReadWriter

ReadWriter is used to handle network traffic

type NopRW

type NopRW struct{}

func (*NopRW) Read

func (rw *NopRW) Read(b []byte) (int, error)

func (*NopRW) Write

func (rw *NopRW) Write(b []byte) (int, error)

type Reject

type Reject struct {
}

func NewReject

func NewReject() *Reject

func (*Reject) Generator

func (r *Reject) Generator(addr *C.Addr) (adapter C.ProxyAdapter, err error)

func (*Reject) Name

func (r *Reject) Name() string

type RejectAdapter

type RejectAdapter struct {
}

RejectAdapter is a reject connected adapter

func (*RejectAdapter) Close

func (r *RejectAdapter) Close()

Close is used to close connection

func (*RejectAdapter) Conn

func (r *RejectAdapter) Conn() net.Conn

Conn is used to http request

func (*RejectAdapter) ReadWriter

func (r *RejectAdapter) ReadWriter() io.ReadWriter

ReadWriter is used to handle network traffic

type ShadowSocks

type ShadowSocks struct {
	// contains filtered or unexported fields
}

func NewShadowSocks

func NewShadowSocks(name string, ssURL string, traffic *C.Traffic) (*ShadowSocks, error)

func (*ShadowSocks) Generator

func (ss *ShadowSocks) Generator(addr *C.Addr) (adapter C.ProxyAdapter, err error)

func (*ShadowSocks) Name

func (ss *ShadowSocks) Name() string

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

func (*ShadowsocksAdapter) ReadWriter

func (ss *ShadowsocksAdapter) ReadWriter() io.ReadWriter

ReadWriter is used to handle network traffic

type TrafficTrack

type TrafficTrack struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewTrafficTrack

func NewTrafficTrack(conn net.Conn, traffic *C.Traffic) *TrafficTrack

func (*TrafficTrack) Read

func (tt *TrafficTrack) Read(b []byte) (int, error)

func (*TrafficTrack) Write

func (tt *TrafficTrack) Write(b []byte) (int, error)

type URLTest

type URLTest struct {
	// contains filtered or unexported fields
}

func NewURLTest

func NewURLTest(name string, proxys []C.Proxy, rawURL string, delay time.Duration) (*URLTest, error)

func (*URLTest) Close

func (u *URLTest) Close()

func (*URLTest) Generator

func (u *URLTest) Generator(addr *C.Addr) (adapter C.ProxyAdapter, err error)

func (*URLTest) Name

func (u *URLTest) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL