Is it possible to set the global DNS server in a snap?
I know that by using systemd-resolved D-BUS API, it would work to set a DNS server for a specific link (tbh, I haven’t tried), according the the comment in
# Allow access to the safe members of the systemd-resolved D-Bus API: # # https://www.freedesktop.org/wiki/Software/systemd/resolved/ # # This API may be used directly over the D-Bus system bus or it may be used # indirectly via the nss-resolve plugin: # # https://www.freedesktop.org/software/systemd/man/nss-resolve.html
Another thought is to use
system-files interface and write the DNS config file to