remote

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP2Handler added in v0.5.36

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

HTTP2Handler type represents the handler that accepts incoming wormhole connections

func NewHTTP2Handler added in v0.5.36

func NewHTTP2Handler(cfg *config.ServerConfig, registry *session.Registry, pool *redis.Pool, factory wnet.ListenerFactory) (*HTTP2Handler, error)

NewHTTP2Handler ...

func (*HTTP2Handler) Close added in v0.5.36

func (h *HTTP2Handler) Close()

Close closes all sessions handled by HTTP2Handler

func (*HTTP2Handler) Serve added in v0.5.36

func (h *HTTP2Handler) Serve(conn net.Conn)

Serve accepts incoming wormhole connections and passes them to the handler We are explicit with the *net.TCPConn since we need to be this way - and let the handler and sessions handle wrapping in TLS. Having a TCPConn all the way down will highlight the dangers of sending data over the socket without first wrapping in TLS

type Handler

type Handler interface {
	Serve(net.Conn)
	Close()
}

Handler serves a connection. It's the entry point for starting a session, managing a handshake, auth and encryption (e.g. SSH)

type SSHHandler

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

SSHHandler type represents the handler that accepts incoming wormhole connections

func NewSSHHandler

func NewSSHHandler(cfg *config.ServerConfig, registry *session.Registry, pool *redis.Pool, factory wnet.ListenerFactory) (*SSHHandler, error)

NewSSHHandler returns a new SSHHandler

func (*SSHHandler) Close

func (s *SSHHandler) Close()

Close closes all sessions handled by SSHandler

func (*SSHHandler) Serve

func (s *SSHHandler) Serve(conn net.Conn)

Serve accepts incoming wormhole connections and passes them to the handler

type Server

type Server struct {
	Logger *logrus.Logger
}

Server contains configuration options for a TCP Server

func (*Server) Serve added in v0.7.0

func (s *Server) Serve(listener net.Listener, handler Handler) error

Serve accepts incoming wormhole connections and passes them to the handler

type TCPHandler

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

TCPHandler type represents the handler that accepts incoming wormhole connections WARNING: TCPHandler is insecure and shouldn't be used in production

func NewTCPHandler

func NewTCPHandler(cfg *config.ServerConfig, registry *session.Registry, pool *redis.Pool, factory wnet.ListenerFactory) (*TCPHandler, error)

NewTCPHandler ...

func (*TCPHandler) Close

func (h *TCPHandler) Close()

Close closes all sessions handled by TCPHandler

func (*TCPHandler) Serve

func (h *TCPHandler) Serve(conn net.Conn)

Serve accepts incoming wormhole connections and passes them to the handler

Jump to

Keyboard shortcuts

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