-
Notifications
You must be signed in to change notification settings - Fork 175
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
[Desktop] Use fallback mirrors for China users #2424
Conversation
It seems like the check is not working because of cors policy. Need to find a workaround. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to (simultaneously) check download speed on a smallish file. Use the electron API to initiate this, and bypass all the CORS / browser limitations.
Wonder if we should consider using the IP. Eg check the country code in the response of this API: |
I get following response lol:
|
I think if we are not checking the response content like status, the opaque response is good enough. |
Surprised we got rate limited so fast. Supposed to have : "30000 free requests per month (1000 in 24 hours).". Using google looks fine too |
Users in China have poor access to the mirrors, but sometimes the initial accessibility check can pass so the default mirror is selected.
This PR checks whether the user in China in a very reliable way and directly set the fallback mirrors for them.
┆Issue is synchronized with this Notion page by Unito