relay

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	ID         string
	AuthkeyB64 string
	Cipher     crypto.SymmetricCipher

	// Lock when reading or writing
	Conn       net.Conn
	LastActive time.Time
	Relaying   bool
	Mu         sync.Mutex
}

func (*Connection) SendMsgDetectAlive

func (c *Connection) SendMsgDetectAlive() (alive bool)

Be careful of deadlocks

type Relay

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

func NewRelay

func NewRelay(config config.Config) *Relay

func (*Relay) AddConnection

func (r *Relay) AddConnection(id string, conn net.Conn, authKey auth.AES192Key, cipher crypto.SymmetricCipher)

func (*Relay) RemoveLongConnection

func (r *Relay) RemoveLongConnection(id string)

func (*Relay) Run

func (r *Relay) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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