runnel

package
v0.0.0-...-c14c6da Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ForwardedStreamlocalChannelType     = "forwarded-streamlocal@openssh.com"
	StreamlocalForwardChannelType       = "streamlocal-forward@openssh.com"
	CancelStreamlocalForwardChannelType = "cancel-streamlocal-forward@openssh.com"

	KeepaliveRequestType = "keepalive"
)
View Source
const (
	ForwardCommandName = "forward"
	HelpCommandName    = "help"
)
View Source
const DefaultAddr = "0.0.0.0:6455"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Command  string
	Callback func(ssh.Session, *flag.FlagSet, []string)
}

type ForwardHandler

type ForwardHandler struct {
	DB models.DB

	sync.Mutex
	// contains filtered or unexported fields
}

func NewForwardHandler

func NewForwardHandler(ctx context.Context, db models.DB) *ForwardHandler

func (*ForwardHandler) HandleCancelStreamlocalForward

func (h *ForwardHandler) HandleCancelStreamlocalForward(ctx ssh.Context, srv *ssh.Server, req *gossh.Request) (bool, []byte)

func (*ForwardHandler) HandleStreamlocalForward

func (h *ForwardHandler) HandleStreamlocalForward(ctx ssh.Context, srv *ssh.Server, req *gossh.Request) (bool, []byte)

type GitHubAuthenticator

type GitHubAuthenticator struct {
	Logger *zap.Logger

	*github.Client
}

func (GitHubAuthenticator) Auth

func (auth GitHubAuthenticator) Auth(ctx ssh.Context, key ssh.PublicKey) bool

type SSHHandler

type SSHHandler struct {
}

type Server

type Server struct {
	Addr           string
	HostKeyPath    string
	HostKeyContent string

	DB    models.DB
	Blobs *blobs.Bucket
	// contains filtered or unexported fields
}

func Listen

func Listen(config *cfg.Config, logger *logs.Logger, db *models.Conn, bucket *blobs.Bucket) *Server

func (*Server) HandleForwardCommand

func (server *Server) HandleForwardCommand(s ssh.Session, flags *flag.FlagSet, args []string)

func (*Server) ListenAndServe

func (server *Server) ListenAndServe() error

func (*Server) Wait

func (server *Server) Wait() error

Jump to

Keyboard shortcuts

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