Versions in this module Expand all Collapse all v2 v2.0.0 Sep 19, 2020 Changes in this version + var Log = log.New(os.Stdout, "", log.Ldate | log.Lmicroseconds | log.Lshortfile) + var LogLevel int = 3 + var NewDialer = DefaultDialerCreator + func DebugLog(format string, args ...interface{}) + func ErrorLog(format string, args ...interface{}) + func InfoLog(format string, args ...interface{}) + func WarnLog(format string, args ...interface{}) + type BalancedDialer struct + Conf xmap.M + Delay int64 + Filters []*BalancedFilter + ID string + PolicyList []*BalancedPolicy + Timeout int64 + func NewBalancedDialer() *BalancedDialer + func (b *BalancedDialer) AddDialer(dialers ...Dialer) + func (b *BalancedDialer) AddFilter(matcher string, access int) (err error) + func (b *BalancedDialer) AddPolicy(matcher string, limit []int64) (err error) + func (b *BalancedDialer) Bootstrap(options xmap.M) (err error) + func (b *BalancedDialer) Dial(sid uint64, uri string, pipe io.ReadWriteCloser) (r Conn, err error) + func (b *BalancedDialer) Matched(uri string) bool + func (b *BalancedDialer) Name() string + func (b *BalancedDialer) Options() xmap.M + type BalancedFilter struct + Access int + Matcher *regexp.Regexp + type BalancedPolicy struct + Limit []int64 + Matcher *regexp.Regexp + Scope string + type CodeError struct + ByteCode byte + Inner error + func (c *CodeError) Code() byte + func (c *CodeError) Error() string + type Conn interface + type CopyPipable struct + func NewCopyPipable(raw io.ReadWriteCloser) *CopyPipable + func (c *CopyPipable) Pipe(r io.ReadWriteCloser) (err error) + func (c *CopyPipable) String() string + type Dialer interface + Bootstrap func(options xmap.M) error + Dial func(sid uint64, uri string, raw io.ReadWriteCloser) (r Conn, err error) + Matched func(uri string) bool + Name func() string + Options func() xmap.M + func DefaultDialerCreator(t string) (dialer Dialer) + type DuplexPiped struct + DownReader *os.File + DownWriter *os.File + UpReader *os.File + UpWriter *os.File + func (d *DuplexPiped) Close() error + type EchoDialer struct + func NewEchoDialer() (dialer *EchoDialer) + func (e *EchoDialer) Bootstrap(options xmap.M) error + func (e *EchoDialer) Dial(sid uint64, uri string, pipe io.ReadWriteCloser) (r Conn, err error) + func (e *EchoDialer) Matched(uri string) bool + func (e *EchoDialer) Name() string + func (e *EchoDialer) Options() xmap.M + type EchoReadWriteCloser struct + func NewEchoReadWriteCloser() *EchoReadWriteCloser + func (e *EchoReadWriteCloser) Close() (err error) + func (e *EchoReadWriteCloser) Pipe(raw io.ReadWriteCloser) (err error) + func (e *EchoReadWriteCloser) Read(p []byte) (n int, err error) + func (e *EchoReadWriteCloser) String() string + func (e *EchoReadWriteCloser) Write(p []byte) (n int, err error) + type MapIntSorter struct + Data map[string][]int64 + Index int + List []string + func NewMapIntSorter(data map[string][]int64, index int) *MapIntSorter + func (m *MapIntSorter) Len() int + func (m *MapIntSorter) Less(i, j int) bool + func (m *MapIntSorter) Swap(i, j int) + type Pipable interface + Pipe func(r io.ReadWriteCloser) error + type PipedConn struct + func CreatePipedConn() (a, b *PipedConn, err error) + func (p *PipedConn) Close() error + func (p *PipedConn) LocalAddr() net.Addr + func (p *PipedConn) Network() string + func (p *PipedConn) Read(b []byte) (n int, err error) + func (p *PipedConn) RemoteAddr() net.Addr + func (p *PipedConn) SetDeadline(t time.Time) error + func (p *PipedConn) SetReadDeadline(t time.Time) error + func (p *PipedConn) SetWriteDeadline(t time.Time) error + func (p *PipedConn) String() string + func (p *PipedConn) Write(b []byte) (n int, err error) + type Pool struct + Dialers []Dialer + func NewPool() (pool *Pool) + func (p *Pool) AddDialer(dialers ...Dialer) (err error) + func (p *Pool) Bootstrap(options xmap.M) error + func (p *Pool) Dial(sid uint64, uri string, pipe io.ReadWriteCloser) (r Conn, err error) + type SocksProxyAddressPooler interface + Done func(address, uri string, err error) + Get func(uri string) (address string, err error) + type SocksProxyDialer struct + ID string + Pooler SocksProxyAddressPooler + func NewSocksProxyDialer() *SocksProxyDialer + func (s *SocksProxyDialer) Bootstrap(options xmap.M) (err error) + func (s *SocksProxyDialer) Dial(sid uint64, uri string, pipe io.ReadWriteCloser) (raw Conn, err error) + func (s *SocksProxyDialer) Matched(uri string) bool + func (s *SocksProxyDialer) Name() string + func (s *SocksProxyDialer) Options() xmap.M + func (s *SocksProxyDialer) String() string + type Statable interface + State func() xmap.M + type StateBuffer struct + func NewStateBuffer(alias string, buf *bytes.Buffer) *StateBuffer + func (s *StateBuffer) Close() (err error) + func (s *StateBuffer) Read(p []byte) (n int, err error) + func (s *StateBuffer) String() string + func (s *StateBuffer) Write(p []byte) (n int, err error) + type StateDialer struct + Alias string + State Statable + func NewStateDialer(alias string, s Statable) *StateDialer + func (s *StateDialer) Bootstrap(options xmap.M) error + func (s *StateDialer) Dial(sid uint64, uri string, raw io.ReadWriteCloser) (conn Conn, err error) + func (s *StateDialer) Matched(uri string) bool + func (s *StateDialer) Name() string + func (s *StateDialer) Options() xmap.M + type StringAddressPooler string + func (s StringAddressPooler) Done(address, uri string, err error) + func (s StringAddressPooler) Get(uri string) (address string, err error) + type TCPDialer struct + func NewTCPDialer() *TCPDialer + func (t *TCPDialer) Bootstrap(options xmap.M) error + func (t *TCPDialer) Dial(sid uint64, uri string, pipe io.ReadWriteCloser) (raw Conn, err error) + func (t *TCPDialer) Matched(uri string) bool + func (t *TCPDialer) Name() string + func (t *TCPDialer) Options() xmap.M + func (t *TCPDialer) String() string + type WebDialer struct + func NewWebDialer() (dialer *WebDialer) + func (web *WebDialer) Accept() (conn net.Conn, err error) + func (web *WebDialer) Addr() net.Addr + func (web *WebDialer) Bootstrap(options xmap.M) error + func (web *WebDialer) Close() error + func (web *WebDialer) Dial(sid uint64, uri string, pipe io.ReadWriteCloser) (raw Conn, err error) + func (web *WebDialer) Matched(uri string) bool + func (web *WebDialer) Name() string + func (web *WebDialer) Network() string + func (web *WebDialer) Options() xmap.M + func (web *WebDialer) ServeHTTP(resp http.ResponseWriter, req *http.Request) + func (web *WebDialer) Shutdown() error + func (web *WebDialer) String() string + type WebDialerConn struct + DIR string + SID uint64 + URI string + func PipeWebDialerConn(sid uint64, uri string) (conn *WebDialerConn, raw io.ReadWriteCloser, err error) + func (w *WebDialerConn) LocalAddr() net.Addr + func (w *WebDialerConn) Network() string + func (w *WebDialerConn) RemoteAddr() net.Addr + func (w *WebDialerConn) String() string + type WebdavHandler struct + func NewWebdavHandler(dir string) *WebdavHandler + func (w *WebdavHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) Other modules containing this package github.com/codingeasygo/bsck