Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16b0119

Browse files
committed
https and tunnel -> devtunnel
1 parent 72a7fcb commit 16b0119

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

cli/start.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import (
3131
"github.com/coder/coder/coderd"
3232
"github.com/coder/coder/coderd/database"
3333
"github.com/coder/coder/coderd/database/databasefake"
34+
"github.com/coder/coder/coderd/devtunnel"
3435
"github.com/coder/coder/coderd/gitsshkey"
35-
"github.com/coder/coder/coderd/tunnel"
3636
"github.com/coder/coder/codersdk"
3737
"github.com/coder/coder/provisioner/terraform"
3838
"github.com/coder/coder/provisionerd"
@@ -112,7 +112,7 @@ func start() *cobra.Command {
112112
IsConfirm: true,
113113
})
114114
if err == nil {
115-
accessURL, tunnelErr, err = tunnel.New(cmd.Context(), localURL.String())
115+
accessURL, tunnelErr, err = devtunnel.New(cmd.Context(), localURL.String())
116116
if err != nil {
117117
return xerrors.Errorf("create tunnel: %w", err)
118118
}

cmd/templater/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"github.com/coder/coder/coderd"
2121
"github.com/coder/coder/coderd/database"
2222
"github.com/coder/coder/coderd/database/databasefake"
23-
"github.com/coder/coder/coderd/tunnel"
23+
"github.com/coder/coder/coderd/devtunnel"
2424
"github.com/coder/coder/codersdk"
2525
"github.com/coder/coder/provisioner/terraform"
2626
"github.com/coder/coder/provisionerd"
@@ -63,7 +63,7 @@ func parse(cmd *cobra.Command, parameters []codersdk.CreateParameterRequest) err
6363
if err != nil {
6464
return err
6565
}
66-
accessURL, errCh, err := tunnel.New(cmd.Context(), srv.URL)
66+
accessURL, errCh, err := devtunnel.New(cmd.Context(), srv.URL)
6767
if err != nil {
6868
return err
6969
}

coderd/tunnel/tunnel.go renamed to coderd/devtunnel/tunnel.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tunnel
1+
package devtunnel
22

33
import (
44
"context"
@@ -25,7 +25,7 @@ func New(ctx context.Context, url string) (string, <-chan error, error) {
2525
frpcrypto.DefaultSalt = "frp"
2626

2727
cfg := frpconfig.GetDefaultClientConf()
28-
cfg.ServerAddr = "tunnel-test.cdr.co"
28+
cfg.ServerAddr = "34.133.27.233"
2929
cfg.ServerPort = 7000
3030
cfg.LogLevel = "warn"
3131

@@ -74,5 +74,5 @@ func New(ctx context.Context, url string) (string, <-chan error, error) {
7474
}
7575
}()
7676

77-
return fmt.Sprintf("http://%s.tunnel-test.cdr.co", subdomain), ch, nil
77+
return fmt.Sprintf("http://%s.tunnel.coder.app", subdomain), ch, nil
7878
}

coderd/tunnel/tunnel_test.go renamed to coderd/devtunnel/tunnel_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tunnel_test
1+
package devtunnel_test
22

33
import (
44
"context"
@@ -12,7 +12,7 @@ import (
1212
"github.com/stretchr/testify/require"
1313
"golang.org/x/xerrors"
1414

15-
"github.com/coder/coder/coderd/tunnel"
15+
"github.com/coder/coder/coderd/devtunnel"
1616
)
1717

1818
// The tunnel leaks a few goroutines that aren't impactful to production scenarios.
@@ -36,7 +36,7 @@ func TestTunnel(t *testing.T) {
3636

3737
ctx, cancelFunc := context.WithCancel(context.Background())
3838
defer cancelFunc()
39-
url, _, err := tunnel.New(ctx, srv.URL)
39+
url, _, err := devtunnel.New(ctx, srv.URL)
4040
require.NoError(t, err)
4141
t.Log(url)
4242

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ github.com/docker/cli v20.10.13+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hH
469469
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
470470
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
471471
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
472-
github.com/docker/distribution v2.8.0+incompatible h1:u9vuu6qqG7nN9a735Noed0ahoUm30iipVRlhgh72N0M=
472+
github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY=
473473
github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
474474
github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
475475
github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
@@ -1312,7 +1312,7 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T
13121312
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
13131313
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
13141314
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
1315-
github.com/pelletier/go-toml/v2 v2.0.0-beta.6 h1:TA3qh4Cq1VOjh4AJnMHrUFbAsIbD7OnOvpaIRYsU0sI=
1315+
github.com/pelletier/go-toml/v2 v2.0.0-beta.6 h1:JFNqj2afbbhCqTiyN16D7Tudc/aaDzE2FBDk+VlBQnE=
13161316
github.com/pelletier/go-toml/v2 v2.0.0-beta.6/go.mod h1:ke6xncR3W76Ba8xnVxkrZG0js6Rd2BsQEAYrfgJ6eQA=
13171317
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
13181318
github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ=

0 commit comments

Comments
 (0)