Skip to content

fix: find non stun nodes for websocket fallback #14

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 1 commit into from
Mar 21, 2023
Merged

Conversation

kylecarbs
Copy link
Member

If the first node was a STUN node, it would naturally fail to dial.

A user found this and reported it!

@kylecarbs kylecarbs requested a review from mafredri March 21, 2023 16:35
@kylecarbs kylecarbs self-assigned this Mar 21, 2023
@@ -347,12 +347,23 @@ func (c *Client) connect(ctx context.Context, caller string) (client *derp.Clien
case c.useWebsockets():
var urlStr string
var tlsConfig *tls.Config
var node *tailcfg.DERPNode
for _, n := range reg.Nodes {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment would help for why this loop is necessary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

If the first node was a STUN node, it would naturally fail to dial.

A user found this and reported it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants