-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
More graceful handling of blocked Curseforge browser downloads #1512
Conversation
Is there anything preventing this Pull Request from being merged? I know someone that's going through that issue, and would be nice to have a way to download the mods manually. One thing I would suggest is to have a download link on every single item, so you can do it separately. If you have 10 in that list, it'll open up 10 tabs, and could get resource hoggy very fast. |
Good idea, I like that better. |
Or the standard download icon on button would probably be nice and GUI friendly. Either way, thank you for the work you're doing. :) |
Updated to use individual download buttons. Also made more resilient. I feel better about this code. |
Looking good! :) |
Oh, could you (or did you already) implement a verification to check if the mods are there when you hit continue? Just incase someone forgets one by accident. Perhaps a warning and then refreshes the list with the ones that are still missing? Sorry for thinking of this so late. Lol beyond that I can't think of anything else you'd need? |
@Celeo could you enable the "edits by maintainers"? |
I cannot reproduce the cloudflare issue returning a 403, it just gets stuck in a download loop until the timeout. |
Agreed; I'm no longer getting the 403s when the Curseforge verification page is shown. EDIT: now it's 503. EDIT: the responseHeaders include "cloudflare" in the server field, but that seems to be regardless of whether or not the user is sent to the Cloudflare verification page or the actual site. |
I've pushed an improvement to the detection. |
LGTM. Maybe in the future someone wants to implement an addition so downloaded mods get removed from the manual list. |
…l downloading) (gorilla-devs#1512) * Switch to individual download buttons * Improve Cloudflare detection
…l downloading) (gorilla-devs#1512) * Switch to individual download buttons * Improve Cloudflare detection
Purpose
This PR attempts to more gracefully handle Curseforge blocking automated downloads of mods.
Related: many posts in Discord.
Fixes #1367, #1520.
Approach
If the Electron browser detects an HTTP 403 response from Curseforge, it notifies the webapp of such. Following the (attempted) downloading of all mods, the user is presented with info text and the ability to open the instance's folder. The list of missing mods includes links to download those mods themselves. This bypasses / gets around the automated download protection by (1) using the user's main browser which is more likely to be easily fingerprintable, and (2) allowing the user time to confirm captchas or other human-verification mechanics.
Learning
The issues I faced were mostly to the system I was running on. WSL + VcXsrv is tedious at best, installing Node/Rust/Choco/Python/openssl etc. on Windows didn't go well, so I had to reach for VirtualBox, set up a new graphical install there, and test the code.
The only other thing I'd mention is that there doesn't seem to be hot-module replacement. This may have not been implemented, for any number of reasons, but did slow down development.