core

package
v1.4.15 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: GPL-3.0 Imports: 14 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Portfwds = portfwds{
		// contains filtered or unexported fields
	}
)
View Source
var (
	// Tunnels - Holds refs to all tunnels
	Tunnels tunnels
)

Functions

func TunnelLoop

func TunnelLoop(rpc rpcpb.SliverRPCClient) error

TunnelLoop - Parses incoming tunnel messages and distributes them

to session/tunnel objects

Types

type ChannelProxy added in v1.4.12

type ChannelProxy struct {
	Rpc     rpcpb.SliverRPCClient
	Session *clientpb.Session

	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 added in v1.4.12

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

func (*ChannelProxy) Host added in v1.4.12

func (p *ChannelProxy) Host() string

func (*ChannelProxy) HostPort added in v1.4.12

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

func (*ChannelProxy) Port added in v1.4.12

func (p *ChannelProxy) Port() uint32

type Portfwd added in v1.4.12

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

Portfwd - Tracks portfwd<->tcpproxy

func (*Portfwd) GetMetadata added in v1.4.12

func (p *Portfwd) GetMetadata() *PortfwdMeta

type PortfwdMeta added in v1.4.12

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

PortfwdMeta - Metadata about a portfwd listener

type Tunnel

type Tunnel struct {
	ID        uint64
	IsOpen    bool
	SessionID uint32

	Send chan []byte
	Recv chan []byte
}

Tunnel - Duplex data tunnel

func (*Tunnel) Read

func (tun *Tunnel) Read(data []byte) (int, error)

Read - Reader method for interface

func (*Tunnel) Write

func (tun *Tunnel) Write(data []byte) (int, error)

Write - Writer method for interface

Jump to

Keyboard shortcuts

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