random-user-agent icon indicating copy to clipboard operation
random-user-agent copied to clipboard

Cloudflare loop with whitelist mode

Open meichengg opened this issue 2 years ago • 17 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

I'm having infinite loop when accessing webpages using Cloudflare as WAF such as gitlab.com and jetbra.in, it keeps reloading after 5 seconds, the only way to fix this problem is to turn off whitelist mode in the settings (it also disables the extension itself 🤦🏻 ).

Steps to reproduce

  1. Go to https://gitlab.com/users/sign_in or https://jetbra.in/.
  2. The loop starts.
  3. Turn off whitelist mode in the extension settings.
  4. Reload those webpages, it will pass.

Browser

Chrome

Extension version

No response

Anything else?

No response

meichengg avatar May 19 '22 07:05 meichengg

Hi @meichengg! I can't reproduce described behavior... For example, https://jetbra.in/ opens without the loop (chrome 101, linux):

image

tarampampam avatar May 19 '22 07:05 tarampampam

I'm using Chrome 102.0.5005.61 (macOS Monterey) by the way, sorry for the missing info.

meichengg avatar May 19 '22 07:05 meichengg

Ok, I will check on mac a little bit later, ok?

tarampampam avatar May 19 '22 07:05 tarampampam

I also checked on Windows, i think Cloudflare checks if the user agent is valid, in this case it's kinda wrong so the user gets the loop.

image

meichengg avatar May 20 '22 04:05 meichengg

Are you sure you don't have any other installed extensions that might be interfering with the site's functionality? Could you disable all of them for a test?

tarampampam avatar May 20 '22 07:05 tarampampam

Yes, i turned all the other extensions off, the only left was this extension. I retested with those websites i mentioned above and all give me infinite loop but only one was working.

loop: Mozilla/5.0 (X11; U; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4861.82 Safari/537.36 Mozilla/5.0 (Windows NT 10.0; WOW64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4852.142 Safari/537.36

working: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4859.209 Safari/537.36

meichengg avatar May 20 '22 07:05 meichengg

I have the same problem What do you need me to share?

fakhamatia avatar Sep 10 '22 09:09 fakhamatia

Buddies, I have reproduced described behavior, but haven't any idea (right now) how to fix this issue, except the disabling replacing on the domain while checking is not passed. Sorry for that :(

tarampampam avatar Sep 27 '22 13:09 tarampampam

Buddies, I have reproduced described behavior, but haven't any idea (right now) how to fix this issue, except the disabling replacing on the domain while checking is not passed. Sorry for that :(

its okay, you did great, we will find other workarounds, thanks anyway

meichengg avatar Sep 27 '22 13:09 meichengg

Hello, I just wanted to report that I am facing the same issue even with other user agent spoof extensions. It looks like there is some issue when cloudflare serves the challenge and verifies your agent.

I've also tried to whitelist some domains:

  • cloudflare.com
  • hcaptcha.com
  • challenges.cloudflare.com
  • a.nel.cloudflare.com
  • cf-assets.hcaptcha.com

Unfortunately this does not solve the issue. The challenge will pass only if you get a user agent coherent with your real one, e.g. if you are using Mozilla like me, every Firefox user agent on every platform will work, but if you attempt to set a Chrome one for example, you get the loop.

The only workaround to this, unfortunately, is to blacklist even the target domain you are trying to access behind the challenge. I hope this is achievable in some way and that this is useful info.

TheGITofTeo997 avatar Jan 30 '23 13:01 TheGITofTeo997

I can confirm that i'm using the Chrome on macOS and the only option that i choose is Chrome for macOS which i still get the loop.

image

meichengg avatar Feb 22 '23 03:02 meichengg

@tarampampam , i found the root cause of this problem, check this out.

https://www.zenrows.com/blog/bypass-cloudflare#cloudflare-active-bot-detection-techniques:~:text=In%20the%20context,live%20demo.

meichengg avatar Mar 02 '23 03:03 meichengg

Same problem here.

tx46 avatar Aug 03 '23 05:08 tx46

How to overcome cloudflare verification?? Can not enter

Auzhie14 avatar Aug 23 '23 05:08 Auzhie14

I had to pause the agent temporarily :(

yozachar avatar Apr 28 '24 14:04 yozachar

I'm working on a new major version of the extension. Please, be patient, I'll do everything that I can to resolve this issue in a new version, I promise

tarampampam avatar Apr 28 '24 14:04 tarampampam

I have great news - the Cloudflare infinite loop appears to be fixed in the new version (v4)! More details can be found here: #572

If anyone can help with testing, links to the alpha build can be found using the link above. Your assistance will be greatly appreciated!

tarampampam avatar May 11 '24 22:05 tarampampam

I'm closing this issue because the described problem seems to be fixed in the new version, which was released recently (here is the link). Feel free to reopen it or ping me if it still brings any problems. Thank you for reporting the issue and for your attention to this project! 👍🏿

tarampampam avatar May 13 '24 16:05 tarampampam

i have the chrome extension 4.0.1 version and chatgpt.com has the cloudflare loop again

adriadam10 avatar May 17 '24 10:05 adriadam10

i have the chrome extension 4.0.1 version and chatgpt.com has the cloudflare loop again

Could you record a short video to show how it looks on your side?

tarampampam avatar May 17 '24 12:05 tarampampam

i have the chrome extension 4.0.1 version and chatgpt.com has the cloudflare loop again

Could you record a short video to show how it looks on your side?

https://github.com/tarampampam/random-user-agent/assets/57327458/142779af-7455-4aa8-b942-dec9b828ea01

adriadam10 avatar May 17 '24 12:05 adriadam10

Thank you! Could you also try the latest version (4.0.2) and, if possible, share screenshots of your settings? I'm asking because I just tested it, and the captcha challenge passed successfully without repeating (in other words, I can't reproduce the issue)

tarampampam avatar May 17 '24 12:05 tarampampam

Thank you! Could you also try the latest version (4.0.2) and, if possible, share screenshots of your settings? I'm asking because I just tested it, and the captcha challenge passed successfully without repeating (in other words, I can't reproduce the issue)

same happens with last version and default settings

adriadam10 avatar May 17 '24 12:05 adriadam10

Unfortunately, I'm still not able to reproduce:

https://github.com/tarampampam/random-user-agent/assets/7326800/c485327d-9bd9-480d-be4d-c9fb167d1a16

tarampampam avatar May 17 '24 13:05 tarampampam

Version 4.0.2 cannot pass Cloudflare's CAPTCHA verification.

gnz1123 avatar May 18 '24 10:05 gnz1123