美文网首页
安装配置 穿越火线

安装配置 穿越火线

作者: FiveStrong | 来源:发表于2015-12-17 11:21 被阅读128次

    安装

    # Archlinux sudo pacman -S shadowsocks
    # CentOS sudo yum install m2crypto python-pip python-setuptoolssudo 
    pip install shadowsocks
    # Debian/Ubuntusudo apt-get install python python-dev python-pip libssl-dev swigsudo
    pip install shadowsocks gevent M2Crypto
    

    配置

    在服务器上编辑/etc/shadowsocks/server.json

     { "server": "Server IP", 
    "server_port": 8388,
     "local_address": "0.0.0.0", 
    "local_port": 8389, 
    "password": "mypassword", 
    "timeout": 300, 
    "method": "aes-256-cfb",
    "workers": 1}
    

    在本地编辑/etc/shadowsocks/client.json

    { "server": "Server IP",
     "server_port": 8388, 
    "local_address": "127.0.0.1", 
    "local_port": 8389,
     "password": "mypassword", 
    "timeout": 300, 
    "method": "aes-256-cfb", 
    "workers": 1}
    

    运行

    在服务器上运行

    # Archlinuxsudo systemctl start shadowsocks-server@server.service
    # CentOS/Debian/Ubuntussserver -c /etc/shadowsocks/server.json
    

    在本地上运行

    # Archlinuxsudo systemctl start shadowsocks@client.service
    # CentOS/Debian/Ubuntusslocal -c /etc/shadowsocks/client.json
    

    CentOS/Debian/Ubuntu上可以把上面的命令添加到/etc/rc.local中以便开机自启动:

    nohup python /usr/local/bin/ssserver -c /etc/shadowsocks/server.json >/dev/null 2>&1 &
    nohup python /usr/local/bin/sslocal -c /etc/shadowsocks/client.json >/dev/null 2>&1 &
    

    自动配置

    yum update
    yum install python-gevent python-pip python-m2crypto
    wget –no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
    chmod +x shadowsocks.sh
    ./shadowsocks.sh 2>&1 | tee shadowsocks.log
    

    相关文章

      网友评论

          本文标题:安装配置 穿越火线

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