CentOS7搭建Shadowsocks服务器-问题

安装shadowsocks

pip install shadowsocks

编辑配置文件

{
      "server": "0.0.0.0",
      "server_port": 8388,
      "password": "uzonxxxx7722",
      "method": "aes-256-cfb"
}

配置服务

vim /etc/systemd/system/shadowsocks.service

[Unit]
Description=Shadowsocks

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

[Install]
WantedBy=multi-user.target

启动服务

systemctl enable shadowsocks
systemctl start shadowsocks
//查看启动状态
systemctl status shadowsocks -l

问题

找不到ssserver

用 whereis ssserver找到具体的命令路径,然后改下/etc/systemd/system/shadowsocks.service 里面的对应命令

undefined symbol: EVP_CIPHER_CTX_cleanup

  1. 用vi打开文件:vim /usr/local/lib/python3.6/site-packages/shadowsocks/crypto/openssl.py
  2. 跳转到52行(shadowsocks2.8.2版本,其他版本搜索一下cleanup)
  3. 进入编辑模式
  4. 将第52行libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,)
    改为libcrypto.EVP_CIPHER_CTX_reset.argtypes = (c_void_p,)
  5. 再次搜索cleanup(全文件共2处,此处位于111行),将libcrypto.EVP_CIPHER_CTX_cleanup(self._ctx)
    改为libcrypto.EVP_CIPHER_CTX_reset(self._ctx)
  6. 保存并推出
  7. 启动shadowsocks服务:service shadowsocks start

https://www.jianshu.com/p/817813c2ede2

You may also like...

发表评论

电子邮件地址不会被公开。 必填项已用*标注