stunclient

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package stunclient asks the STUN server of the central for the public address of the edge, with short-term credentials.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRoute = errors.New("family not available")

ErrNoRoute: family not available here (normal on IPv4 only access).

Functions

This section is empty.

Types

type Address

type Address struct {
	Public netip.Addr
	Local  netip.Addr
}

Address is the public (mapped) and local address.

func Query

func Query(ctx context.Context, server string, f Family, user, pass string, timeout time.Duration) (Address, error)

Query sends one authenticated binding request and checks the signed answer.

type Family

type Family string

Family is the address family to query.

const (
	IPv4 Family = "ipv4"
	IPv6 Family = "ipv6"
)

Jump to

Keyboard shortcuts

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