积木别倒

  • 首页
  • 科学上网
  • 机场推荐
  • 网站搭建
  • 网站分享
  • 其他
记录、分享
小白折腾之路
  1. 首页
  2. 科学上网
  3. 正文

centos7手动搭建shadowsocks服务,支持aes-256-gcm

20 3 月, 2019 3483点热度 1人点赞 0条评论

 

手动搭建Shadowsocks的教程特别多,但是好多教程都不支持aes-256-gcm加密,所以才想把自己搭建ss的过程分享出来。并不想将就用aes-256-cfb,可能是因为强迫症的缘故吧,两种加密实际体验可能没有太大的区别。

为什么不用shadowsocks一键搭建脚本呢?

本来一直在用秋水大大的一键脚本搭建shadowsocks服务,比较方便,无奈新买的vps运行一键脚本总是出问题,只能选择手动搭建。

安装pip

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py

安装配置shadowsocks
原教程安装的shadowsocks2.8.2版本,不支持aes-256-gcm,
我们这里安装3.0版本的。

pip install --upgrade pip
sudo pip install https://github.com/shadowsocks/shadowsocks/archive/master.zip -U

安装完成创建shadowsocks配置文件,

vi /etc/shadowsocks.json

按i,插入模式,进行编辑,复制以下文本:

{
  "server": "0.0.0.0",
  "server_port": 443,
  "password": "test2018",
  "method": "aes-256-gcm"
}

按esc,然后:wq,保存后退出。
配置自启动

vi /etc/systemd/system/shadowsocks.service

直接复制保存即可,同上。

[Unit]
Description=Shadowsocks

[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json

[Install]
WantedBy=multi-user.target

启动shadowsocks

systemctl enable shadowsocks
systemctl start shadowsocks

查看shadowsocks状态

systemctl status shadowsocks -l

确认服务启动成功后,配置防火墙规则,开放你配置的端口,不然客户端是无法连接的:

firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --reload

如果提示 -bash: firewall-cmd: command not found 那么就不用管防火墙了,可以直接连接。
服务端shadowsocks加密更快

yum install m2crypto

然后重启shadowsocks服务,貌似有所提升

systemctl restart shadowsocks

另外,附上shadowsocks原版下各种加密速度对比,以供参考:

https://github.com/shadowsocks/luci-app-shadowsocks/wiki/Bandwidth-of-encrypt-method
https://github.com/shadowsocks/shadowsocks/wiki/Encryption

本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: shadowsocks
最后更新:22 4 月, 2021

Jimu

这个人很懒,什么都没留下

点赞
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

Telegram
📢 频道:积木别倒
🏄 群组:翻墙交流群
便捷工具
🚀 Speedtest
💨 Ping 测速
🧱 IP 被墙检测
🧱 域名被墙检测
归档
  • 2025 年 1 月
  • 2024 年 9 月
  • 2024 年 4 月
  • 2023 年 3 月
  • 2022 年 8 月
  • 2022 年 7 月
  • 2021 年 12 月
  • 2021 年 11 月
  • 2021 年 10 月
  • 2021 年 7 月
  • 2021 年 6 月
  • 2021 年 5 月
  • 2021 年 4 月
  • 2021 年 3 月
  • 2021 年 1 月
  • 2020 年 11 月
  • 2020 年 10 月
  • 2020 年 8 月
  • 2020 年 7 月
  • 2020 年 6 月
  • 2020 年 5 月
  • 2020 年 4 月
  • 2020 年 3 月
  • 2019 年 9 月
  • 2019 年 8 月
  • 2019 年 4 月
  • 2019 年 3 月

COPYRIGHT © 2025 jimubiedao.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang