diff --git a/.fpm_pacman b/.fpm_pacman index 8c86dfd91..a0b37b082 100644 --- a/.fpm_pacman +++ b/.fpm_pacman @@ -12,8 +12,6 @@ release/config/config.json=/etc/sing-box/config.json release/config/sing-box.service=/usr/lib/systemd/system/sing-box.service release/config/sing-box@.service=/usr/lib/systemd/system/sing-box@.service -release/config/sing-box.sysusers=/usr/lib/sysusers.d/sing-box.conf -release/config/sing-box.rules=usr/share/polkit-1/rules.d/sing-box.rules release/config/sing-box-split-dns.xml=/usr/share/dbus-1/system.d/sing-box-split-dns.conf release/completions/sing-box.bash=/usr/share/bash-completion/completions/sing-box.bash diff --git a/.fpm_systemd b/.fpm_systemd index 9b455da9f..ec0917573 100644 --- a/.fpm_systemd +++ b/.fpm_systemd @@ -15,8 +15,6 @@ release/config/config.json=/etc/sing-box/config.json release/config/sing-box.service=/usr/lib/systemd/system/sing-box.service release/config/sing-box@.service=/usr/lib/systemd/system/sing-box@.service -release/config/sing-box.sysusers=/usr/lib/sysusers.d/sing-box.conf -release/config/sing-box.rules=usr/share/polkit-1/rules.d/sing-box.rules release/config/sing-box-split-dns.xml=/usr/share/dbus-1/system.d/sing-box-split-dns.conf release/completions/sing-box.bash=/usr/share/bash-completion/completions/sing-box.bash diff --git a/release/config/sing-box-split-dns.xml b/release/config/sing-box-split-dns.xml index 4ee64c8db..424bfa75d 100644 --- a/release/config/sing-box-split-dns.xml +++ b/release/config/sing-box-split-dns.xml @@ -7,9 +7,4 @@ - - - - - diff --git a/release/config/sing-box.postinst b/release/config/sing-box.postinst index ac1e4efd7..b5024dc3a 100644 --- a/release/config/sing-box.postinst +++ b/release/config/sing-box.postinst @@ -2,8 +2,6 @@ set -e -systemd-sysusers sing-box.conf - if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true fi diff --git a/release/config/sing-box.rules b/release/config/sing-box.rules deleted file mode 100644 index 668b2640a..000000000 --- a/release/config/sing-box.rules +++ /dev/null @@ -1,8 +0,0 @@ -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; - } -}); diff --git a/release/config/sing-box.service b/release/config/sing-box.service index f003f8443..f9b9e3a10 100644 --- a/release/config/sing-box.service +++ b/release/config/sing-box.service @@ -4,10 +4,7 @@ Documentation=https://sing-box.sagernet.org After=network.target nss-lookup.target network-online.target [Service] -User=sing-box StateDirectory=sing-box -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH ExecStart=/usr/bin/sing-box -D /var/lib/sing-box -C /etc/sing-box run ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/release/config/sing-box.sysusers b/release/config/sing-box.sysusers deleted file mode 100644 index 33e381006..000000000 --- a/release/config/sing-box.sysusers +++ /dev/null @@ -1 +0,0 @@ -u sing-box - "sing-box Service" diff --git a/release/config/sing-box@.service b/release/config/sing-box@.service index 726bbee78..d86728c40 100644 --- a/release/config/sing-box@.service +++ b/release/config/sing-box@.service @@ -4,10 +4,7 @@ Documentation=https://sing-box.sagernet.org After=network.target nss-lookup.target network-online.target [Service] -User=sing-box StateDirectory=sing-box-%i -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH ExecStart=/usr/bin/sing-box -D /var/lib/sing-box-%i -c /etc/sing-box/%i.json run ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/release/local/sing-box.service b/release/local/sing-box.service index 9a152ade8..37b393a13 100644 --- a/release/local/sing-box.service +++ b/release/local/sing-box.service @@ -4,8 +4,6 @@ Documentation=https://sing-box.sagernet.org After=network.target nss-lookup.target network-online.target [Service] -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH ExecStart=/usr/local/bin/sing-box -D /var/lib/sing-box -C /usr/local/etc/sing-box run ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure