util

package
v0.0.0-...-24d746f Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDPMaxBuffer       = 1500
	DefaultSTUNTimeout = 2 * time.Second
)

Variables

This section is empty.

Functions

func GetPublicEndpoint

func GetPublicEndpoint(ctx context.Context, conn *net.UDPConn, servers []string) (*net.UDPAddr, error)

GetPublicEndpoint attempts to discover the public-facing UDP address of the local machine by querying a list of STUN servers. It sends a STUN Binding Request through the provided UDP connection and returns the first successful response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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