derpmap

package
v0.98.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package derpmap contains information about Tailscale.com's production DERP nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	ID int

	// HostHTTPS is the HTTPS hostname.
	HostHTTPS string

	// STUN4 is the host:port of the IPv4 STUN server on this DERP
	// node. Required.
	STUN4 string

	// STUN6 optionally provides the IPv6 host:port of the STUN
	// server on the DERP node.
	// It should be an IPv6-only address for now. (We currently make lazy
	// assumptions that the server names are unique.)
	STUN6 string

	// Geo is a human-readable geographic region name of this server.
	Geo string
}

Server is configuration for a DERP server.

func (*Server) String

func (s *Server) String() string

type World

type World struct {
	// contains filtered or unexported fields
}

World is a set of DERP server.

func NewTestWorld

func NewTestWorld(stun ...string) *World

func NewTestWorldWith

func NewTestWorldWith(servers ...*Server) *World

func Prod

func Prod() *World

Prod returns the production DERP nodes.

func (*World) IDs

func (w *World) IDs() []int

func (*World) LocationOfID

func (w *World) LocationOfID(id int) string

LocationOfID returns the geographic name of a node, if present.

func (*World) NodeIDOfSTUNServer

func (w *World) NodeIDOfSTUNServer(server string) int

func (*World) STUN4

func (w *World) STUN4() []string

func (*World) STUN6

func (w *World) STUN6() []string

func (*World) ServerByID

func (w *World) ServerByID(id int) *Server

Jump to

Keyboard shortcuts

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