handlers

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: BSD-3-Clause Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandPinger added in v1.0.4

func CommandPinger(target string) (bool, error)

CommandPinger uses the internal ping command (dirty), but should not require privileges

func JumpHandler

func JumpHandler(sshPriv ssh.Signer) internal.ChannelHandler

func LocalForward

func LocalForward(_ *internal.User, newChannel ssh.NewChannel, l logger.Logger)

func ProcessICMP added in v1.0.4

func ProcessICMP(nstack *stack.Stack, pkt *stack.PacketBuffer)

ProcessICMP send back a ICMP echo reply from after receiving a echo request. This code come mostly from pkg/tcpip/network/ipv4/icmp.go

func Proxy added in v1.0.4

func Proxy(c1, c2 net.Conn) error

func RawPinger added in v1.0.4

func RawPinger(target string) (bool, error)

RawPinger use ICMP sockets to discover if a host is up. This could require administrative permissions on some hosts

func ServerConsoleSession added in v1.0.13

func ServerConsoleSession(ServerConn ssh.Conn) internal.ChannelHandler

func Session

func Session(user *internal.User, newChannel ssh.NewChannel, log logger.Logger)

Session has a lot of 'function' in ssh. It can be used for shell, exec, subsystem, pty-req and more. However these calls are done through requests, rather than opening a new channel This callback just sorts out what the client wants to be doing

func StartRemoteForward

func StartRemoteForward(user *internal.User, r *ssh.Request, sshConn ssh.Conn)

func StopRemoteForward

func StopRemoteForward(rf internal.RemoteForwardRequest) error

func TryResolve added in v1.0.4

func TryResolve(address string) bool

TryResolve tries to discover if the remote host is up using ICMP

func Tun added in v1.0.4

func Tun(_ *internal.User, newChannel ssh.NewChannel, l logger.Logger)

Types

type SSHEndpoint added in v1.0.4

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

func NewSSHEndpoint added in v1.0.4

func NewSSHEndpoint(dev ssh.Channel) *SSHEndpoint

func (*SSHEndpoint) ARPHardwareType added in v1.0.4

func (*SSHEndpoint) ARPHardwareType() header.ARPHardwareType

ARPHardwareType implements stack.LinkEndpoint.ARPHardwareType.

func (*SSHEndpoint) AddHeader added in v1.0.4

func (*SSHEndpoint) AddHeader(pkt *stack.PacketBuffer)

AddHeader implements stack.LinkEndpoint.AddHeader.

func (*SSHEndpoint) Attach added in v1.0.4

func (m *SSHEndpoint) Attach(dispatcher stack.NetworkDispatcher)

Attach implements stack.LinkEndpoint.

func (*SSHEndpoint) Capabilities added in v1.0.4

func (m *SSHEndpoint) Capabilities() stack.LinkEndpointCapabilities

Capabilities implements stack.LinkEndpoint.

func (*SSHEndpoint) IsAttached added in v1.0.4

func (m *SSHEndpoint) IsAttached() bool

IsAttached implements stack.LinkEndpoint.

func (*SSHEndpoint) LinkAddress added in v1.0.4

func (m *SSHEndpoint) LinkAddress() tcpip.LinkAddress

LinkAddress implements stack.LinkEndpoint.

func (*SSHEndpoint) MTU added in v1.0.4

func (m *SSHEndpoint) MTU() uint32

MTU implements stack.LinkEndpoint.

func (*SSHEndpoint) MaxHeaderLength added in v1.0.4

func (m *SSHEndpoint) MaxHeaderLength() uint16

MaxHeaderLength implements stack.LinkEndpoint.

func (*SSHEndpoint) Wait added in v1.0.4

func (m *SSHEndpoint) Wait()

Wait implements stack.LinkEndpoint.Wait.

func (*SSHEndpoint) WritePacket added in v1.0.4

func (m *SSHEndpoint) WritePacket(pkt *stack.PacketBuffer) tcpip.Error

WritePacket writes outbound packets

func (*SSHEndpoint) WritePackets added in v1.0.4

func (m *SSHEndpoint) WritePackets(pkts stack.PacketBufferList) (int, tcpip.Error)

WritePackets writes outbound packets

func (*SSHEndpoint) WriteRawPacket added in v1.0.4

func (*SSHEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error

WriteRawPacket implements stack.LinkEndpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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