Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Regions = []Region{ { ID: 0, LocationName: "US East Pittsburgh", Nodes: []Node{ { ID: 1, RegionID: 0, HostnameHTTPS: "pit-1.try.coder.app", HostnameWireguard: "pit-1.try.coder.app", WireguardPort: 55551, }, }, }, }
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.6.6
type Config struct { Version int `json:"version"` PrivateKey device.NoisePrivateKey `json:"private_key"` PublicKey device.NoisePublicKey `json:"public_key"` Tunnel Node `json:"tunnel"` // Used in testing. Normally this is nil, indicating to use DefaultClient. HTTPClient *http.Client `json:"-"` }
func GenerateConfig ¶ added in v0.6.6
type Node ¶ added in v0.7.7
type Node struct { ID int `json:"id"` RegionID int `json:"region_id"` HostnameHTTPS string `json:"hostname_https"` HostnameWireguard string `json:"hostname_wireguard"` WireguardPort uint16 `json:"wireguard_port"` AvgLatency time.Duration `json:"avg_latency"` }
func FindClosestNode ¶ added in v0.7.7
type ServerResponse ¶ added in v0.7.7
type Tunnel ¶ added in v0.6.6
func New ¶
New creates a tunnel with a public URL and returns a listener for incoming connections on that URL. Connections are made over the wireguard protocol. Tunnel configuration is cached in the user's config directory. Successive calls to New will always use the same URL. If multiple public URLs in parallel are required, use NewWithConfig.
Click to show internal directories.
Click to hide internal directories.