sshproxy

package
v0.0.0-...-603914b Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUpstreamNotFound = errors.New("upstream not found")
View Source
var Version = "0.0.0"

Functions

This section is empty.

Types

type GetUpstreamCallback

type GetUpstreamCallback func(ctx context.Context, id string) (Upstream, error)

GetUpstreamCallback should return ErrUpstreamNotFound if upstream not found and any error value in case of other errors. The implementation should set reasonable timeouts for long-running operations, the caller side don't apply any timeout when calling the function.

type Host

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

func NewHost

func NewHost(address string, user string, privateKey ssh.Signer) Host

type HostKey

type HostKey = ssh.Signer

func LoadHostKeysFromBlob

func LoadHostKeysFromBlob(blob []byte) ([]HostKey, error)

func LoadHostKeysFromFile

func LoadHostKeysFromFile(path string) ([]HostKey, error)

type Server

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

func NewServer

func NewServer(
	ctx context.Context, address string, port int,
	hostKeys []HostKey, getUpstream GetUpstreamCallback,
) *Server

func (*Server) Close

func (s *Server) Close(ctx context.Context) error

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

type Upstream

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

func NewUpstream

func NewUpstream(hosts []Host, authorizedKeys []ssh.PublicKey) Upstream

func (*Upstream) IsAuthorized

func (u *Upstream) IsAuthorized(publicKey ssh.PublicKey) bool

Jump to

Keyboard shortcuts

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