Versions in this module Expand all Collapse all v0 v0.2.0 Mar 19, 2020 Changes in this version + const CmdConnBack + const CmdConnClose + const CmdConnData + const CmdConnDial + const DefaultBufferSize + const LogLevelDebug + const LogLevelError + const LogLevelInfo + const LogLevelWarn + var BasePipe = os.Pipe + func DebugLog(format string, args ...interface{}) + func ErrorLog(format string, args ...interface{}) + func InfoLog(format string, args ...interface{}) + func Now() int64 + func ReadJSON(filename string, v interface{}) (err error) + func SHA1(data []byte) string + func SetLogLevel(l int) + func WarnLog(format string, args ...interface{}) + func WriteJSON(filename string, v interface{}) (err error) + type BaseConn struct + Err error + func NewBaseConn(raw io.ReadWriter, bufferSize int) (conn *BaseConn) + func (b *BaseConn) Close() (err error) + func (b *BaseConn) ID() uint64 + func (b *BaseConn) PreErr() (err error) + func (b *BaseConn) ReadCmd() (cmd []byte, err error) + func (b *BaseConn) SetErr(err error) + func (b *BaseConn) String() string + func (b *BaseConn) WriteCmd(cmd []byte) (w int, err error) + type Client struct + BufferSize int + Dialer Dialer + HTTPClient *http.Client + func NewClient(bufferSize int, dialer Dialer) (client *Client) + func (c *Client) Close() (err error) + func (c *Client) HTTPGet(uri string) (data []byte, err error) + func (c *Client) ProcConn(raw io.ReadWriteCloser, target string) (err error) + type Conn interface + Close func() (err error) + ID func() uint64 + PreErr func() (err error) + ReadCmd func() (cmd []byte, err error) + SetErr func(err error) + WriteCmd func(cmd []byte) (w int, err error) + type Dialer interface + Dial func(remote string) (raw io.ReadWriteCloser, err error) + type DialerF func(remote string) (raw io.ReadWriteCloser, err error) + func (d DialerF) Dial(remote string) (raw io.ReadWriteCloser, err error) + type JSONFileAuth struct + FileName string + func NewJSONFileAuth(adimUser map[string]string, filename string) (auth *JSONFileAuth) + func (j *JSONFileAuth) AddUser(res http.ResponseWriter, req *http.Request) + func (j *JSONFileAuth) BasicAuth(req *http.Request) (ok bool, err error) + func (j *JSONFileAuth) ListUser(res http.ResponseWriter, req *http.Request) + func (j *JSONFileAuth) RemoveUser(res http.ResponseWriter, req *http.Request) + type NetDialer string + func (t NetDialer) Dial(remote string) (raw io.ReadWriteCloser, err error) + type PipedConn struct + Alias string + func CreatePipeConn() (a, b *PipedConn, err error) + func (p *PipedConn) Close() (err error) + func (p *PipedConn) LocalAddr() net.Addr + func (p *PipedConn) Network() string + 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 + type Server struct + BufferSize int + Dialer Dialer + func NewServer(bufferSize int, dialer Dialer) (server *Server) + func (s *Server) ProcConn(conn Conn) (err error) + type SocksProxy struct + Dialer func(uri string, raw io.ReadWriteCloser) (sid uint64, err error) + HTTPUpstream string + func NewSocksProxy() (socks *SocksProxy) + func (s *SocksProxy) Listen(addr string) (err error) + func (s *SocksProxy) Run() (err error) + type SortedDialer struct + RateTolerance float32 + SortDelay int64 + func NewSortedDialer(dialers ...Dialer) (dialer *SortedDialer) + func (s *SortedDialer) Dial(remote string) (raw io.ReadWriteCloser, err error) + func (s *SortedDialer) Len() int + func (s *SortedDialer) Less(i, j int) (r bool) + func (s *SortedDialer) State() interface{} + func (s *SortedDialer) Swap(i, j int) + type Statable interface + State func() interface{} + type StringConn struct + Name string + func NewStringConn(raw io.ReadWriteCloser) *StringConn + func (s *StringConn) String() string + type TCPKeepAliveListener struct + func (ln TCPKeepAliveListener) Accept() (net.Conn, error) + type WebsocketDialer string + func (w WebsocketDialer) Dial(remote string) (raw io.ReadWriteCloser, err error)