sshproxy

package module
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 17 Imported by: 4

README

sshproxy

SSH Proxy server and client

Build Go Report Card GoDoc GitHub license gocover.io

This project is to add protocol support for the Bridge, or it can be used alone

The following is the implementation of other proxy protocols

Usage

API Documentation

Example

License

Licensed under the MIT License. See LICENSE for the full license text.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewServer = sshd.NewServer

Functions

This section is empty.

Types

type Dialer

type Dialer struct {

	// ProxyDial specifies the optional dial function for
	// establishing the transport connection.
	ProxyDial func(context.Context, string, string) (net.Conn, error)
	// contains filtered or unexported fields
}

func NewDialer

func NewDialer(addr string) (*Dialer, error)

NewDialer returns a new Dialer that dials through the provided proxy server's network and address.

func NewDialerWithConfig added in v0.2.0

func NewDialerWithConfig(host string, config *ssh.ClientConfig) (*Dialer, error)

func (*Dialer) Close added in v0.1.10

func (d *Dialer) Close() error

func (*Dialer) CommandDialContext

func (d *Dialer) CommandDialContext(ctx context.Context, name string, args ...string) (net.Conn, error)

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*Dialer) Listen

func (d *Dialer) Listen(ctx context.Context, network, address string) (net.Listener, error)

func (*Dialer) SSHClient added in v0.2.0

func (d *Dialer) SSHClient(ctx context.Context) (*ssh.Client, error)

type Server

type Server = sshd.Server

type SimpleServer

type SimpleServer struct {
	Server
	Listener net.Listener
	Username string
	Password string
	Network  string
	Address  string
}

SimpleServer is a simplified server, which can be configured as easily as client.

func NewSimpleServer

func NewSimpleServer(addr string) (*SimpleServer, error)

NewSimpleServer creates a new NewSimpleServer

func (*SimpleServer) Close

func (s *SimpleServer) Close() error

Close closes the listener

func (*SimpleServer) ProxyURL

func (s *SimpleServer) ProxyURL() string

ProxyURL returns the URL of the proxy

func (*SimpleServer) Run

func (s *SimpleServer) Run(ctx context.Context) error

Run the server

func (*SimpleServer) Start

func (s *SimpleServer) Start(ctx context.Context) error

Start the server

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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