| 1 | # To configure certificates, either place them at the right location, |
| 2 | # use symlinks, or use `systemctl edit signal-tlsd`, then add the following: |
| 3 | # |
| 4 | # [Service] |
| 5 | # Environment=TLS_CERT_PATH=/your/path/fullchain.pem |
| 6 | # Environment=TLS_PRIVATE_KEY_PATH=/your/path/privkey.pem |
| 7 | # # Optionally: |
| 8 | # #Environment=SIGNAL_TLSD_FALLBACK_ADDR=127.0.0.1:8080 |
| 9 | # |
| 10 | # Use systemctl daemon-reload afterwards. |
| 11 | |
| 12 | [Unit] |
| 13 | Description=signal-tlsd: Standalone Rust implementation of Signal's domain fronting TLS proxy |
| 14 | After=network-online.target remote-fs.target nss-lookup.target |
| 15 | Wants=network-online.target |
| 16 | |
| 17 | [Service] |
| 18 | User=signal-tlsd |
| 19 | Environment=TLS_CERT_PATH=/etc/signal-tlsd/fullchain.pem |
| 20 | Environment=TLS_PRIVATE_KEY_PATH=/etc/signal-tlsd/privkey.pem |
| 21 | ExecStart=/usr/bin/signal-tlsd -B [::]:443 |
| 22 | ExecReload=/bin/kill -HUP $MAINPID |
| 23 | |
| 24 | AmbientCapabilities=CAP_NET_BIND_SERVICE |
| 25 | CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
| 26 | MemoryDenyWriteExecute=yes |
| 27 | NoNewPrivileges=yes |
| 28 | PrivateTmp=yes |
| 29 | ProtectControlGroups=yes |
| 30 | ProtectHome=yes |
| 31 | ProtectKernelTunables=yes |
| 32 | ProtectSystem=strict |
| 33 | RestrictSUIDSGID=yes |
| 34 | |
| 35 | [Install] |
| 36 | WantedBy=multi-user.target |