cli

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package cli parses flags, orchestrates concurrent STUN probes, and emits the final report. Run returns an exit code per docs/design.md: 0 = P2P-friendly, 1 = P2P-hostile, 2 = probe or flag error.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the natcheck version string. main.go sets this at startup from its ldflags-injected variable.

Functions

func Run

func Run(ctx context.Context, args []string, out, errOut io.Writer) int

Run parses args, probes, classifies, renders, and returns an exit code.

Types

type FilteringFunc added in v0.1.2

type FilteringFunc func(ctx context.Context, s probe.Server, timeout time.Duration) probe.FilteringResult

FilteringFunc runs the RFC 5780 §4.4 filtering classification against a single server. Default impl is probe.ProbeFiltering; tests inject stubs.

type HairpinFunc added in v0.1.4

type HairpinFunc func(ctx context.Context, s probe.Server, timeout time.Duration) probe.HairpinningResult

HairpinFunc runs the RFC 5780 §4.3 hairpinning detection against a single server. Default impl is probe.ProbeHairpinning; tests inject stubs.

Jump to

Keyboard shortcuts

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