Overhaul the usage of libcurl-impersonate (#4535)

libcurl-impersonate was not being used properly, as the code was
overriding the headers set by it to prevent detection.

- update the libcurl-impersonate to an actively managed lexiforest
  fork
- impersonate Chrome 131
- move the defaultHttpHeaders to http.php, where it belongs
- only set defaultHttpHeaders if curl-impersonate is not detected
- make useragent ini setting optional and disabled by default
- add necessary documentation updates
This commit is contained in:
Dawid Wróbel 2025-05-17 20:18:36 +02:00 committed by GitHub
parent 0f77d3ae0a
commit b7c04f8587
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 45 additions and 30 deletions

View file

@ -119,7 +119,9 @@ Default network timeout.
### useragent
Default user agent.
Overrides the user agent value. Note that the default value, together with a set of other detection-preventing options is set
automatically by the [libcurl-impersonate](https://github.com/lexiforest/curl-impersonate), which is used by the default Docker container distributed together with RSS-Bridge. Use only if you know what you're doing, otherwise you may stop libcurl-impersonate
from doing its job impersonating real browser.
## Authentication

View file

@ -3,7 +3,7 @@
## Test a site before building a bridge
Some sites make use of anti-bot mechanisms (e.g.: by using JavaScript) in which case they work fine in regular browsers,
but not in the PHP environment.
but not in the PHP environment. RSS-Bridge Docker container by default resorts to using libcurl-impersonate, which helps mitigating anti-bot mechanisms.
To check if a site works with RSS-Bridge, create a new bridge using the
[template](../05_Bridge_API/02_BridgeAbstract.md#template)