美文网首页
CentOS 7 搭建Shadowsocks Server

CentOS 7 搭建Shadowsocks Server

作者: 九尾 | 来源:发表于2017-10-31 16:13 被阅读778次

    关闭防火墙

    systemctl stop firewalld.service
    systemctl disable firewalld.service
    

    安装shadowsocks

    yum install -y epel-release 
    yum install -y python-setuptools && easy_install pip 
    pip install shadowsocks
    

    创建配置文件

    vim /etc/shadowsocks.json
    

    加入配置文件内容

    {
      "server": "0.0.0.0",
      "server_port": 443,
      "password": "你的密码",
      "method": "aes-256-cfb"
    }
    

    测试一下看看是否管用

    /usr/bin/ssserver -c /etc/shadowsocks.json
    

    使用shadowsocks客户端连接测试一下,看日志是否正常。

    如正常可以Ctrl + C

    编辑服务配置

    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
    

    wq后启动服务

    systemctl start shadowsocks
    systemctl enable shadowsocks
    

    相关文章

      网友评论

          本文标题:CentOS 7 搭建Shadowsocks Server

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