knock

package
v0.0.0-...-74a3497 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Knock

type Knock interface {
	Handle(ipHeader *ipv4.Header, tcpPacket *layers.TCP) bool
}

Knock is an interface used to represent the "knock" mechanism

func NewStaticKnock

func NewStaticKnock(ports []uint16, doneCallback func()) Knock

NewStaticKnock creates a new static knock

func NewTOTPKnock

func NewTOTPKnock(cfg config.KnockTOTP, doneCallback func()) Knock

NewTOTPKnock creates a new TOTP knock

type Visitor

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

Visitor is a visitor that want to establish a real TCP connection

func NewVisitor

func NewVisitor(cfg config.Knock, doneCallback func()) *Visitor

NewVisitor creates a new visitor to knock the door

func (*Visitor) Handle

func (v *Visitor) Handle(ipHeader *ipv4.Header, tcpPacket *layers.TCP) bool

Handle handles the TCP packet

Jump to

Keyboard shortcuts

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