-
Notifications
You must be signed in to change notification settings - Fork 2
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
CloudProxySharp.Exceptions.CloudProxyException: The cookies provided by CloudProxy are not valid #1
Comments
There is a know workaround for spigotmc! I will provide more info tonight and can implement you a workaround in the c# lib until there is a proper solution in CloudSharp for file downloads. I'm already looking into a fix for CloudSharp to support all websites including downloads. The url you pass to the function and the url on the logs for cloudproxy are different, because I already use a workaround for downloads: Cloudproxy can't bypass the protection on downloads (as written above), so I solve it on the homepage and remove the path from the url, because the homepage doesn't invoke a download. But on spigotmc, the homepage is not cloudflare challenge protected, so it fails to get the correct cookies there, only the downloads are protected. Once we have the cookies, they are valid for the whole page. |
Ah i see. Thanks for the detailed info. If you could implement the workaround it would help a ton. Thank you |
I started with it but need some more time. Thought it was easier, but there are some redirects that make it harder. There is still a problem with it, I just need to find a good implementation or a fix in cloudproxy itself. |
Ok don't worry i'll just use it once it works 😃 I would help you but i don't have enough experience with this kind of stuff so I'll let you figure it out. If i can help with anything let me know |
Any update? |
Yeah, i got it working! Started on the workaround a week ago, but haven't pushed it yet, because there were some things missing. After it gets merged, I will update my library to work with it. |
Nice! Thank you very much for your effort. |
I published a pre-release so you can test it out (if you want): You have to use it with the following docker container: Example: Hope the Pull request gets merged soon so it will be officially supported by CloudProxy and usable for end users. |
Thank you very much for your effort! |
Just published the new version of the library to nuget: https://www.nuget.org/packages/CloudProxySharp/1.0.1 Should be working now, you have to use Could you test it out and reply so we can close the issue if it's working? |
Ok i just tried it and it still does not work, but maybe I'm doing something wrong. Here is a patebin of the console: https://pastebin.com/12LB6WEY |
Hmm will have a look tonight. I added a test for spigot wich worked fine, it's even the same url: CloudProxySharp/test/CloudProxySharp.Tests/ClearanceHandlerTests.cs Lines 64 to 75 in a112345
One thing that could make a difference is using another userAgent... Try the one i am using in the test... When I first worked on this issue I was struggling for 3 days to find out that the useragent I have used wasn't working correctly, it never returned valid cookies. |
Yes that was it. Ok i think this issue can be closed, as my initial problem was solved. |
One more thing: you should change the User Agent in the readme.md |
Thanks for the information, just fixed it 👍 |
I try to access: https://www.spigotmc.org/resources/hubkick.2/download?version=203285
Console output of CloudProxy:
The code i use:
The only thing i noticed is that the url i pass to the function "
https://www.spigotmc.org/resources/hubkick.2/download?version=203285
" is not the one that is shown in the logs of CloudProxy.Can you tell me if this is an error with your c# lib or with CloudProxy?
The text was updated successfully, but these errors were encountered: