6 Commits
Author SHA1 Message Date
Klaaktu e33daa7114 systemd unit improvements (#2187)
* systemd: Use network-online.target for server

Fixes #2186
ss-server needs to wait for the network to be up to be able to bind to non-wildcard IPs. Interface is configured at `network-online.target` but not at `network.target`.

ss-local unit is kept the same, with `After=network.target` for proper ordering at shutdown - unit is stopped before network is shutdown.

* systemd unit: improvements

`exec` is [recommended](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Type=).
Add `NoNewPriviledges` which has been used in [Arch packaging](https://gitlab.archlinux.org/archlinux/packaging/packages/shadowsocks-rust/-/blob/main/shadowsocks-rust-server%40.service?ref_type=heads).
Add `CAP_NET_ADMIN` in ss-local which is needed for TUN mode.
Removed `CAP_NET_BIND_SERVICE` from ss-local. Do you really need to bind to priviledged port in *client*?
Debian unit left un-hardened. I'm not sure why it's different from the other ss-server unit.
2026-09-29 10:03:02 +08:00
mesher2024andmesher2024 ac3dc699c3 debian: fixup debian packaging build scripts (#1722)
* debian: fix up postinst bad substitution

Fix up postinst bad substitution caused by Bash string manipulation in the Dash script.

* debian: update compat file

Fix up the warning caused by compatibility levels before 10 are deprecated.

* debian: replace user nobody in systemd file with dynamicuser

* debian: remove dependency on apg and pwgen in control file

* debian: update shadowsocks-rust-server@.service

Add `DynamicUser=yes` in shadowsocks-rust-server@.service

* debian: update shadowsocks-rust-local@.service

Add `DynamicUser=yes` in shadowsocks-rust-local@.service

---------

Co-authored-by: mesher2024 <mesher2024@users.noreply.github.com>
2024-10-21 10:02:33 +08:00
wevsty 17ae98899d update service file use ssservice.
remove some wrong parameters.
2022-01-03 22:46:10 +08:00
wevsty a7d7b2e838 Add AmbientCapabilities for all service. 2022-01-03 22:46:10 +08:00
Simon Shi f6e57b7820 Refine debian packaging (#83)
* Refine debian packaging

* Bump debian version
2017-11-09 19:25:17 +08:00
Simon Shi 3b09d7633d Debian package fixes (#73)
* General cleanup & Refine Makefile

* Add sysinit & systemd file

* refine readme

* Bump deb version
Use `dch -i` for this work.

* Fix dependency

* Unnecessary postrm

* Add missing arguments
2017-10-12 02:00:46 +08:00