forked from yirenchengfeng1/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2
64 lines (50 loc) · 1.66 KB
/
2
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
#####客户端黑白名单+广告屏蔽配置文件网站####
https://johnshall.github.io/Shadowrocket-ADBlock-Rules-Forever/
========================================================
手搓搭建教学步骤,请结合视频参考搭建:
一、下载并解压
wget https://github.com/shadowsocks/shadowsocks-rust/releases/download/v1.16.1/shadowsocks-v1.16.1.x86_64-unknown-linux-gnu.tar.xz
tar -xf 压缩文件 -C /usr/local/bin/
wget https://github.com/shadowsocks/v2ray-plugin/releases/download/v1.3.2/v2ray-plugin-linux-amd64-v1.3.2.tar.gz
tar -xf 压缩文件 -C /usr/local/bin/
二、配置文件
mkdir -p /etc/shadowsocks
vi /etc/shadowsocks/config.json
配置一:
{
"server":"0.0.0.0",
"server_port":9000,
"password":"输入你的密码",
"timeout":300,
"method":"aes-256-gcm",
"plugin":"v2ray-plugin",
"plugin_opts":"server"
}
三、解决库文件缺失操作
curl -O http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxf glibc-2.18.tar.gz
cd glibc-2.18/
mkdir build
cd build/
../configure --prefix=/usr
make -j2
make install
四、使用 systemd 守护进程
vi /etc/systemd/system/shadowsocks.service
[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/config.json
Restart=on-abort
[Install]
WantedBy=multi-user.target
五、开启防火墙的端口
firewall-cmd --list-ports
firewall-cmd --zone=public --add-port=9000/tcp --permanent
firewall-cmd --reload
六、配置ss开机自启动
systemctl daemon-reload #Systemctl重载
systemctl start shadowsocks #启动
systemctl enable shadowsocks #添加开机自启动
systemctl status shadowsocks #查看状态