积木别倒

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

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

3月 20, 2019 3058点热度 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

积木

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

点赞
下一篇 >

文章评论

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

Telegram
📢 频道:积木别倒
🏄 群组:翻墙交流群
最新 热点 随机
最新 热点 随机
[转载]监控你的机场链路质量(Windows) 听说速蛙云机场跑路了,怎么才选到稳定靠谱的机场呢? Macbook 安装 homebrew 教程 2022 年9个订阅链接转换网站推荐 8个购买非国区 Apple ID 和 GV 号的地方 谈谈几个自用翻墙机场:主力稳定,备用便宜
最新可用 mtproxy代理(MTProxyTLS)一键脚本安装教程 香港移动卡国内如何查询本机号码? 2022 最新注册美国区 Apple ID 教程 小白如何利用 Vultr VPS 快速搭建个人在线私有云盘「ownCloud」 2023 翻墙后 10 个高质量成人网站推荐(18禁) 15个免费可自定义插画素材网站推荐 (2023年2月更新)
归档
  • 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月
标签聚合
mtproxy 美区Apple ID 翻墙机场 中转线路 shadowsocks Trojan 在线书签 wordpress mtg telegram IEPL 腾讯AIA FFmpeg Docker 一键脚本 Google Voice

COPYRIGHT © 2022 jimubiedao.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang