remote

package
v0.5.33 Latest Latest
Warning

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

Go to latest
Published: May 2, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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, pool *redis.Pool) (*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 {
	TLSCert       *[]byte
	TLSPrivateKey *[]byte
	Logger        *logrus.Logger
}

Server contains configuration options for a TCP Server

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string, handler Handler) error

ListenAndServe 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, pool *redis.Pool) (*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