forked from arloor/socks5
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver-setup.sh
More file actions
46 lines (39 loc) · 873 Bytes
/
server-setup.sh
File metadata and controls
46 lines (39 loc) · 873 Bytes
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
#! /bin/bash
# 请自行安装jdk8
sudo su
mkdir /opt/socks5
cd /opt/socks5
wget -O server.jar https://github.com/arloor/socks5/releases/download/latest/server-3.0-jar-with-dependencies.jar
mkdir /etc/socks5
cat > /etc/socks5/server.json <<EOF
{
"ServerPort": 80,
"RedirctAddr": "www.grove.co.uk:80",
"Users": [
{
"UserName": "a",
"Password": "b"
}
],
"Dev":true
}
EOF
#创建service
cat > /lib/systemd/system/ss5-server.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/server.jar -c /etc/socks5/server.json
LimitNOFILE=100000
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable ss5-server
service ss5-server start