proxy

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TCPServer

func TCPServer(listener net.Listener, handler TCPHandler) error

Types

type Pipe

type Pipe struct {
	Src net.Conn
	Dst net.Conn
}

func NewPipe

func NewPipe(src, dst net.Conn) *Pipe

func (*Pipe) Close

func (p *Pipe) Close()

func (*Pipe) Run

func (p *Pipe) Run() error

type SSHProxy

type SSHProxy struct {
	// if the client is ssh proxy client, this field will be set
	LocalListener    net.Listener
	SSHConfig        *config.SSHConf
	RemoteTunnelConn net.Conn
}

func (*SSHProxy) Close

func (s *SSHProxy) Close() error

func (*SSHProxy) NewTCPServer

func (s *SSHProxy) NewTCPServer() error

func (*SSHProxy) Start

func (s *SSHProxy) Start(handler TCPHandler) error

func (*SSHProxy) WaitForTunnelConn

func (s *SSHProxy) WaitForTunnelConn() error

type TCPHandler

type TCPHandler func(net.Conn)

Jump to

Keyboard shortcuts

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