[Unit]
Description=A Rust port of shadowsocks.
After=network.target

[Service]
DynamicUser=yes
CacheDirectory=shadowsocks-rust/%i
LogsDirectory=shadowsocks-rust/%i
RuntimeDirectory=shadowsocks-rust/%i
StateDirectory=shadowsocks-rust/%i
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks-rust/%i.json --log-without-time
Restart=on-failure
LimitNPROC=10000
LimitNOFILE=1000000

[Install]
WantedBy=multi-user.target
