最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【未解决】CentOS7中自己搭建shadowsocks服务端

shadowsocks crifan 164浏览 0评论
20190603,这两天突然发现,shadowsocks不可用了:
搞得用不了google,都没法工作了。
那逼得只能自己去到自己的服务器CentOS7中搭建一个试试。
参考自己之前整理的:
自己搭建服务器 · 科学上网相关知识总结
yum -y install python-setuptools
easy_install pip
pip install --upgrade pip
pip install shadowsocks
去弄个配置文件:
/etc/shadowsocks.json
内容为:
{
  "server": "0.0.0.0",
  "server_port": PORT,
  "password": "Xxxx",
  "method": "chacha20-ietf-poly1305",
  "timeout": 300,
  "mode": "tcp_and_udp"
}
结果启动出错:
[root@crifan etc]# ssserver -c /etc/shadowsocks.json -d start
INFO: loading config from /etc/shadowsocks.json
2019-06-03 10:12:49 ERROR    method chacha20-ietf-poly1305 not supported
算了,换个其他的加密吧
关于具体支持哪些加密方法
(此处百度搜,搜不到)
后来从Mac中ShadowsocksX-NG中看到了:
去换成之前常用的aes-256-cfb:
{
  "server": "0.0.0.0",
  "server_port": PORT,
  "password": "Xxxx",
  "method": "aes-256-cfb",
  "timeout": 300,
  "mode": "tcp_and_udp"
}
结果
[root@crifan etc]#ssserver -c /etc/shadowsocks.json -d start
INFO: loading config from /etc/shadowsocks.json
2019-06-03 10:17:08 INFO     loading libcrypto from libcrypto.so.10
started
去看看status,结果不支持
[root@crifan etc]# ssserver -c /etc/shadowsocks.json -d status
INFO: loading config from /etc/shadowsocks.json
2019-06-03 10:17:31 INFO     loading libcrypto from libcrypto.so.10
Traceback (most recent call last):
  File "/usr/bin/ssserver", line 9, in <module>
    load_entry_point('shadowsocks==2.8.2', 'console_scripts', 'ssserver')()
  File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 36, in main
    daemon.daemon_exec(config)
  File "/usr/lib/python2.7/site-packages/shadowsocks/daemon.py", line 50, in daemon_exec
    raise Exception('unsupported daemon command %s' % command)
Exception: unsupported daemon command status
去客户端,当前mac中连接试试
结果用不了。。。
算了,还是换用另外一个
shadowsocks-libev
的办法吧
去安装:
yum install -y shadowsocks-libev
然后发现,自带已经有个配置文件了:
[root@crifan shadowsocks-libev]# pwd
/etc/shadowsocks-libev
[root@crifan shadowsocks-libev]# cat /etc/shadowsocks-libev/config.json 
{
    "server":"127.0.0.1",
    "server_port":8388,
    "local_port":1080,
    "password":"xxx",
    "timeout":60,
    "method":"chacha20-ietf-poly1305"
}
然后去启动:
[root@crifan shadowsocks-libev]# systemctl start shadowsocks-libev
[root@crifan shadowsocks-libev]# systemctl status shadowsocks-libev
[0m shadowsocks-libev.service - Shadowsocks-libev Default Server Service
   Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-06-03 10:30:58 CST; 6s ago
     Docs: man:shadowsocks-libev(8)
 Main PID: 8066 (ss-server)
   CGroup: /system.slice/shadowsocks-libev.service
           8066 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json -u


Jun 03 10:30:58 crifan.com systemd[1]: Started Shadowsocks-libev Default Server Service.
Jun 03 10:30:58 crifan.com ss-server[8066]: 2019-06-03 10:30:58 INFO: UDP relay enabled
Jun 03 10:30:58 crifan.com ss-server[8066]: 2019-06-03 10:30:58 INFO: initializing ciphers... chacha20-ietf-poly1305
Jun 03 10:30:58 crifan.com ss-server[8066]: 2019-06-03 10:30:58 INFO: tcp server listening at 127.0.0.1:8388
Jun 03 10:30:58 crifan.com ss-server[8066]: 2019-06-03 10:30:58 INFO: udp server listening at 127.0.0.1:8388
然后客户端连接试试
不行,改了配置(端口,密码等)后重启
[root@crifan shadowsocks-libev]# systemctl restart shadowsocks-libev
[root@crifan shadowsocks-libev]# systemctl status shadowsocks-libev 
结果。还是不行。

转载请注明:在路上 » 【未解决】CentOS7中自己搭建shadowsocks服务端

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
16 queries in 0.073 seconds, using 9.43MB memory