shadowsocks / shadowsocks/shadowsocks-rust

Systemd service files

Open
#103 5 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
10.9k
Forks
1.5k
Avg merge
4d 15h
Merged PRs (30d)
5

Description

For anyone who wants to autostart shadowsocks services via systemd:

  1. Be sure you has both server and client installed into /usr/local/bin/, config placed into /etc/sssconfig.json and has user nobody and group nogroup in your system (it's good practice to run network services under unprivileged user by secure reasons).
  2. place configs below into /usr/local/systemd/system/ or /lib/systemd/system/
  3. sudo systemctl enable sslocal.service on client and sudo systemctl enable ssserver.service on server
  4. sudo systemctl start sslocal.service on client and sudo systemctl start ssserver.service on server

sslocal.service

[Unit]
Description=sslocal service
After=network.target

[Service]
ExecStart=/usr/local/bin/sslocal -c /etc/sssconfig.json
ExecStop=/usr/bin/killall sslocal
Restart=always
RestartSec=10                       # Restart service after 10 seconds if service crashes
StandardOutput=syslog               # Output to syslog
StandardError=syslog                # Output to syslog
SyslogIdentifier=sslocal
User=nobody
Group=nogroup

[Install]
WantedBy=multi-user.target

ssserver.service

[Unit]
Description=ssserver service
After=network.target

[Service]
ExecStart=/usr/local/bin/ssserver -c /etc/sssconfig.json
ExecStop=/usr/bin/killall ssserver
Restart=always
RestartSec=10                       # Restart service after 10 seconds if service crashes
StandardOutput=syslog               # Output to syslog
StandardError=syslog                # Output to syslog
SyslogIdentifier=ssserver
User=nobody
Group=nogroup

[Install]
WantedBy=multi-user.target

can close this when systemd service files be added to examples and described in docs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the project's examples and documentation areas where systemd service files for sslocal and ssserver could be added. Use the paths and commands in the issue as the requirements, including /usr/local/bin/, /etc/sssconfig.json, the nobody:nogroup account, and systemctl enable/start. Done means both service definitions are included in the appropriate examples and documented for client and server use.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devops, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.