[os-tailscale] Support tailscale set arguments#5382
Conversation
…figuration options
|
This looks like a promising idea, let me have a look over it and ensure nothing breaks. |
|
Hey @sheridans, have you had a chance to look at and test the changes? Looking more, at the Tailscale docs; The only other flags only covered by the
Should we look at adding them to this PR too? |
|
This looks awesome. Great work @AlexRusbridge. Interested to the review from @sheridans. Can't wait to have this feature. |
|
Hey @sheridans, any update on reviewing this PR? |
|
@sheridans: Would it be possible to get this reviewed and merged? It would be a great add for Tailscale on OPNSense. |
|
@fichtner: Thoughts? |
|
This is difficult... I'm not a fan of adding another service rc.d script to accommodate extra features. Ideally this is something FreeBSD wants similar to the following which would keep everything in one rc.conf template: The question that comes to mind is why we're then also adding a time-based workaround for probing readiness for 15 seconds... worst case it will just block for that period. Why do modern services regress back to requiring these ancient workarounds? Cheers, |
|
Hey @fichtner, thanks for taking a look. I do agree using a wait here isn't ideal, and it's prompted me to try and find the root cause as to why the relay server port isn't persisting between reboots. I think what's happening is the implementation of
I think this problem is unique to the FreeBSD port, as other OSs will let the Because of that, I agree that the ideal solution here is to propose an upstream fix to the FreeBSD port. Specifically, a change so I'm not sure I have the time and/or experience to take this any further, but open to other suggestions. |
Important notices
Before you submit a pull request, we ask you kindly to acknowledge the following:
If AI was used, please disclose:
Related issue
Describe the problem
Tailscale have a preference for adding new flags to the
tailscale setcommand, instead oftailscale up.This means that any new functionality added to
tailscaleis likely to be configured throughset. In the plugins current state, we can't configure these options.We can already see the impact with the
--relay-server-portflag.Describe the proposed solution
This PR adds a new rc.d script
tailscaled_setthat will applytailscale setflags after thetailscaledservice has started.It supports defining arguments via the
tailscaled_set_argsvariable.For now, we can configure
--relay-server-portand--webclientvia the UI. But this PR opens up the possibility of moresetarguments.Note: There is another solution, where the FreeBSD port of
tailscaledcould supporttailscaled_set_argsalongside it'stailscaled_set_args.