Last active
December 23, 2020 08:50
-
-
Save biaocy/36944448e75cde86aaff824b9987b624 to your computer and use it in GitHub Desktop.
Systemd service for naiveproxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=naiveproxy - Make a fortune quietly | |
Documentation=https://github.com/klzgrad/naiveproxy/blob/master/USAGE.txt | |
After=network.target nss-lookup.target | |
Wants=network-online.target | |
[Service] | |
# If the version of systemd is 240 or above, then uncommenting Type=exec and commenting out Type=simple | |
Type=exec | |
#Type=simple | |
# Runs as root or add CAP_NET_BIND_SERVICE ability can bind 1 to 1024 port. | |
# This service runs as root. You may consider to run it as another user for security concerns. | |
# By uncommenting User=naiveproxy and commenting out User=root, the service will run as user naiveproxy. | |
User=nobody | |
#User=naiveproxy | |
#AmbientCapabilities=CAP_NET_BIND_SERVICE | |
ExecStart=/usr/local/bin/naive /etc/naiveproxy/config.json | |
Restart=on-failure | |
# Don't restart in the case of configuration error | |
RestartPreventExitStatus=23 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment