We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent7a43a2e commit72ca611Copy full SHA for 72ca611
coderd/devtunnel/tunnel.go
@@ -47,6 +47,7 @@ type configExt struct {
47
PublicKey device.NoisePublicKey`json:"public_key"`
48
}
49
50
+// NewWithConfig calls New with the given config. For documentation, see New.
51
funcNewWithConfig(ctx context.Context,logger slog.Logger,cfgConfig) (*Tunnel,error) {
52
err:=startUpdateRoutine(ctx,logger,cfg)
53
iferr!=nil {
@@ -112,6 +113,11 @@ allowed_ip=%s/128`,
112
113
},nil
114
115
116
+// New creates a tunnel with a public URL and returns a listener for incoming
117
+// connections on that URL. Connections are made over the wireguard protocol.
118
+// Tunnel configuration is cached in the user's config directory. Successive
119
+// calls to New will always use the same URL. If multiple public URLs in
120
+// parallel are required, use NewWithConfig.
121
funcNew(ctx context.Context,logger slog.Logger) (*Tunnel,error) {
122
cfg,err:=readOrGenerateConfig()
123