events

package
v0.0.0-...-3f6358d Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCP  string = "tcp"
	HTTP string = "http"
)

Variables

This section is empty.

Functions

func WriteError

func WriteError(conn io.Writer, message string, args ...string) error

Types

type ConnectionReceived

type ConnectionReceived struct {
	ClientIP    net.IP
	ClientPort  uint16
	RateLimited bool
}

type Event

type Event[Type EventType] struct {
	Data *Type
}

func (*Event[EventType]) Read

func (e *Event[EventType]) Read(conn io.Reader) error

func (*Event[EventType]) Write

func (e *Event[EventType]) Write(conn io.Writer) error

type EventType

type EventType interface {
	TunnelRequested | TunnelOpened | ConnectionReceived
}

type TunnelOpened

type TunnelOpened struct {
	Hostname      string
	Protocol      string
	PublicServer  uint16
	PrivateServer uint16
	ErrorMessage  string
}

type TunnelRequested

type TunnelRequested struct {
	Protocol  string
	Subdomain string
	CanonName string
}

Jump to

Keyboard shortcuts

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