I want Dante to transparently choose between either of the two interfaces enp4s0 (Wired Ethernet) and wlp3s0 (Wi-Fi) regardless of their status (up or down). That is
- when wired, it should choose
enp4s0indeed, - when
wlp3s0is added, it should preferably stay onenp4s0(or maybe do some other clever stuff, I care less about this point here), - when wire (
enp4s0) is down, i.e. I'm traveling, it should of course switch towlp3s0as the only option left.
Now I was under impression that the following configuration should do the trick:
internal: 0.0.0.0 port=1080
external: enp4s0
external: wlp3s0
external.rotation: route
However, to my surprise, when e.g. only enp4s0 is up and wlp3s0 is down, Dante refuses to start up, barking:
error: /etc/sockd.conf: problem on line ??? near token "wlp3s0": could not resolve hostname "wlp3s0": No address associated with hostname. Please see the Dante manual for more information
I do understand the point here, but there is no technical reason behind such limitation. Manually editing this configuration file every time I'm switching between wire and Wi-Fi would be cumbersome and a big no-no. Is there a clever way to address that issue?
As the last resort, maybe some hook script that would modify the configuration file? Examples of such tools/scripts?