Gavin

CentOS6.4配置安装shadowsocks

shadowsocks需要依赖各种python库,参考官网教程就可以很快速的安装


1
2
3
yum install python-setuptools
easy_install pip
pip install shadowsocks

接下来是配置,需要创建/etc/shadowsocks.json文件


1
2
3
4
5
6
7
8
9
10
{
    "server":"你的服务器IP",
    "server_port":你的端口,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"你的密码",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

如果需要多人登录呢?配置文件只许稍微调整一下即可


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
    "server":"你的服务器IP",
    "local_address":"127.0.0.1",
    "local_port":1080,
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open":false,
    "port_password":
    {
        "用户1端口":"用户1密码",
        "用户2端口":"用户2密码"
    },
    "_comment":
    {
        "用户1端口":"备注",
        "用户2端口":"备注"
    }
}

启动方式非常简单


1
2
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop

如果需要流量监控,请参考《shadowsocks监控流量及每分钟使用情况

android上由于play商店打不开,可以从git上获取到最新的shadowsocks.apk客户端

ios客户端可以直接从appstore中查找shadowsocks

windows客户端可以使用shadowsocks-gui

码字很辛苦,转载请注明来自淡兰色的海洋《CentOS6.4配置安装shadowsocks》

评论

  1. 李朝阳 #1

    你好,我安装了shadowsocks,但是在启动的时候有报错
    [root@Singapore_new ~]# pip list
    gevent (1.0.1)
    greenlet (0.4.6)
    pip (1.5.4)
    setuptools (0.6c11)
    shadowsocks (2.6.8)
    wsgiref (0.1.2)
    [root@Singapore_new ~]# ssserver -c /etc/shadowsocks/shadowsocks.json
    INFO: loading config from /etc/shadowsocks/shadowsocks.json
    2015-05-07 06:03:05 INFO loading libcrypto from libcrypto.so.10
    2015-05-07 06:03:05 INFO starting server at 52.74.52.96:8388
    Traceback (most recent call last):
    File "/usr/local/bin/ssserver", line 8, in
    load_entry_point('shadowsocks==2.6.8', 'console_scripts', 'ssserver')()
    File "/usr/local/lib/python2.7/site-packages/shadowsocks/server.py", line 60, in main
    tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
    File "/usr/local/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 584, in __init__
    server_socket.bind(sa)
    File "/usr/local/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
    socket.error: [Errno 99] Cannot assign requested address
    请问您遇到过这个问题吗,我在网上百度了半天,所有能找到方法都试过了,都不管用。谢谢

    回复
    2015-05-7
    • Gavin

      你配置文件里,服务器的IP地址不对
      写成0.0.0.0试试

      回复
      2015-05-14
  2. 奥强 #2

    我的问题和他差不多,我是的在我自己的CENTOS上装了一下然后想访问远程服务器,来实现我本地的CENTOS翻,如果我把本地的CENTOS改为0.0.0.0是可以启动的 可是这样的话我能访问的到服务器吗?这样能翻的出去吗?

    回复
    2015-05-29
    • jackyting825

      你好,你解决了这个问题了吗?我server地址改成0.0.0.0后是能够成功启动服务器的.但是不能实现翻墙的功能,请问以下,应该怎么操作

      回复
      2017-05-20
  3. test #3

    hello,我的报错信息是这个。能帮忙看看是什么问题吗?谢谢~
    INFO: loading config from /etc/shadowsocks.json
    2016-05-16 09:19:53 INFO loading libcrypto from libcrypt
    .so.10
    2016-05-16 09:19:53 INFO starting server at 0.0.0.0:443
    raceback (most recent call last):
    File "/usr/bin/ssserver", line 9, in
    load_entry_point('shadowsocks==2.8.2', 'console_scripts'
    'ssserver')()
    File "/usr/lib/python2.7/site-packages/shadowsocks/server.
    y", line 68, in main
    tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resol
    er, False))
    File "/usr/lib/python2.7/site-packages/shadowsocks/tcprela
    .py", line 582, in __init__
    server_socket.bind(sa)
    File "/usr/lib64/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
    socket.error: [Errno 98] Address already in use

    回复
    2016-05-16