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
enp4s0
indeed, - when
wlp3s0
is 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 towlp3s0
as 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?
For the time being, I went with
goproxy
, what a gem! Essentially,does the trick without any hassle about binding any particular outgoing interfaces.
I got the following response from Michael Shuldman (maintainer) on the official mailing list for Dante server
sockd
: