Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit72ca611

Browse files
committed
add docs
1 parent7a43a2e commit72ca611

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎coderd/devtunnel/tunnel.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type configExt struct {
4747
PublicKey device.NoisePublicKey`json:"public_key"`
4848
}
4949

50+
// NewWithConfig calls New with the given config. For documentation, see New.
5051
funcNewWithConfig(ctx context.Context,logger slog.Logger,cfgConfig) (*Tunnel,error) {
5152
err:=startUpdateRoutine(ctx,logger,cfg)
5253
iferr!=nil {
@@ -112,6 +113,11 @@ allowed_ip=%s/128`,
112113
},nil
113114
}
114115

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.
115121
funcNew(ctx context.Context,logger slog.Logger) (*Tunnel,error) {
116122
cfg,err:=readOrGenerateConfig()
117123
iferr!=nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp