forked from arloor/socks5
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient-setup.sh
More file actions
58 lines (51 loc) · 1.08 KB
/
client-setup.sh
File metadata and controls
58 lines (51 loc) · 1.08 KB
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
#! /bin/bash
# 请自行安装jdk8
sudo su
mkdir /opt/socks5
cd /opt/socks5
wget -O client.jar https://github.com/arloor/socks5/releases/download/latest/client-3.0-jar-with-dependencies.jar
mkdir /etc/socks5
cat > /etc/socks5/client.json <<EOF
{
"ClientPort": 6666,
"SpeedLimitKB": 640,
"Use": 0,
"Servers": [
{
"ProxyAddr": "socks5",
"ProxyPort": 80,
"UserName": "a",
"Password": "b"
},
{
"ProxyAddr": "localhost",
"ProxyPort": 80,
"UserName": "a",
"Password": "b"
}
],
"User": "this",
"Pass": "socks5",
"Auth":true
}
EOF
#创建service
cat > /lib/systemd/system/ss5-local.service <<EOF
[Unit]
Description=socks5代理-客户端ARLOOR
After=network-online.target
Wants=network-online.target
[Service]
Restart=always
WorkingDirectory=/opt/socks5
ExecStart=/usr/bin/java -jar /opt/socks5/client.jar -c /etc/socks5/client.json
LimitNOFILE=100000
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable ss5-local
# vim /etc/socks5/client.json
# service ss5-local start