Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

devtunnel

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:20Imported by:0

Details

Repository

github.com/coder/coder

Links

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",},},},}

Functions

funcNew

func New(ctxcontext.Context, loggerslog.Logger, customTunnelHoststring) (*tunnelsdk.Tunnel,error)

New creates a tunnel with a public URL and returns a listener for incomingconnections on that URL. Connections are made over the wireguard protocol.Tunnel configuration is cached in the user's config directory. Successivecalls to New will always use the same URL. If multiple public URLs inparallel are required, use NewWithConfig.

This useshttps://github.com/coder/wgtunnel as the server and clientimplementation.

funcNewWithConfigadded inv0.6.6

func NewWithConfig(ctxcontext.Context, loggerslog.Logger, cfgConfig) (*tunnelsdk.Tunnel,error)

NewWithConfig calls New with the given config. For documentation, see New.

Types

typeConfigadded inv0.6.6

type Config struct {Versiontunnelsdk.TunnelVersion `json:"version"`PrivateKeydevice.NoisePrivateKey  `json:"private_key"`PublicKeydevice.NoisePublicKey   `json:"public_key"`TunnelNode `json:"tunnel"`// Used in testing.  Normally this is nil, indicating to use DefaultClient.HTTPClient *http.Client `json:"-"`}

funcGenerateConfigadded inv0.6.6

func GenerateConfig(customTunnelHoststring) (Config,error)

typeNodeadded inv0.7.7

type Node struct {IDint    `json:"id"`RegionIDint    `json:"region_id"`HostnameHTTPSstring `json:"hostname_https"`AvgLatencytime.Duration `json:"-"`}

funcFindClosestNodeadded inv0.7.7

func FindClosestNode(nodes []Node) (Node,error)

FindClosestNode pings each node and returns the one with the lowest latency.

funcNodesadded inv0.20.1

func Nodes(customTunnelHoststring) ([]Node,error)

Nodes returns a list of nodes to use for the tunnel. It will pick a randomnode from each region.

If a customNode is provided, it will be returned as the only node with ID9999.

typeRegionadded inv0.7.7

type Region struct {IDintLocationNamestringNodes        []Node}

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp