-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVultrSS.sh
61 lines (52 loc) · 1.49 KB
/
VultrSS.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
#! /bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
apt-get -y install python-pip
pip -y install shadowsocks
IP=$(curl -s -4 icanhazip.com)
if [[ "$IP" = "" ]]; then
IP=$(curl -s -4 ipinfo.io/ip)
fi
cat >> /etc/shadowsocks.json <<-EOF
{
"server":"${IP}",
"server_port":443,
"local_port":1080,
"password":"Cym9631514404",
"timeout":300,
"method":"aes-256-cfb"
}
EOF
#Æô¶¯SS
ssserver -c /etc/shadowsocks.json -d start
#ÓÅ»¯SS
echo "* soft nofile 51200" >> /etc/security/limits.conf
echo "* hard nofile 51200" >> /etc/security/limits.conf
ulimit -n 51200
cat >> /etc/sysctl.conf <<-EOF
fs.file-max = 51200
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 4096
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = hybla
EOF
sysctl -p
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
echo -e "server_port:\t\033[32m443\033[0m"
echo -e "local_port:\t\033[32m1080\033[0m"
echo -e "password:\t\033[32mCym9631514404\033[0m"
echo -e "method:\t\033[32maes-256-cfb\033[0m"