ssh

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package ssh is used to handle SSH connections and forwarding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*ssh.ServerConfig
	// contains filtered or unexported fields
}

Server using SSH with tcp forwarding.

func NewServer

func NewServer(
	listenAddress string,
	config *ssh.ServerConfig,
	jwt jwt.Service,
	routes route.Repository,
	domain string,
	anonymous bool,
) *Server

NewServer instanciates a new ssh server with tcp forwarding.

func (*Server) ForwardHTTP

func (s *Server) ForwardHTTP(next http.Handler) http.Handler

ForwardHTTP is a middleware that forwards HTTP request based on the subdomain to a corresponding SSH client.

func (*Server) Serve

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

Serve executes the listening loop and logic.

Jump to

Keyboard shortcuts

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