Documentation ¶
Index ¶
- func CommandPinger(target string) (bool, error)
- func JumpHandler(sshPriv ssh.Signer) internal.ChannelHandler
- func LocalForward(_ *internal.User, newChannel ssh.NewChannel, l logger.Logger)
- func ProcessICMP(nstack *stack.Stack, pkt *stack.PacketBuffer)
- func Proxy(c1, c2 net.Conn) error
- func RawPinger(target string) (bool, error)
- func ServerConsoleSession(ServerConn ssh.Conn) internal.ChannelHandler
- func Session(user *internal.User, newChannel ssh.NewChannel, log logger.Logger)
- func StartRemoteForward(user *internal.User, r *ssh.Request, sshConn ssh.Conn)
- func StopRemoteForward(rf internal.RemoteForwardRequest) error
- func TryResolve(address string) bool
- func Tun(_ *internal.User, newChannel ssh.NewChannel, l logger.Logger)
- type SSHEndpoint
- func (*SSHEndpoint) ARPHardwareType() header.ARPHardwareType
- func (*SSHEndpoint) AddHeader(pkt *stack.PacketBuffer)
- func (m *SSHEndpoint) Attach(dispatcher stack.NetworkDispatcher)
- func (m *SSHEndpoint) Capabilities() stack.LinkEndpointCapabilities
- func (m *SSHEndpoint) IsAttached() bool
- func (m *SSHEndpoint) LinkAddress() tcpip.LinkAddress
- func (m *SSHEndpoint) MTU() uint32
- func (m *SSHEndpoint) MaxHeaderLength() uint16
- func (m *SSHEndpoint) Wait()
- func (m *SSHEndpoint) WritePacket(pkt *stack.PacketBuffer) tcpip.Error
- func (m *SSHEndpoint) WritePackets(pkts stack.PacketBufferList) (int, tcpip.Error)
- func (*SSHEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandPinger ¶ added in v1.0.4
CommandPinger uses the internal ping command (dirty), but should not require privileges
func JumpHandler ¶
func JumpHandler(sshPriv ssh.Signer) internal.ChannelHandler
func LocalForward ¶
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 RawPinger ¶ added in v1.0.4
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 ¶
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 StopRemoteForward ¶
func StopRemoteForward(rf internal.RemoteForwardRequest) error
func TryResolve ¶ added in v1.0.4
TryResolve tries to discover if the remote host is up using ICMP
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.