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 ControlURL #22

Closed
wants to merge 3 commits into from
Closed

Add ControlURL #22

wants to merge 3 commits into from

Conversation

ChibangLW
Copy link
Contributor

@ChibangLW ChibangLW commented Oct 15, 2023

This PR adds the functionality to select the controlURL via env variable.

The small addition was driven by the desire to use caddy-tailscale with headscale.

EDIT:
Just saw #18 and will try to apply the mentioned config option to this PR.

Signed-off-by: Leon Lenzen <ich@leonlenzen.de>
Signed-off-by: Leon Lenzen <ich@leonlenzen.de>
@ChibangLW ChibangLW changed the title Add ControlURL via environment variable Add ControlURL Oct 15, 2023
@ChibangLW ChibangLW marked this pull request as ready for review October 15, 2023 06:41
@ChibangLW
Copy link
Contributor Author

I have not found any documentation for config options for network listeners, hence the hijacking of the address field.

If there are any better config options for network listeners, feel free to point them out and I will update this PR accordingly.

@willnorris
Copy link
Member

I definitely want to pivot to using caddy configuration for any future options like this. I kinda wish I had done it for auth keys as well, but that's already done.

I think adding config options for a network listener should work the same as any other caddy directive? I haven't looked closely myself, but it tends to all be pretty consistent. I don't mind doing the initial change to establish the config, which will make future additions like this much simpler. I just probably won't be able to get to it until later in the week

@ChibangLW
Copy link
Contributor Author

Sounds good.

From my understanding there are no config options for simple listeners/networks. Simple means if you register with caddy.RegisterNetwork(...). If "real" config options for the network part is needed/wanted, it should be a module and not just a network. This could probably look something like caddy-ngrok-listener. Happy to be corrected, but this is my understanding of Caddy docs

I agree having proper config support is beneficial. I will wait with further implementation for your general direction where you want to go with config options.

If the general structure is established the authkey could also be integrated but still overridden from env var for backwards compatibility.

willnorris added a commit that referenced this pull request May 8, 2024
Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 8, 2024
Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 8, 2024
Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 8, 2024
Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 8, 2024
Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 8, 2024
Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 8, 2024
also return any replacer errors, and remove app nil check since we
always check prior to calling these config funcs.

Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 8, 2024
also return any replacer errors, and remove app nil check since we
always check prior to calling these config funcs.

Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
willnorris added a commit that referenced this pull request May 9, 2024
also return any replacer errors, and remove app nil check since we
always check prior to calling these config funcs.

Closes #22

Co-authored-by: ChibangLW <ich@leonlenzen.de>
Signed-off-by: Will Norris <will@tailscale.com>
@willnorris willnorris closed this in 21b5e30 May 9, 2024
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.

None yet

2 participants