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

Safari often returns 404 #329

Open
richfang opened this issue Mar 15, 2019 · 4 comments
Open

Safari often returns 404 #329

richfang opened this issue Mar 15, 2019 · 4 comments

Comments

@richfang
Copy link

Safari can open google normally, when you click gmail on the page, it will return a 404 error. Right click on the page gmail, open on the new tab page, it will be normal.

@qwqVictor
Copy link

The HTTP/2 multiplexing is to blame. Google uses HTTP/2 to enhance their performance. If there are many resources to be requested which is hosted on single IP, the browser will combine these requests into one connection, which may led SNIProxy to forward the connection to an incorrect server.

@richfang
Copy link
Author

richfang commented Mar 16, 2019 via email

@qwqVictor
Copy link

Thanks! Is there a way to solve this problem? Can you increase the number of sniproxy servers? Victor Huang [email protected] 于2019年3月16日周六 下午4:33写道:

Increase the number of SNIProxy servers is OK. But it is truly difficult to implement because Google has a large number of servers.

The only way that I can come up with is disabling HTTP/2.SNIProxy can't do that because it doesn't know what version of HTTP you used, it can only read the SNI header and forward the TCP request to the backend, but the HTTP version negotiation is over TLS. I suggest that you self-sign a certificate for Google and import the root certificate to your device, and use nginx as the reverse proxy instead.

@jornane
Copy link

jornane commented Mar 17, 2019

The only way that I can come up with is disabling HTTP/2.SNIProxy can't do that because it doesn't know what version of HTTP you used

In case of HTTP/2, the server actually sends a flag in the Server Hello packet indicating that it supports h2. I have never tested this, but maybe SNIProxy could get a configuration option to drop this flag when proxying the Server Hello? That would mean a lot more code though.

This has been discussed here as well:

@dstd dstd mentioned this issue Aug 31, 2022
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

3 participants