-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
SplitHTTP: Added headers to signal cache bypass #3652
Conversation
Splithttp uses different paths for each request, so there should be no need to worry about caching issues |
I already knew SplitHTTP busts cache via paths, but this is not to avoid hitting cache. The headers specified are all to tell middleboxes stop getting involved with cache store altogether. All headers added exist in a standard SSE implementation btw. |
On a side note, I've been told that Fastly still behaves like a snail even after manually enabling streamed responses. I have a hypothesis that it's due to Fastly piping the response into their cache store at the same time, but needs someone to validate. |
|
这个你们讨论吧,主要看有没有解决现实中的问题, |
CDN 等全缓存完再发给客户端的这种情况splithttp会直接不通的( |
It acts like a preflight signal to CDNs to expect a Server-Sent Events stream, existing in both Chrome and Firefox. If (a big if) the CDNs respect this header, the following stream with the MIME |
If there's a genuine need to avoid CDN caching, I think we could consider using 206 Partial Content with a |
Maybe this should just extend to customizable server response scheme down the line? Gives more leeway in case CDNs cut SplitHTTP off in the future.
|
add meek protocol for extreme cases (don't) |
@ll11l1lIllIl1lll Planning exactly that down the line as an entirely different transport XD. Customizable Meek with different operation modes, and does not care the states of the underlying connections. Should be a lot faster than Tor Meek though, |
我觉得尚无测试表明客户端加这两个 header 确实有效的情况下先不加,还得加给 Browser Dialer,可能有 #3643 (comment) 问题 服务端可以加 |
https://github.com/mmmray/Xray-core/tree/splithttp-headers-browser-dialer here is the branch I had for adding header support to the browser dialer. the server needs to be modified to respond with I think it's also ok to add functionality to splithttp that is just missing in the browser dialer. tlsSettings and |
我觉得主要是服务端加个 而是否给客户端 GET 加
|
Getting familiar with the development process of Xray.Cache-Control: no-store
for servers to disable caching, if the middleboxes respect the web standard. Could potentially stop certain CDNs from teeing response to cache, slowing everything down.Cache-Control: no-cache
for clients to signal cache hit bypass. Should avoid hitting CDN cache altogether. Can be overridden with self-specified headers.Accept: text/event-stream
for clients to signal an expectation of streamed responses. Can be overridden with self-specified headers.