Documentation ¶
Index ¶
- Variables
- type Conn
- type GrpcHandler
- type GrpcHandlerFunc
- type GrpcServer
- type ObfsHandler
- type ObfsHandlerFunc
- type ObfsServer
- type QuicHandler
- type QuicHandlerFunc
- type QuicServer
- type Server
- type ServerGroup
- type ServerType
- type SshHandler
- type SshHandlerFunc
- type SshServer
- type TcpHandler
- type TcpHandlerFunc
- type TcpServer
- type WsHandler
- type WsHandlerFunc
- type WsServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServerClosed = errors.New("server: Server closed") ErrServerStarted = errors.New("server: Server started") )
Functions ¶
This section is empty.
Types ¶
type GrpcHandler ¶
type GrpcHandlerFunc ¶
func (GrpcHandlerFunc) ServeGRPC ¶
func (f GrpcHandlerFunc) ServeGRPC(conn net.Conn)
type GrpcServer ¶
type GrpcServer struct { proto.UnimplementedStreamServiceServer Addr string Handler GrpcHandler // contains filtered or unexported fields }
func NewGrpcServer ¶
func NewGrpcServer(addr string, handler GrpcHandler, opts options.Options) *GrpcServer
func (*GrpcServer) Close ¶
func (s *GrpcServer) Close() error
func (*GrpcServer) LocalAddr ¶
func (s *GrpcServer) LocalAddr() string
func (*GrpcServer) Serve ¶
func (s *GrpcServer) Serve(conn *Conn)
func (*GrpcServer) Transfer ¶
func (s *GrpcServer) Transfer(ss proto.StreamService_TransferServer) error
func (*GrpcServer) Type ¶
func (s *GrpcServer) Type() ServerType
type ObfsHandler ¶
type ObfsHandlerFunc ¶
func (ObfsHandlerFunc) ServeOBFS ¶
func (f ObfsHandlerFunc) ServeOBFS(conn net.Conn)
type ObfsServer ¶
type ObfsServer struct { Addr string Handler ObfsHandler // contains filtered or unexported fields }
func NewObfsServer ¶
func NewObfsServer(addr string, handler ObfsHandler, opts options.Options) *ObfsServer
func (*ObfsServer) Close ¶
func (s *ObfsServer) Close() error
func (*ObfsServer) LocalAddr ¶
func (s *ObfsServer) LocalAddr() string
func (*ObfsServer) Serve ¶
func (s *ObfsServer) Serve(*Conn)
func (*ObfsServer) Type ¶
func (s *ObfsServer) Type() ServerType
type QuicHandler ¶
type QuicHandlerFunc ¶
func (QuicHandlerFunc) ServeQUIC ¶
func (f QuicHandlerFunc) ServeQUIC(conn net.Conn)
type QuicServer ¶
type QuicServer struct { *quic.EarlyListener Addr string Handler QuicHandler // contains filtered or unexported fields }
func NewQuicServer ¶
func NewQuicServer(addr string, handler QuicHandler, opts options.Options) *QuicServer
func (*QuicServer) Close ¶
func (s *QuicServer) Close() error
func (*QuicServer) LocalAddr ¶
func (s *QuicServer) LocalAddr() string
func (*QuicServer) Serve ¶
func (s *QuicServer) Serve(conn *Conn)
func (*QuicServer) Type ¶
func (s *QuicServer) Type() ServerType
type ServerGroup ¶
type ServerGroup struct {
// contains filtered or unexported fields
}
func NewServerGroup ¶
func NewServerGroup() *ServerGroup
func (*ServerGroup) AddServer ¶
func (g *ServerGroup) AddServer(server Server)
func (*ServerGroup) Close ¶
func (g *ServerGroup) Close() error
func (*ServerGroup) Len ¶
func (g *ServerGroup) Len() int
func (*ServerGroup) Start ¶
func (g *ServerGroup) Start() error
type ServerType ¶
type ServerType byte
const ( Tcp ServerType = iota Socks Http SimpleTcpTun Ws Obfs Quic Mixed Grpc Ssh )
func (ServerType) String ¶
func (t ServerType) String() string
type SshHandler ¶ added in v1.1.1
type SshHandlerFunc ¶ added in v1.1.1
func (SshHandlerFunc) ServeSSH ¶ added in v1.1.1
func (f SshHandlerFunc) ServeSSH(conn net.Conn)
type SshServer ¶ added in v1.1.1
type SshServer struct { Addr string Handler SshHandler // contains filtered or unexported fields }
func NewSshServer ¶ added in v1.1.1
func NewSshServer(addr string, handler SshHandler, opts options.Options) *SshServer
func (*SshServer) Type ¶ added in v1.1.1
func (s *SshServer) Type() ServerType
type TcpHandler ¶
type TcpHandlerFunc ¶
func (TcpHandlerFunc) ServeTCP ¶
func (f TcpHandlerFunc) ServeTCP(conn net.Conn)
type TcpServer ¶
type TcpServer struct { Addr string Handler TcpHandler // contains filtered or unexported fields }
func NewTcpServer ¶
func NewTcpServer(addr string, handler TcpHandler, typ ServerType) *TcpServer
func (*TcpServer) Type ¶
func (s *TcpServer) Type() ServerType
type WsHandlerFunc ¶
func (WsHandlerFunc) ServeWS ¶
func (f WsHandlerFunc) ServeWS(conn net.Conn)
Click to show internal directories.
Click to hide internal directories.