riobard / go-shadowsocks2

Experimental Shadowsocks in Go. Stable fork at https://github.com/shadowsocks/go-shadowsocks2
Apache License 2.0
719 stars 1.67k forks source link

Daemon mode? #9

Closed x0r2d2 closed 7 years ago

x0r2d2 commented 7 years ago

How to start go-ss2 in daemon mode?

riobard commented 7 years ago

Daemonization should be handled by your OS, e.g. supervisor/systemd/upstart/launchd.

x0r2d2 commented 7 years ago

I am not a master of Linux, what I need to do to make it real?

riobard commented 7 years ago

Most modern Linux distro use systemd now. Google "systemd service file".

bigtan commented 7 years ago
[Unit]
Description=Shadowsocks Server
After=network.target

[Service]
ExecStart=/usr/bin/ss-server -s ss://AEAD_CHACHA20_POLY1305:xxxxxxxxx@:xxxx
User=nobody
Group=nogroup

[Install]
WantedBy=multi-user.target

refer to https://github.com/shadowsocks/shadowsocks-go/issues/141