simple-obfs
simple-obfs copied to clipboard
使用cloudflare加速时,直连域名可以,CDN域名不行
{
"server":"0.0.0.0",
"server_port":2095,
"local_port":1080,
"password":"PASSWORD",
"timeout":60,
"method":"chacha20-ietf-poly1305",
"mode":"tcp_and_udp",
"fast_open":true,
"plugin":"obfs-server",
"plugin_opts":"obfs=http;failover=www.cloudflare.com:80;fast-open"
}
{
"server":"0.0.0.0",
"server_port":2096,
"local_port":1080,
"password":"PASSWORD",
"timeout":60,
"method":"chacha20-ietf-poly1305",
"mode":"tcp_and_udp",
"fast_open":true,
"plugin":"obfs-server",
"plugin_opts":"obfs=tls;failover=www.cloudflare.com:443;fast-open"
}
用VPS的ip,或者cf的直连域名,可以使用。 但换成cdn域名,就不能使用了。Surge测试时,http模式能返回延迟,tls模式直接失败。 但cdn域名直接访问时,failover可以正常加载。
是不是需要在cloudflare里面调整压缩加速的选项?我是用免费版的cf,希望能问下该怎么设置cf。
我自己的一些小经验,可以参考
使用cloudflare时,obfs使用 http 不要使用 tls,CDN 的https会做一层tls封装,可能导致客户端解密失败。
Server
{ "server":"0.0.0.0", "server_port":2095, "local_port":1080, "password":"PASSWORD", "timeout":60, "method":"chacha20-ietf-poly1305", "mode":"tcp_and_udp", "fast_open":true, "plugin":"obfs-server", "plugin_opts":"obfs=http ~~;failover=www.cloudflare.com:80;fast-open~~" } { "server":"0.0.0.0", "server_port":2096, "local_port":1080, "password":"PASSWORD", "timeout":60, "method":"chacha20-ietf-poly1305", "mode":"tcp_and_udp", "fast_open":true, "plugin":"obfs-server", "plugin_opts":"obfs=http ~~;failover=www.cloudflare.com:443;fast-open~~" }
Client
plugin : obfs-server plugin_opts : obfs=http;obfs-host=your.cloudflare.domain
(Change "your.cloudflare.domain" to your actual binding domain.)
补充一下,CDN在安卓上要想成功使用,要用随附链接里面的20190820版。(https://github.com/xianren78/simple-obfs-android/releases)
再补充一下:1,支持自定义CF IP来连接。
2,NGINX或者caddy反代,只支持http,不支持443https端口。实际上simple-obfs都不支持真正的https
PS: 感谢@xiuluo,提供travis自动发布的方法,让我也可以在线编译并发布到github; 踩了一个大坑,注册的travis-ci.com,生成secure的时候用的是org, 一遍一遍的401 - Bad credentials // See: https://developer.github.com/v3 (Octokit::Unauthorized)。
@xianren78 然而我现在用的是v2ray (逃
@xianren78 然而我现在用的是v2ray (逃
学习知识为主,我也早就v2ray了
我的也用不了,浏览器访问域名正常。客户端通过域名连接不行,通过ip连接是可以的。求教 { "server":["[::0]","0.0.0.0"], "server_port":8210, "local_port":1080, "password":"pwd", "timeout":60, "mode":"tcp_and_udp", "fast_open":true, "method":"aes-256-gcm", "plugin":"/usr/local/bin/obfs-server", "plugin_opts":"obfs=http;failover=127.0.0.1:80;fast-open" }
我的也用不了,浏览器访问域名正常。客户端通过域名连接不行,通过ip连接是可以的。求教 { "server":["[::0]","0.0.0.0"], "server_port":8210, "local_port":1080, "password":"pwd", "timeout":60, "mode":"tcp_and_udp", "fast_open":true, "method":"aes-256-gcm", "plugin":"/usr/local/bin/obfs-server", "plugin_opts":"obfs=http;failover=127.0.0.1:80;fast-open" }
HTTP ports supported by Cloudflare:
80 8080 8880 2052 2082 2086 2095
另外请注意客户端兼容性问题
@xianren78 我用80端口的
@xianren78 我用80端口的
把CF 客户端和服务端的配置都截图贴出来吧,你贴的配置端口是8210啊,你客户端用什么?
我的也用不了,浏览器访问域名正常。客户端通过域名连接不行,通过ip连接是可以的。求教 { "server":["[::0]","0.0.0.0"], "server_port":8210, "local_port":1080, "password":"pwd", "timeout":60, "mode":"tcp_and_udp", "fast_open":true, "method":"aes-256-gcm", "plugin":"/usr/local/bin/obfs-server", "plugin_opts":"obfs=http;failover=127.0.0.1:80;fast-open" }
HTTP ports supported by Cloudflare:
80 8080 8880 2052 2082 2086 2095
另外请注意客户端兼容性问题
{ "server": ["0.0.0.0"], "server_port":8880, "password":"pwd", "timeout":60, "mode": "tcp_only", "no_delay":true, "method":"aes-256-gcm", "plugin":"/usr/bin/v2ray-plugin", "plugin_opts":"server;fast-open;host=domain.com;loglevel=none" } 同一个域名,v2ray-plugin with websocket是可以的。
@xianren78 我用80端口的
把CF 客户端和服务端的配置都截图贴出来吧,你贴的配置端口是8210啊,你客户端用什么?
{ "server":["[::0]","0.0.0.0"], "server_port":80, "local_port":1080, "password":"pwd", "timeout":60, "mode":"tcp_and_udp", "fast_open":true, "method":"aes-256-gcm", "plugin":"/usr/local/bin/obfs-server", "plugin_opts":"obfs=http;failover=127.0.0.1:8080;fast-open" } 这个是现时obfs配置
@xianren78 我用80端口的
把CF 客户端和服务端的配置都截图贴出来吧,你贴的配置端口是8210啊,你客户端用什么?
@xianren78 我用80端口的
把CF 客户端和服务端的配置都截图贴出来吧,你贴的配置端口是8210啊,你客户端用什么?
1,插件程序填obfs-local可以吗?我填的obfs-local.exe,我手边没有电脑测试不了。 2,把服务端的fastopen去掉 3,看一下你的obfs-server和obfs-local.exe版本号是不是最新的。
@xianren78 我用80端口的
把CF 客户端和服务端的配置都截图贴出来吧,你贴的配置端口是8210啊,你客户端用什么?
1,插件程序填obfs-local可以吗?我填的obfs-local.exe,我手边没有电脑测试不了。 2,把服务端的fastopen去掉 3,看一下你的obfs-server和obfs-local.exe版本号是不是最新的。
把客户端的服务器地址从域名改成ip是可以用的
@xianren78 我用80端口的
把CF 客户端和服务端的配置都截图贴出来吧,你贴的配置端口是8210啊,你客户端用什么?
1,插件程序填obfs-local可以吗?我填的obfs-local.exe,我手边没有电脑测试不了。 2,把服务端的fastopen去掉 3,看一下你的obfs-server和obfs-local.exe版本号是不是最新的。
server配置 { "server":["0.0.0.0"], "mode":"tcp_and_udp", "server_port": 2086, "password": "pwd", "timeout":60, "fast_open":true, "method":"chacha20-ietf-poly1305", "plugin":"obfs-server", "plugin_opts":"obfs=http" }
server 本地直接起ss-local ss-local -k=pwd -s cf.domain -p 2086 -l 1080 -mchacha20-ietf-poly1305 --plugin obfs-local --plugin-opts=obfs=http;obfs-host=cf.domain
server 直接指向ss-local ALL_PROXY=socks5h://127.0.0.1:1080 curl https://google.com/ -v
Rebuilt URL to: https://google.com/ Trying 127.0.0.1... TCP_NODELAY set SOCKS5 communication to google.com:443 SOCKS5 request granted. Connected to 127.0.0.1 (127.0.0.1) port 1080 (#0) ALPN, offering h2 ALPN, offering http/1.1 successfully set certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs TLSv1.3 (OUT), TLS handshake, Client hello (1): 仍然不行
@xianren78 然而我现在用的是v2ray (逃
我也想用v2ray ,奈何手机上的APP不支持v2ray 这种插件,只有OBFS