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

add impersonate-browser extra: uses curl_cffi for browser impersonation #105

Merged
merged 2 commits into from
Nov 11, 2023

Conversation

petergardfjall
Copy link
Owner

This commit tries to more closely mimic web browser behavior in an attempt to circumvent Cloudflare's bot protection.

If built with the 'impersonate-browser' extra, garminexport will use curl_cffi and a patched libcurl to produce TLS fingerprints that are identical to those of a real web browsers.

The prior 'cloudflare' extra is dropped in favor of the new 'impersonate-browser' extra.

@drewbrew
Copy link

drewbrew commented Oct 5, 2023

Confirmed this worked for me locally

Copy link

@app4g app4g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

impersonate is working for login successfully.

@app4g
Copy link

app4g commented Oct 21, 2023

@drewbrew can you confirm if it is still working for you? Login seems to be successful, but can't do anything else.

ref: #106

@drewbrew
Copy link

Login seems to be successful, but can't do anything else.

@app4g confirmed, I now see exactly the same

@drewbrew
Copy link

drewbrew commented Nov 6, 2023

The latest change worked great for me this morning.

@petergardfjall petergardfjall force-pushed the browser-tls-fingerprint-bypass branch 4 times, most recently from 01e0d26 to c1a0bc6 Compare November 11, 2023 13:08
This commit tries to more closely mimic web browser behavior in an attempt to
circumvent Cloudflare's bot protection.

If built with the 'impersonate-browser' extra, garminexport will use curl_cffi
and a patched libcurl to produce TLS fingerprints that are identical to those of
a real web browsers.

The prior 'cloudflare' extra is dropped in favor of the new
'impersonate-browser' extra.
The authentication procedure now requires the presence of an oauth token in the
Authorization header.

Service URLs are also no longer proxied.
@petergardfjall petergardfjall merged commit d445a4d into master Nov 11, 2023
10 checks passed
@petergardfjall petergardfjall deleted the browser-tls-fingerprint-bypass branch November 11, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants