Closed edgar-vincent closed 2 years ago
Also, the script should probably call exit with an error if either tailscale up
or mullvad connect
fails (because, for instance, they are not set up properly), otherwise the network might end up in a broken state (no DNS resolution in my case).
Same thing for nft
. Since nftables applies the configuration atomically, it fails completely if any of its evaluations fail (it did in my case for reasons I'll describe in another issue). The script should probably exit and cleanup in that case.
Have you been able to test the new version?
I have started debugging it, but haven't finished. It is quite a bit better, but there are a few things that need changing. I'll make a PR when I can.
Still working on it, there is a lot of reformatting to do. A few general pieces of advice:
This is going to be very useful script!
Closing as it should be addressed with the latest version. Thank you @edgar-vincent !
Thanks for merging. The duplicate commands still need to be looked at though, but maybe it requires a specific issue.
Hi,
Thanks a lot for this very useful script.
I noticed that there were duplicate command calls:
https://github.com/r3nor/mullvad-tailscale/blob/1784d3139274e24136f7748a4061c4dfffc6294c/mtc#L136 and https://github.com/r3nor/mullvad-tailscale/blob/1784d3139274e24136f7748a4061c4dfffc6294c/mtc#L139
Also, is this needed https://github.com/r3nor/mullvad-tailscale/blob/1784d3139274e24136f7748a4061c4dfffc6294c/mtc#L153 ?
Thanks.