Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Add coder tunnel command #313

Merged
merged 2 commits into from
Apr 8, 2021
Merged

Add coder tunnel command #313

merged 2 commits into from
Apr 8, 2021

Conversation

f0ssel
Copy link
Contributor

@f0ssel f0ssel commented Apr 8, 2021

The tunnel command takes in an environment name, a remote port, and a local port and makes a TCP tunnel to connect via webrtc.

➜  coder-cli git:(cmd-tunnel) ✗ go run cmd/coder/main.go tunnel test-1 8000 7000
2021-04-08 14:24:53.660 [INFO]  <tunnel.go:108> connecting to broker    {"url": "http://demo.f0ssel.io/api/private/envagent/60663b9f-d9cf66c1a000789e2d32c431/connect?session_token=IqragYByIf-p3ovf4fX3aH4dr0i99K1Bz"}
2021-04-08 14:24:53.906 [INFO]  <tunnel.go:126> connection state changed        {"state": "connected"}
2021-04-08 14:24:53.910 [INFO]  <tunnel.go:208> your latency directly to the agent      {"ms": 0}

I've also added a --p2p flag to the coder config-ssh command, so it will edit the ssh config to use the coder tunnel instead of tradition ssh. This will allow us to dogfood this feature pretty seamlessly for devs.

@f0ssel f0ssel force-pushed the cmd-tunnel branch 2 times, most recently from 2869801 to 3039497 Compare April 8, 2021 15:04
@f0ssel f0ssel requested review from deansheather and kylecarbs April 8, 2021 15:05
@f0ssel f0ssel force-pushed the cmd-tunnel branch 3 times, most recently from 2f112e0 to 3ccb7dd Compare April 8, 2021 19:00
@f0ssel f0ssel merged commit c1a9994 into master Apr 8, 2021
@f0ssel f0ssel deleted the cmd-tunnel branch April 8, 2021 19:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants