Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedCmd = errors.New("unsupported command") ErrUserPassAuth = errors.New("invalid username or password") )
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { HyClient *core.Client Transport *transport.ClientTransport AuthFunc func(username, password string) bool Method byte TCPAddr *net.TCPAddr TCPTimeout time.Duration ACLEngine *acl.Engine DisableUDP bool TCPRequestFunc func(addr net.Addr, reqAddr string, action acl.Action, arg string) TCPErrorFunc func(addr net.Addr, reqAddr string, err error) UDPAssociateFunc func(addr net.Addr) UDPErrorFunc func(addr net.Addr, err error) // contains filtered or unexported fields }
func NewServer ¶
func NewServer(hyClient *core.Client, transport *transport.ClientTransport, addr string, authFunc func(username, password string) bool, tcpTimeout time.Duration, aclEngine *acl.Engine, disableUDP bool, tcpReqFunc func(addr net.Addr, reqAddr string, action acl.Action, arg string), tcpErrorFunc func(addr net.Addr, reqAddr string, err error), udpAssocFunc func(addr net.Addr), udpErrorFunc func(addr net.Addr, err error), ) (*Server, error)
func (*Server) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.