then do it per-interface [ { name: 'wired', uuid: 'e7687226-de6c-3b27-9e07-1eab1...
kimapr ☭ 🇺🇿 ⚧ ⚢ ❤️🧡🤍🩷💜 @kimapr@ublog.kimapr.net
then do it per-interface
[
{
name: 'wired',
uuid: 'e7687226-de6c-3b27-9e07-1eab1762d59a',
type: 'ethernet',
device: 'enp2s0',
online6: null,
online4: 112.19582800000353
},
{
name: 'wirebile',
uuid: 'dfe4a448-9783-34be-85e7-f87a3a9718d8',
type: 'ethernet',
device: 'enp3s0f3u3',
online6: null,
online4: 140.67921999999817
}
]
take the RTT per each interface (online4 and online6, in ms or null if ping failed), then pick the one with lowest.
use ip route to change the priority of the default route for the interfaces, so that the quickest one (of ones that work at all) has highest priority. also rearrange /etc/resolv.conf so that the one coming from the quickest interface’s DHCP comes at the top.
rinse and repeat every 5-10 seconds. now you can have multiple internets wired up into the computer and at any point in time it’ll use the best one to connect to stuff
RE: https://ublog.kimapr.net/objects/ade96a01-9081-4e05-ab26-18a4ce0eb2f6