美文网首页
ubuntu无界面开启代理

ubuntu无界面开启代理

作者: 叶扬风起 | 来源:发表于2020-08-19 16:50 被阅读0次

使用shadowsocks

1.安装ss

sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-setuptools m2crypto

2.安装shadowsocks

sudo pip install shadowsocks

3.创建配置文件

sudo vim /etc/shadowsocks.json

内容

{
    "server":"server_ip",
    "server_port":8443,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"server_pwd",
    "timeout":600,
    "method":"rc4-md5"
}

设置权限

 sudo chmod 755 /etc/shadowsocks.json

4.启动代理

检测启动

sslocal -c /etc/shadowsocks.json
显示这个则正常启动

后台运行

sslocal -c /etc/shadowsocks.json -d start

停止运行

sslocal -c /etc/shadowsocks.json -d stop

加入开机启动

sudo vi /etc/rc.local

在 exit 0 之前加入:

/usr/local/bin/sslocal –c /etc/shadowsocks.json

5.报错

5.1 AttributeError: /lib/x86_64-linux-gnu/libcrypto.so.1.1: undefined symbol: EVP_CIPHER_CTX_cleanup

错误

解决:

  1. 修改openssl.py
vim /usr/local/lib/python3.8/dist-packages/shadowsocks/crypto/openssl.py

2.替换所有EVP_CIPHER_CTX_cleanup为EVP_CIPHER_CTX_reset
快捷指令:因为有两处,所以执行两次替换

:%s/cleanup/reset/
:%s/cleanup/reset/
:wq

3.ok,启动代理

文章出处
报错解决出处

相关文章

网友评论

      本文标题:ubuntu无界面开启代理

      本文链接:https://www.haomeiwen.com/subject/sbcdjktx.html