sshproxy

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SshProxy

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

func Dial

func Dial(config SshProxyConfig) (*SshProxy, error)

Sets up a ssh connection to the serverAddr and provides handlers that forward http traffic to local addresses on the remote server

func (*SshProxy) Handle

func (p *SshProxy) Handle(remoteAddr string) http.Handler

Creates a http.Handler, that forwards traffic to the remoteAddr on the remote server

type SshProxyConfig

type SshProxyConfig struct {
	// ssh server host
	Host string
	// ssh server port, defaults to 22 (optional)
	Port int
	// user to authenticate against at the ssh server
	User string
	// path to the private key, defaults to the default private of the current user (optional)
	PrivKeyPath string
	// path to the public key of the server, using the known_hosts by default (optional)
	PubKeyPath string
	// ignores the public key validation, default = false (optional)
	AllowInsecureHost bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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