积木别倒

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

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

3月 20, 2019 2687点热度 0人点赞 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
最后更新:4月 22, 2021

积木

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

点赞
下一篇 >

文章评论

取消回复

Telegram
📢 频道:积木别倒
🏄 群组:翻墙交流群
标签聚合
Clash.Net 插画素材 SEO snell 2.0 Trojan 搜索引擎 在线书签 Docker 美区Apple ID IPsec VPN ncm格式转换 mtproxy 导航网站 mtg telegram wordpress 一键脚本 翻墙机场 shadowsocks FFmpeg
便捷工具
🚀 Speedtest
💨 Ping 测速
🧱 IP 被墙检测
🧱 域名被墙检测
归档
  • 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 © 2022 jimubiedao.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang