mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
4ef25ef679
Wires up systemd support to configure DNS on startup and when enabling/disabling exit mode. On startup (and when turning off an exit) we tell systemd-resolved to direct .loki and .snode lookups to lokinet (leaving other DNS traffic alone). On exit enabling, we reconfigure it to resolve "." (i.e. the root DNS domain) so that all lookups come into it.
10 lines
299 B
Plaintext
10 lines
299 B
Plaintext
/* Allow lokinet to set DNS settings */
|
|
polkit.addRule(function(action, subject) {
|
|
if ((action.id == "org.freedesktop.resolve1.set-dns-servers" ||
|
|
action.id == "org.freedesktop.resolve1.set-domains") &&
|
|
subject.user == "_lokinet") {
|
|
return polkit.Result.YES;
|
|
}
|
|
});
|
|
|