Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DERPBootstrapDNSHandler ¶
DERPBootstrapDNSHandler implements the /bootstrap-dns endpoint Described in https://github.com/tailscale/tailscale/issues/1405, this endpoint provides a way to help a client when it fails to start up because its DNS are broken. The initial implementation is here https://github.com/tailscale/tailscale/pull/1406 They have a cache, but not clear if that is really necessary at Headscale, uh, scale. An example implementation is found here https://derp.tailscale.com/bootstrap-dns Coordination server is included automatically, since local DERP is using the same DNS Name in d.serverURL.
func DERPProbeHandler ¶
func DERPProbeHandler( writer http.ResponseWriter, req *http.Request, )
DERPProbeHandler is the endpoint that js/wasm clients hit to measure DERP latency, since they can't do UDP STUN queries.
Types ¶
type DERPServer ¶
type DERPServer struct {
// contains filtered or unexported fields
}
func NewDERPServer ¶
func NewDERPServer( serverURL string, derpKey key.NodePrivate, cfg *types.DERPConfig, ) (*DERPServer, error)
func (*DERPServer) DERPHandler ¶
func (d *DERPServer) DERPHandler( writer http.ResponseWriter, req *http.Request, )
func (*DERPServer) GenerateRegion ¶
func (d *DERPServer) GenerateRegion() (tailcfg.DERPRegion, error)
func (*DERPServer) ServeSTUN ¶
func (d *DERPServer) ServeSTUN()
ServeSTUN starts a STUN server on the configured addr.