rportfwd

package
v1.5.34 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Portfwds - Struct instance that holds all the portfwds
	Portfwds = portfwds{
		// contains filtered or unexported fields
	}
)

Functions

func NewTunnelID

func NewTunnelID() uint64

NewTunnelID - New 64-bit identifier

Types

type ChannelProxy

type ChannelProxy struct {
	Conn *transports.Connection

	BindAddr        string
	RemoteAddr      string
	KeepAlivePeriod time.Duration
	DialTimeout     time.Duration
}

ChannelProxy binds the Sliver Tunnel to a net.Conn object one ChannelProxy per port bind.

Implements the Target interface from tcpproxy pkg

func (*ChannelProxy) HandleConn

func (p *ChannelProxy) HandleConn(src net.Conn)

HandleConn - Handle a TCP connection

func (*ChannelProxy) Host

func (p *ChannelProxy) Host() string

Host - Returns the host (i.e., interface) of the TCP proxy

func (*ChannelProxy) HostPort

func (p *ChannelProxy) HostPort() (string, uint32)

HostPort - Returns the host and port of the TCP proxy

func (*ChannelProxy) Port

func (p *ChannelProxy) Port() uint32

Port - Returns the TCP port of the proxy

type Portfwd

type Portfwd struct {
	ID           int
	TCPProxy     *tcpproxy.Proxy
	ChannelProxy *ChannelProxy
}

Portfwd - Tracks portfwd<->tcpproxy

func (*Portfwd) GetMetadata

func (p *Portfwd) GetMetadata() *PortfwdMeta

GetMetadata - Get metadata about the portfwd

type PortfwdMeta

type PortfwdMeta struct {
	ID         int
	SessionID  string
	BindAddr   string
	RemoteAddr string
}

PortfwdMeta - Metadata about a portfwd listener

Jump to

Keyboard shortcuts

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