summarylogtreecommitdiffstats
path: root/sing-box.rules
blob: 037ac08f5e01836a748a46f598d2ecb7a92de574 (plain)
1
2
3
4
5
6
7
8
9
// Allow sing-box to set domain and default-route
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.resolve1.set-domains" ||
         action.id == "org.freedesktop.resolve1.set-default-route" ||
         action.id == "org.freedesktop.resolve1.set-dns-servers") &&
        subject.user == "sing-box") {
        return polkit.Result.YES;
    }
});