Debian Codegraph @

debian/dante-server.danted.service

raw
1 [Unit]
2 Description=SOCKS (v4 and v5) proxy daemon (danted)
3 Documentation=man:danted(8) man:danted.conf(5)
4 After=network.target network-online.target
5
6 [Service]
7 Type=simple
8 PIDFile=/run/danted/pid
9 ExecStart=/usr/sbin/danted -p /run/danted/pid
10 ExecStartPre=/bin/sh -c ' \
11 uid=`sed -n -e "s/[[:space:]]//g" -e "s/#.*//" -e "/^user\\.privileged/{s/[^:]*://p;q;}" /etc/danted.conf`; \
12 if [ -n "$uid" ]; then \
13 touch /run/danted/pid; \
14 chown $uid /run/danted/pid; \
15 fi \
16 '
17
18 # sandbox
19 PrivateTmp=yes
20 InaccessibleDirectories=/boot /home /media /mnt /opt /root
21 ReadOnlyDirectories=/bin /etc /lib -/lib64 /sbin /usr /var
22 DeviceAllow=/dev/null rw
23 ProtectSystem=strict
24 RuntimeDirectory=danted
25 LockPersonality=yes
26 NoNewPrivileges=yes
27 ProtectControlGroups=yes
28 ProtectHome=true
29 ProtectKernelLogs=yes
30 ProtectKernelModules=yes
31 ProtectKernelTunables=yes
32 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_LOCAL AF_NETLINK
33 RestrictRealtime=yes
34 SystemCallArchitectures=native
35
36 [Install]
37 WantedBy=multi-user.target