-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Implement Meek Protocol HTTP CDN #2162
Comments
https://t.me/projectXtls/94 我没研究过 tor meek 的协议细节,但感觉 fly 的实现写复杂了,有人简化一下的话可以放 v1.9.0 如果是 meek 本身就复杂,其实没必要按它的协议去实现,下行流式上行分包(多次请求),应该也能兼容不少 CDN,速度还更快 |
就是写复杂了,如果你想实现的话就直接照着原版的 https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek 写就好 不用看我这个。 要是往简单写几个月前就能发布了。(T_T 本来80行代码就能搞定的我给写了40个文件。) |
期待有人能够port过来~ |
我曾经写过一个Tcp over HttpPost的软件,然后发现无法处理服务器主动推流(比如视频)。只能在有请求下才能回应, 然后下载文件也是一个bug。文件肯定超过我设置的32k缓存.缓存也不可能无限大,所以要分组。 服务器主动推流就意味这客户端必须不断发送http. 间隔高了会卡慢。间隔低了会对服务器产生影响, 还会被当作CC攻击给ban了。 后来索性放弃了。但是当时不知道meek, 然后简单研究了资料,发现 meek 和我的玩具差不多,找到了几个爆菊的点。 资料不一定准确,随便看看就行, 我也不知道有没有用Meek为了保持客户端和服务器之间的双向连接,即便在没有数据发送的时候,Meek客户端仍需要发送空的轮询请求数据包到服务器,为了让服务器回传数据。 Meek客户端在没有数据传输的第100 ms后,发起轮询请求,发送负载内容为空的HTTP请求到Meek服务器,并由Meek服务器传回一个对这个请求的响应。之后等待一段时间间隔,如果仍然没有数据传输,则继续发起第2次轮询请求。每次发起轮询请求所等待的时间比之前一次增加50%,直到最大值5 s。一旦有数据传输,轮询请求过程就立刻结束。当再次出现无数据传输时,轮询请求机制将重新开始。 以上问题还是可以padding和random time解决但是无论这么说,下载文件造成的分块是无法解决的. 在使用普通浏览器通过TLS方式下载大文件时,客户端会发出一个下载请求,之后服务器端开始向本地传输数据,直到文件下载结束,该过程中不会有客户端和服务器端的交互。 但是使用Meek下载大文件时, 会有不断发生http请求指令,用于接受主动推流的文件数据。 也就是说,在下载过程中,客户端会向服务器不断发送http请求,之后再由服务器端返回一组数据包。此外,在每次服务器的响应中,回传的一组数据包中均会有长度较小的数据包的存在。导致Meek表现出了明显的大块数据分组传输的特征。 |
Due to the fact that Meek can utilize simple HTTP-based transports, a server can have inputs from multiple PHP gateways, and this will result in reducing the fingerprint. Additionally, more CDNs will be usable, particularly those that do not support WebSocket. In the latest updates, the firewall on the MCI operator in Iran has implemented the following connection behavior: |
@sunspringwhitesnow 根据你的描述,meek 下行不是长连接,而是需要客户端主动请求,这和我在上面说的那种形式不太一样 我没测试过,但我觉得下行长连接也能过 CDN 吧,因为遇到下载大文件的场景,CDN 总不能全缓存完了再传输,客户端等不了 |
@dragonfly20004 在没数据时发送大量空数据可以解决限速问题,但是 meek 似乎不具备这样的功能。 此外,过 CDN 需要用自己的域名,现在伊朗大部分地区/运营商不是 SNI 白名单吗? |
我只是粗略看了一下meek代码和设计文档,加上我编写HttpPost Tunnel得出的经验进行估计的。不一定准确。 大文件一般都会默认启用断点续传,可能有这个原因。但是用单向链接实现双向链接是一件很麻烦的事。 倒是Http over HttpPost挺容易的。 |
你看看meek代码,meek支持域前置攻击,可以伪装成完全合法的白名单sni(证书有效) |
这个与协议是否支持无关,因为对应的需求是过 CDN,要看 CDN 是否支持,很少有 CDN 会支持这种东西(听说微软的支持?) |
???,前几天,还有网友把我骗了,讨论结果是,sni填VISA.com,CSGO.com等等。可以提高速度,减少阻断。我也不知道当时为什么成功了??? |
真的吗? |
不行吧 测了一遍报403 |
不行了 |
我是觉得 CF 如果允许这么干,首先是很不负责,其次是早就会传遍了, |
To Putshitgold:有链接吗 |
To Putshitgold:这个是我说过的,运营商可能对不同的域名有不同的流量优先级,我们在讨论的是 CF 是否允许填别人的 SNI |
|
可以看看这个 |
@sunspringwhitesnow 的确没有听说过,我觉得 CDN 允许这么干的话,对他的用户而言是很不负责的行为,域名可能会被污染 |
Yes, sending a large amount of data in a way that resembles downloading a file can solve the problem, but it will consume a significant amount of internet data, and 80% of people in iran use mobile internet with expensive data plans. In MCI: In Irancell service provider, there is no initial burst issue, and the decision to block a connection is based on IP, SNI(if it's on cdn), and high upload/download rates on a connection. the IP ranges of Cloudflare are categorized into whitelist, blacklist, and graylist and have heavy limitations on bandwidth. There are domestic CDNs that have imposed limitations on WebSocket. Additionally, when the possibility of using a simple PHP script exists, almost any hosting provider can become a CDN, and there are many such providers in Iran. |
Hi. I'm an Iranian. Does REALITY currently work for mci ? For me, reality works for every isp except mci. Do you have the same issue ? If yes, then how are they limiting reality ? On mci, it connects but has very high ping and disconnects frequently. |
@dragonfly20004 我觉得 meek 应该不是反复开 TCP 连接、用一次就扔吧,可能可以这么用,但是特征会很明显 国内 CDN 的话,流行了就会封你,我记得几年前有一些机场用“百度云加速”转发 WS,于是它就不再支持 WS 了 |
@dragonfly20004 还有一件事是,meek 这种模式本身的速度比较有限,可能达不到你“提升速度”的预期,总之你可以先试一下 |
公开信息应该问题不大吧 |
@RPRX The Tor guys have considered streaming download but it did not make its way into Go meek. Python meek actually supports streaming download via chunked transfer-encoding (never enabled in production because Tor people were rewriting PTs in Go at that time; now again they are ditching meek itself). It does work over most CDNs. https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek/-/issues/12857 |
HTTP/2 协议不是支持服务端主动推送消息吗?现在cloudflare也支持http/2回源,让服务器透过http/2主动推流给客户端不就行了 |
Meek,还有一种类似的叫MITM。也是纯的http格式的数据载流。算了,还是不多说了。 |
http2是服务器push,而不是tcp的双向通信,这个还是有难度的(http2双向通信可以看gRPC)。 |
I would really like to see Meek or a similar HTTP-based protocol land in xray. The only [1] CDN provider viable for domain fronting in Iran (i.e., one that hosts a lot of important websites) is Fastly, and their websocket support works well but is expensive. Using v2fly might work but the GUI clients I care about are now based on xray. [1] "only" is a strong word but there are not many either way, also there is no need to discuss providers here |
What's the modern client/server implementation for Meek I can easily setup? I know v2ray supports it, anything else? I would love to see Meek in Xray as a last resort transport feature. |
https://lists.torproject.org/pipermail/tor-dev/2014-January/006159.html
v2fly/v2ray-core#2546
meek protocol seems promising specially for non-websocket transport over cdn. appreciate for anyone who can implement
The text was updated successfully, but these errors were encountered: