remote

package
v0.8.77 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: AGPL-3.0, AGPL-3.0-or-later, Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStaticHandler

func NewStaticHandler() (http.Handler, error)

Types

type Authenticator

type Authenticator interface {
	AuthLogin(message event.LoginEvent, psk security.PSK) (event.LoginResponse, error)
	AuthLogout()
	Reset()
	PrivateKey() ed25519.PrivateKey
	IsAuthenticated() bool
}

Authenticator is the slice of the auth service the dispatcher uses: log the owner in and out, and sign self-stream requests with their key.

type BridgeHandler

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

func NewBridgeHandler

func NewBridgeHandler(
	handshake HandshakeFunc,
	auth Authenticator,
	psk security.PSK,
	firstRun func() bool,
) *BridgeHandler

func (*BridgeHandler) AttachNode

func (b *BridgeHandler) AttachNode(n Node)

func (*BridgeHandler) Handle

func (b *BridgeHandler) Handle() http.HandlerFunc

type Channel

type Channel interface {
	Encrypt(plain []byte) ([]byte, error)
	Decrypt(frame []byte) ([]byte, error)
	RemoteStatic() []byte
}

type HandshakeFunc

type HandshakeFunc func(read func() ([]byte, error), write func([]byte) error) (Channel, error)

type Node

type Node interface {
	SelfStream(from, to warpnet.WarpPeerID, path stream.WarpRoute, data any) ([]byte, error)
}

Jump to

Keyboard shortcuts

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