-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: derpmap field in config #1823
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,7 @@ type DERPConfig struct { | |
STUNAddr string | ||
URLs []url.URL | ||
Paths []string | ||
DERPMap *tailcfg.DERPMap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New field The addition of the It's recommended to update the project's documentation to include information about this new field and its usage. Consider updating the documentation to reflect this new configuration option. |
||
AutoUpdate bool | ||
UpdateFrequency time.Duration | ||
IPv4 string | ||
|
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.
Conditional check added to prevent nil dereferencing.
The addition of the conditional check at lines 85-87 is a good practice to ensure that only non-nil
DERPMap
instances are appended to thederpMaps
slice. This change helps in preventing potential runtime errors due to nil dereferencing.However, it's recommended to add unit tests to verify that this new logic correctly handles scenarios where
cfg.DERPMap
might be nil or non-nil.Would you like me to help by writing some unit tests for this new logic?