Skip to content

Commit 4f5b46f

Browse files
committed
Add a systemd unit file to run tlsrouter.
The sandboxing settings are quite extreme. I love it.
1 parent 8cc8cac commit 4f5b46f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

systemd/tlsrouter.service

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[Unit]
2+
Description=TLS SNI proxy
3+
Documentation=https://github.com/google/tlsrouter
4+
5+
[Service]
6+
WorkingDirectory=/tmp
7+
ExecStart=/usr/bin/tlsrouter -conf /etc/tlsrouter.conf
8+
Restart=always
9+
User=nobody
10+
Group=nobody
11+
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
12+
AmbientCapabilities=CAP_NET_BIND_SERVICE
13+
PrivateTmp=true
14+
PrivateDevices=true
15+
ProtectSystem=strict
16+
ProtectHome=true
17+
ProtectKernelTunables=true
18+
ProtectControlGroups=true
19+
ProtectKernelModules=true
20+
NoNewPrivileges=true
21+
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @privileged @raw-io
22+
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
23+
24+
[Install]
25+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)