8000 chore: switch to new wgtunnel via tunnelsdk by deansheather · Pull Request #6489 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: switch to new wgtunnel via tunnelsdk #6489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: avoid out of range error in --tunnel-host
  • Loading branch information
deansheather committed Mar 20, 2023
commit b798f10d6e0873ca4e03185d0338a8f797daee8a
7 changes: 6 additions & 1 deletion coderd/devtunnel/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,14 @@ func GenerateConfig(customTunnelHost string) (Config, error) {
_, _ = fmt.Println("Defaulting to", Regions[0].LocationName)
}

locationName := "Unknown"
if node.RegionID < len(Regions) {
locationName = Regions[node.RegionID].LocationName
}

spin.Stop()
_, _ = fmt.Printf("Using tunnel in %s with latency %s.\n",
cliui.Styles.Keyword.Render(Regions[node.RegionID].LocationName),
cliui.Styles.Keyword.Render(locationName),
cliui.Styles.Code.Render(node.AvgLatency.String()),
)

Expand Down
0