1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| mkdir /etc/shadowsocks-libev
cat << EOF > /etc/shadowsocks-libev/client.json { "server":"SERVER_IP", "server_port":PORT, "local_address":"127.0.0.1", "local_port":8080, "nameserver":"8.8.8.8", "password":"PASS", "timeout":300, "method":"chacha20-ietf-poly1305" } EOF
cat << EOF > /etc/shadowsocks-libev/client2.json { "server":"SERVER_IP", "server_port":PORT, "local_address":"127.0.0.1", "local_port":8080, "nameserver":"8.8.8.8", "password":"PASS", "timeout":300, "method":"chacha20-ietf-poly1305" } EOF
cat << EOF >> /etc/systemd/system/shadowsocks@.service [Unit] Description=Shadowsocks-Libev Custom Client Service for X Documentation=man:ss-local(1) After=network-online.target
[Service] Type=simple User=nobody Group=nogroup CapabilityBoundingSet=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json
[Install] WantedBy=multi-user.target EOF
|