mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2026-10-10 19:36:32 +00:00
.. and for Edge 101 as well. The TLS fingerprint is identical to previous versions. The HTTP headers have the usual differences in the user agents. One important change though is in the way the HTTP2 SETTINGS frame is formed. Up until Chrome 98, there was an additional randomly-generated setting in the frame. This seems to have been removed since. Therefore it was removed from curl-impersonate as well, and support for Chrome/Edge 98 was deprecated, since supporting both signatures requires a lot of work.
The tests verify that curl-impersonate has the same network signature as that of the supported browsers. They do not test curl's functionality itself.
Running the tests
The tests assume that you've built both curl-impersonate-chrome and curl-impersonate-ff docker images before (see Building from source).
To run the tests, build with:
docker build -t curl-impersonate-tests tests/
then run with:
docker run --rm curl-impersonate-tests
This simply runs pytest in the container. You can pass additional flags to pytest such as --log-cli-level DEBUG.
How the tests work
For each supported browser, the following tests are performed:
- A packet capture is started while
curl-impersonateis run with the relevant wrapper script. The Client Hello message is extracted from the capture and compared against the known signature of the browser. curl-impersonateis run, connecting to a localnghttpdserver (a simple HTTP/2 server). The HTTP/2 pseudo-headers and headers are extracted from the output log ofnghttpdand compared to the known headers of the browser.
What's missing
The following tests are still missing:
- Test that
curl-impersonatesends the same HTTP/2 SETTINGS as the browser.