tachiyomiorg / website

Official website for the Tachiyomi app.
https://tachiyomi.org
Mozilla Public License 2.0
750 stars 1.53k forks source link

Cloudfire; Is it worth changing the default User Agent String? #970

Closed DaveYognaught closed 1 year ago

DaveYognaught commented 1 year ago

Hi guys,

It seems you're aware of the issues with Cloudfire and the default user agent. Is it worth considering changing it or is there a particular reason we're using the current one?

It'll always be a thorn in your backside, but it's definitely responsible for some of the reports. Mine included if I hadn't checked discord and saw the recommendation to change the user agent. Obviously it'll vary depending on each site's configuration and level of security so definitely not a be-all end-all solution.

For instance, I tested a set of three users agents that fixed my issues on an Android emulator. Varying degrees of information provided, from basically nothing to the whole shebang and they all performed identical but better than current:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Mozilla/5.0 (compatible; Windows NT 10.0; Win64; x64) Mozilla/5.0 (compatible)

The top one is apparently the most commonly user agent? Saw some stackoverflow recommendations to change APIs and all sorts to this. So may be a good shout? Personally i'm opting for the least amount of information possible, I'm now sucessfully using the bottom one with no issues. As my personal belief is the headers may be at fault, they don't match what would have naturally been generated on the browser. The more details you provide the more Cloudfire can scrutinise your request and verify it's suspicious. Not enough to outright block the traffic which is why I think it's only blocked on elevated security levels. Maybe that's nonsense but what i've picked up from fucking around with Cloudfire request headers a little bit.

On the discord, there's 5 sources named in particular in Status-Updates that mention elevated security levels causing Cloudfire issues. With any of the above User Agents, just 2 of those sources continue to be blocked (KissManga and WebtoonXYZ)

Those 2 may not be to due with the user agent either, probably looking at custom filters.

Thoughts?

arkon commented 1 year ago
  1. Please use the issue templates when possible.
  2. This would belong in https://github.com/tachiyomiorg/tachiyomi
  3. This is already documented in https://tachiyomi.org/help/guides/troubleshooting/#changing-your-user-agent, which is linked via the the various places in the app that show a "Help" button. It's the users' responsibility to troubleshoot and find something that works for them. Networking is complex and there is almost never a one-size-fits-all solution here.
  4. There's over 1000 extensions and using a common value as the default is good enough for most sources.
  5. This will likely change in the future anyway as browsers start reducing user-agent string details (starting in Q2 2023).