-
Notifications
You must be signed in to change notification settings - Fork 931
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
Conversation
|
@deansheather 8000 a> @coadler Did you have a chance to move this forward? |
Tried to get wgtunnel working again on the box we currently use in prod. Didn't work, so ordered a VPS from teraswitch to try deploying on instead. It works locally and in tests but doesn't on that server so I want to try another server. |
// If we fail to find the closest node, default to a random node from | ||
// the first region. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are nodes sorted, so that we need to use random numbers? Could it be always the first node or the healthiest/biggest one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any mechanism to judge which node is healthiest currently. We only have one node so this actually does nothing right now. When/if we add more nodes in the future we can optimize this or perhaps force it to fail on error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if a map, wouldn't be better than array then, but it's a nit-pick.
codersdk/deployment.go
Outdated
{ | ||
Name: "Custom Tunnel Host", | ||
Description: `Hostname of HTTPS server that runs https://github.com/coder/wgtunnel. By default, this will pick the best available wgtunnel server hosted by Coder. e.g. "tunnel.example.com".`, | ||
Flag: "tunnel-host", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wg-tunnel-host? Tunnel host might be a too generic name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that the tunnel is wireguard is transparent to the user, so adding wg
seems to me like it would confuse people. This is a hidden var since we don't intend on many people using it though so maybe wgtunnel-host
is fine unless we want to unhide it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like wgtunnel-host
.
codersdk/deployment.go
Outdated
{ | ||
Name: "Custom Tunnel Host", | ||
Description: `Hostname of HTTPS server that runs https://github.com/coder/wgtunnel. By default, this will pick the best available wgtunnel server hosted by Coder. e.g. "tunnel.example.com".`, | ||
Flag: "tunnel-host", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like wgtunnel-host
.
Works for me!
|
Switch the devtunnel wrapper to use our new open source wgtunnel package.
This removes all of the tunnel code in favor of
github.com/coder/wgtunnel/tunnelsdk
and updates the tests to use a realgithub.com/coder/wgtunnel/tunneld
server.TODO:
Closes #6360