Skip to content
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

Add ability to fetch DERP from url and file #196

Merged
merged 10 commits into from
Oct 23, 2021

Conversation

kradalby
Copy link
Collaborator

This PR contains a breaking configuration change.

It expands on the DERP functionality and allows it to load both from file and URLs. It also adds the ability to have a worker that will periodically update the derp maps.

The breaking change will remove the configuration flag:

derp_map_path

in favour of a new interface:

derp:
  # List of externally available DERP maps encoded in JSON
  urls:
    - https://controlplane.tailscale.com/derpmap/default

  # Locally available DERP map files encoded in YAML
  paths:
    - derp-example.yaml

  # If enabled, a worker will be set up to periodically
  # refresh the given sources and update the derpmap
  # will be set up.
  auto_update_enabled: true

  # How often should we check for updates?
  update_frequency: 24h

This PR is best reviewed commit by commit.

@@ -0,0 +1,18 @@
# This file contains some of the official Tailscale DERP servers,
Copy link
Owner

Choose a reason for hiding this comment

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

Perhaps we should remove this comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do a change suggestion

- https://controlplane.tailscale.com/derpmap/default

# Locally available DERP map files encoded in YAML
paths:
Copy link
Owner

Choose a reason for hiding this comment

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

why not just one key uri, with file:/// or https:// or whatevs...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't find that particularly intuitive, it's not really a pattern I think most people are used to or use?

Only place I can think of is in browsers

Copy link
Owner

Choose a reason for hiding this comment

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

ok!

derp-example.yaml Outdated Show resolved Hide resolved
@kradalby kradalby merged commit 5aaffaa into juanfont:main Oct 23, 2021
@kradalby kradalby deleted the derp-improvements branch October 23, 2021 08:20
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