-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathss.sh
65 lines (55 loc) · 1.47 KB
/
ss.sh
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
yum -y install epel-release
yum -y install privoxy
echo "user-manual /usr/share/doc/privoxy/user-manual/
confdir /etc/privoxy
logdir /var/log/privoxy
filterfile default.filter
logfile privoxy.log
listen-address 0.0.0.0:18118
toggle 1
enable-remote-toggle 0
enable-remote-http-toggle 0
enable-edit-actions 1
enforce-blocks 0
buffer-limit 4096
enable-proxy-authentication-forwarding 0
trusted-cgi-referer http://www.example.org/
forwarded-connect-retries 0
max-client-connections 256
accept-intercepted-requests 1
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 5
tolerate-pipelining 1
socket-timeout 300
forward-socks5 / 127.0.0.1:1080 .
forward / .
" > /etc/privoxy/config
yum -y install epel-release
yum -y install python-pip
pip install shadowsocks
mkdir /etc/shadowsocks
echo '{
"server": "127.0.0.1",
"server_port": 18118,
"password": "vpnPassword",
"timeout": 120,
"method": "aes-128-gcm",
"local_address": "127.0.0.1",
"local_port": 1080,
"fast_open": true
}' > /etc/shadowsocks/shadowsocks.json
echo 3 > /proc/sys/net/ipv4/tcp_fastopen
echo '[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/shadowsocks.json
[Install]
WantedBy=multi-user.target' > /etc/systemd/system/shadowsocks.service
systemctl enable privoxy
systemctl start privoxy
systemctl status privoxy
systemctl enable shadowsocks.service
systemctl start shadowsocks.service
systemctl status shadowsocks.service