Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadowsocks-windows支持tcp fastopen了是吗?配合obfs插件,该如何配置? #2093

Closed
dragon100a opened this issue Dec 2, 2018 · 9 comments

Comments

@dragon100a
Copy link

dragon100a commented Dec 2, 2018

Shadowsocks version / 影梭版本

4.12

Environment(Operating system, .NET Framework, etc) / 使用环境(操作系统,.NET Framework等)

win10 1803

Steps you have tried / 操作步骤

服务器端:Debian v9
1.因为内核较新,因此很顺利的开启了bbr。
2./etc/sysctl.conf的末尾添加net.ipv4.tcp_fastopen = 3,开启tfo
3.安装shadowsocks-libev
4.安装obfs server
git clone https://github.com/shadowsocks/simple-obfs.git
cd simple-obfs
git submodule update --init --recursive
./autogen.sh
./configure && make
make install
ln -s /usr/local/bin/obfs-server /usr/bin
在/etc/shadowsocks-libev/config.json中添加:
"fast_open": true,
"plugin":"obfs-server",
"plugin_opts":"obfs=http"

客户端:
shadowsocks文件夹中,添加obfs-local.exe和msys-2.0.dll(https://github.com/shadowsocks/simple-obfs/releases)
编辑服务器页面是这样写的:
22222222
本地配置文件内容如下:
{
"server": "...",
"server_port": *,
"password": "**",
"method": "
",
"plugin": "obfs-local",
"plugin_opts": "obfs=http",
"plugin_args": "obfs-host=www.bing.com",
"remarks": "",
"timeout": 5
},

那么 tcp fastopen 该怎么加入呢?

@chenshaoju
Copy link
Collaborator

界面上插件只能用一个,不过你可以自行使用参数再启动一个,然后在界面上指向 127.0.0.1 和你的本地插件端口。

@dragon100a
Copy link
Author

@chenshaoju
你说的这个是要怎么写呢?
插件只有一个obfs-local啊,tcp fastopen 要写在什么地方呢?

@chenshaoju
Copy link
Collaborator

抱歉,看错了,是TCP Fast Open,不是KCPTUN。
这个事情有讨论,但是好像由于操作系统的支持问题搁置了,目前仍然不支持TCP Fast Open: #1328

@dragon100a
Copy link
Author

dragon100a commented Dec 2, 2018

@chenshaoju
shadowsocks/shadowsocks-libev#1965
上面这个链接提到,不是已经支持了吗?难道 后来又取消了???

@chenshaoju
Copy link
Collaborator

对,这是libev版支持了,不是Windows版。

@ghost
Copy link

ghost commented Dec 2, 2018

话说你simple-obfs看的哪篇

@dragon100a
Copy link
Author

@chenshaoju
那看起来客户端这边就没什么事情了。
补充一个其他问题:
服务器端 tcp fastopen与obfs一起用时,
我看到有地方这样写的:
"fast_open": true,
"plugin": "obfs-server",
"plugin_opts": "obfs=http;fast-open=true"
插件参数后面多了一个“fast-open=true”,而且下划线变成了减号。
这样写科学吗?开启fastopen,需要写2次吗?

@chenshaoju
Copy link
Collaborator

chenshaoju commented Dec 2, 2018

我看了一下simple-obfs 客户端的参数:
https://github.com/shadowsocks/simple-obfs/blob/master/doc/obfs-local.asciidoc

Shadowsocks for Windows 不支持TCP Fast Open,但是simple-obfs的服务端和客户端都支持,是 --fast-open 参数。

因此,你只需要在服务端关闭shadowsocks-libev的TCP Fast Open,然后开启simple-obfs的TCP Fast Open,并在客户端的simple-obfs中启用 --fast-open 即可。

关于 simple-obfs 服务端的参数:
https://github.com/shadowsocks/simple-obfs/blob/master/doc/obfs-server.asciidoc

@dragon100a
Copy link
Author

@chenshaoju
先表示感谢。给出了参数列表。根据上述内容,总结一下。
服务器端的配置文件除了原有内容,应该附加:
"plugin":"obfs-server",
"plugin_opts":"obfs=http;fast-open=true"
客户端的配置文件除了原有内容,应该附加:
"plugin": "obfs-local",
"plugin_opts": "obfs=http",
"plugin_args": "obfs-host=www.bing.com;fast-open=true",

这样应该就是完美了吧~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants