Documentation
¶
Index ¶
- Constants
- func FetchMap(ctx context.Context, url string) (*tailcfg.DERPMap, error)
- func WrapCustomDERPConnectError(route Route, finalServerURL string, cause error) error
- type Client
- func (c *Client) Close() error
- func (c *Client) ProxyInfo() (ProxyInfo, bool)
- func (c *Client) PublicKey() key.NodePublic
- func (c *Client) Receive(ctx context.Context) (Packet, error)
- func (c *Client) Send(ctx context.Context, dst key.NodePublic, payload []byte) error
- func (c *Client) Subscribe(filter func(Packet) bool) (<-chan Packet, func())
- func (c *Client) SubscribeLossless(filter func(Packet) bool) (<-chan Packet, func())
- type Packet
- type ProxyInfo
- type Route
Constants ¶
View Source
const ( CustomDERPServerEnv = "DERPHOLE_DERP_SERVER" DefaultDERPPort = uint16(443) DefaultSTUNPort = uint16(3478) CustomDERPRegionID = 900 )
View Source
const PublicDERPMapURL = "https://controlplane.tailscale.com/derpmap/default"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithPrivateKey ¶ added in v0.8.0
func (*Client) PublicKey ¶
func (c *Client) PublicKey() key.NodePublic
type Packet ¶
type Packet struct {
From key.NodePublic
Payload []byte
}
type ProxyInfo ¶ added in v0.17.0
func (ProxyInfo) DebugString ¶ added in v0.17.0
type Route ¶ added in v0.17.0
type Route struct {
Host string `json:"host"`
DERPPort uint16 `json:"derp_port"`
STUNPort uint16 `json:"stun_port"`
}
func NewCustomRoute ¶ added in v0.17.0
func ParseCustomRoute ¶ added in v0.17.0
func RouteFromEnvironment ¶ added in v0.17.0
func (Route) DERPAuthority ¶ added in v0.17.0
func (Route) STUNAuthority ¶ added in v0.17.0
Click to show internal directories.
Click to hide internal directories.