Shadowsocks-libev: simple-obfs 怎么配置?

Created on 13 Jan 2017  ·  15Comments  ·  Source: shadowsocks/shadowsocks-libev

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

shadowsocks-libev 2.6.1

What operating system are you using?

opensuse 13.1

What did you do?

use plugin simple-obfs

What did you expect to see?

normal run service

What did you see instead?

What is your config in detail (with all sensitive info masked)?

服务器端,首先编译了simple-obfs,然后在config.json添加以下1行:
server: "plugin":"obfs-server --obfs http"

路由器端,安装simple-obfs for ar71xx,然后在luci界面的plugin添加以下内容:
"obfs-local --obfs http --obfs-host www.baidu.com"

服务器端服务无法启动,请教这个应该怎么配置?

question

Most helpful comment

@debiansid

  1. 先编译安装:https://github.com/shadowsocks/simple-obfs
  2. 在config.json里添加配置:
    ss-server的json配置增加下面两行:
    "plugin":"obfs-server",
    "plugin_opts":"obfs=http",
    ss-local对应的应该是:
    "plugin":"obfs-local",
    "plugin_opts":"obfs=http;obfs-host=baidu.com",

All 15 comments

无法启动的log信息呢

我的也是这样。
root@BossySalty-VM:~# /etc/init.d/shadowsocks-libev status
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
Loaded: loaded (/lib/systemd/system/shadowsocks-libev.service; enabled)
Active: failed (Result: signal) since Sat 2017-01-14 07:54:46 EST; 2min 32s ago
Docs: man:shadowsocks-libev(8)
Process: 690 ExecStart=/usr/bin/ss-server -a $USER -c $CONFFILE $DAEMON_ARGS (code=killed, signal=SEGV)
Main PID: 690 (code=killed, signal=SEGV)

Jan 14 07:54:46 BossySalty-VM systemd[1]: Starting Shadowsocks-libev Default Server Service...
Jan 14 07:54:46 BossySalty-VM systemd[1]: Started Shadowsocks-libev Default Server Service.
Jan 14 07:54:46 BossySalty-VM ss-server[690]: 2017-01-14 07:54:46 INFO: using tcp fast open
Jan 14 07:54:46 BossySalty-VM ss-server[690]: 2017-01-14 07:54:46 INFO: onetime authentication enabled
Jan 14 07:54:46 BossySalty-VM ss-server[690]: 2017-01-14 07:54:46 INFO: plugin "obfs-server --obfs http" enabled
Jan 14 07:54:46 BossySalty-VM ss-server[690]: 2017-01-14 07:54:46 INFO: UDP relay enabled
Jan 14 07:54:46 BossySalty-VM ss-server[690]: 2017-01-14 07:54:46 INFO: initializing ciphers... chacha20
Jan 14 07:54:46 BossySalty-VM systemd[1]: shadowsocks-libev.service: main process exited, code=killed, status=11/SEGV
Jan 14 07:54:46 BossySalty-VM systemd[1]: Unit shadowsocks-libev.service entered failed state.

我的问题解决了,是因为config.json少写了一个,

有完整的配置样例不?vps ss-server/obfs-server openwrt ss-redir/obfs-local

@debiansid

  1. 先编译安装:https://github.com/shadowsocks/simple-obfs
  2. 在config.json里添加配置:
    ss-server的json配置增加下面两行:
    "plugin":"obfs-server",
    "plugin_opts":"obfs=http",
    ss-local对应的应该是:
    "plugin":"obfs-local",
    "plugin_opts":"obfs=http;obfs-host=baidu.com",

Format for plugin_opts are wrong. It should be obfs=http;obfs_host=
www.baidu.com.

server端:
自己编译simple-obfs
config.json里面添加"plugin":"obfs-server --obfs http"

openwrt端:
下载安装simple-obfs:http://openwrt-dist.sourceforge.net/packages/OpenWrt/base/
luci界面的plugin填入:"obfs-local --obfs http --obfs-host www.baidu.com"

然后重新启动ss就可以了

测试server端开启obfs,客户端不开启obfs,不影响使用

The updated usage is here: https://github.com/shadowsocks/simple-obfs#example-plugin-mode-with-shadowsocks

不能用于ss-redir?

可以

server升级到2.6.2以后,server端开启obfs后,mac的shadowsocksX-NG 1.3.2 和iOS端的shadowrocket无法连接server,openwrt没测试不知道,现在开了两个,一个开启obfs,一个没开

plugin 和 plugin_opts 两个选项加入config.json 不能启动,加入 /etc/default/shadowsocks 不能启动
但是用 ss-server -c config.json --plugin obfs-server --plugin-opts "obfs=http" 确实可以启动,不知道什么原因。

如果是自己编译安装(不是用包安装)的话,obfs-server不在路径中,需要显式指定路径才能用init.d方式启动,例如/usr/local/bin/obfs-server

@hzqim 发现plugin_opts 在config.json不能用。在配置中只能写"plugin":"obfs-server --obfs http" @xingezhang 。我的是3.08版本

Was this page helpful?
0 / 5 - 0 ratings