connectivity

package
v0.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package connectivity implements fixed-size reachability challenges. Target selection belongs to trusted operator configuration, never measurement input.

Index

Constants

View Source
const ProbeTimeout = 400 * time.Millisecond
View Source
const TokenSize = 32

Variables

This section is empty.

Functions

func Check

func Check(ctx context.Context, transport, endpoint string, token []byte) error

Check tests one previously approved literal endpoint. It sends one 32-byte challenge and requires proof of the report's token, so an unrelated open service is not reported as the executor's listener.

func ServeTCP

func ServeTCP(listener *net.TCPListener, token []byte) func()

ServeTCP owns the already-bound sample until stop is called. It handles one fixed-size challenge at a time and joins before returning from stop.

func ServeUDP

func ServeUDP(conn *net.UDPConn, token []byte) func()

ServeUDP never sends more bytes than it receives and ignores wrong lengths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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