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

Pass through Cloudflare challenges #1165

Open
nolanw opened this issue Jun 22, 2023 · 4 comments
Open

Pass through Cloudflare challenges #1165

nolanw opened this issue Jun 22, 2023 · 4 comments
Labels
Bug Something that doesn't work the way it should Website does it Something that works on the Forums website (which Awful strives to match in functionality)

Comments

@nolanw
Copy link
Member

nolanw commented Jun 22, 2023

Cross-post from Awful.apk thread:

I opened an issue a while back about using Awful from countries where Cloudflare always forces captchas (about once every 1-2 hours), specifically these ones:

Did a little more digging and it seems that they set a cookied called "cf_clearance" with some opaque value. That needs to then be passed back on every request, and the user-agent + IP must not change in between, to gain access to the forums for an hour or so.

I think a way to make this work in Awful would be to detect these captcha pages, then show a web view using the same user-agent as awful that lets the user pass it, and then persist and serve the resulting cookies. Never touched Android code before, but might try to give it a shot.
tazjin

@nolanw nolanw added Bug Something that doesn't work the way it should Website does it Something that works on the Forums website (which Awful strives to match in functionality) labels Jun 22, 2023
@tazjin
Copy link

tazjin commented Jun 22, 2023

Note that on iOS this might not be a problem, there's a magic Cloudflare feature for Apple devices only that can skip captchas. I don't have one around to test it though.

@dfsm
Copy link
Contributor

dfsm commented Jun 22, 2023

I recently resubbed to a vpn after not having one for a while, so I can test this out this weekend

I did see the iOS magic regarding cloudflare challenges a while back but couldn't test it

https://forums.somethingawful.com/showthread.php?threadid=4012198&perpage=40&pagenumber=1&noseen=1

@nolanw
Copy link
Member Author

nolanw commented Jun 23, 2023

Ah good to know. I remembered you posting about Cloudflare awhile back, tazjin, and despite wanting to fix it I didn't see an issue on it. Figured I should make a note of what you'd found.

I appreciate any test results anyone comes up with :)

@tazjin
Copy link

tazjin commented Jun 23, 2023

I've sort of fixed this in Awful.apk like this: Awful/Awful.apk#777

You might be able to use a similar workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something that doesn't work the way it should Website does it Something that works on the Forums website (which Awful strives to match in functionality)
Projects
None yet
Development

No branches or pull requests

3 participants