Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configure shadowsocks for automatically start on Ubuntu 17.10, 18.10, etc.

Add shadowsocks ppa

$ sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev
$ sudo apt update

Install using apt

$ sudo apt install shadowsocks-libev 

Create rc.local for automacially starting cammands

$ sudo vi /etc/rc.local

Copy the following code to your rc.local:

#!/bin/bash

# rc.local config file created by upupming
# replace 'xxxx' to your own settings
ss-local -s 1.1.1.1 -p xxxx -l xxxx -k xxxx -m xxxx &

exit 0
$ sudo chmod +x /etc/rc.local

Create rc-local.service

sudo vi /etc/systemd/system/rc-local.service

Copy the following code to this file:

[Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes

[Install]
 WantedBy=multi-user.target

Enable rc-local service

$ sudo systemctl enable rc-local.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.