stun

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StunServers = []StunServer{
		{Domain: "stun1.netmaker.io", Port: 3478},
		{Domain: "stun2.netmaker.io", Port: 3478},
		{Domain: "stun1.l.google.com", Port: 19302},
		{Domain: "stun2.l.google.com", Port: 19302},
	}
)

Functions

func DoesIPExistLocally added in v0.18.6

func DoesIPExistLocally(ip net.IP) bool

DoesIPExistLocally - checks if the IP address exists on a local interface

func HolePunch added in v0.20.1

func HolePunch(portToStun int) (publicIP net.IP, publicPort int, natType string)

HolePunch - performs udp hole punching on the given port

func IsPublicIP added in v0.18.6

func IsPublicIP(ip net.IP) bool

IsPublicIP indicates whether IP is public or not.

Types

type StunServer added in v0.21.1

type StunServer struct {
	Domain string `json:"domain" yaml:"domain"`
	Port   int    `json:"port" yaml:"port"`
}

StunServer - struct to hold data required for using stun server

Jump to

Keyboard shortcuts

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