What is TLS Fingerprinting?
TLS fingerprinting analyzes the characteristics of a TLS handshake to identify the client making the request. Modern anti-bot systems use this technique to distinguish between:- Legitimate browsers and apps: Chrome, Firefox, mobile apps
- Automated tools: cURL, Python requests, Selenium
- Bot frameworks: Scrapy, Puppeteer with default settings
TLS Fingerprint Configuration
The SDK uses a precisely configured TLS fingerprint that matches the Bet365 Android app:JA3 Fingerprint
JA3 String:771,4865-4866-4867-49195-49196-52393-49199-49200-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-51-45-43-21,29-23-24,0
The JA3 fingerprint is composed of five components:
- TLS Version (771): TLS 1.2 (0x0303)
- Cipher Suites: Ordered list of supported encryption algorithms
4865: TLS_AES_128_GCM_SHA2564866: TLS_AES_256_GCM_SHA3844867: TLS_CHACHA20_POLY1305_SHA25649195-49196: ECDHE-ECDSA ciphers52393: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- Extensions: TLS extensions in order (0-23-65281-10-11-35-16-5-13-51-45-43-21)
- Elliptic Curves: Supported curves (29-23-24)
- Elliptic Curve Point Formats: (0)
The JA3 fingerprint precisely matches the Android WebView used by the Bet365 app. Any deviation will be detected.
Akamai Fingerprint
Akamai String:4:16777216|16711681|0|m,p,a,s
Akamai fingerprinting extends JA3 with additional HTTP/2 characteristics:
- 4: HTTP/2 settings count
- 16777216: SETTINGS_HEADER_TABLE_SIZE (65536)
- 16711681: SETTINGS_MAX_CONCURRENT_STREAMS (1000)
- 0: SETTINGS_INITIAL_WINDOW_SIZE
- m,p,a,s: Priority and stream information
TLS Signature Algorithms
Theextra_fp configuration specifies the exact order of signature algorithms:
The signature algorithm order reflects security preferences and implementation details of the Android platform.
Implementation with curl_cffi
The SDK usescurl_cffi for making HTTP requests with custom TLS fingerprints:
- Native cURL binding: Uses libcurl with full control over TLS
- Custom fingerprints: Supports JA3, Akamai, and signature algorithm configuration
- HTTP/2 support: Matches modern app behavior
- Performance: Faster than browser automation
Request Execution
kwargs.update(TLS_FINGERPRINT).
Alternative: tls_client Library
For generating the X-Net-Sync-Term-Android header, the SDK usestls_client:
| Feature | curl_cffi | tls_client |
|---|---|---|
| TLS Fingerprinting | ✅ Full control | ✅ Full control |
| HTTP/2 Support | ✅ Native | ✅ Native |
| Performance | ⚡ Very fast | ⚡ Fast |
| Ease of use | 📝 Simple API | 📝 Simple API |
| Use case | Main scraping | API token generation |
How It Mimics Android App Behavior
The SDK replicates multiple layers of the Android app’s network behavior:1. TLS Layer
2. HTTP/2 Layer
3. Application Layer
4. WebView Headers
Session Configuration
The session is configured with TLS fingerprinting and proxy support:Verification and Testing
You can verify your TLS fingerprint using online tools:-
JA3 Fingerprint Testing:
- Visit:
https://ja3er.com/json - Compare the JA3 hash with the Android app
- Visit:
-
TLS Version Checking:
- Visit:
https://www.howsmyssl.com/a/check - Verify TLS version and cipher suites
- Visit:
-
HTTP/2 Verification:
- Check HTTP/2 settings and priorities
- Ensure ALPN negotiation succeeds
Technical Details
Cipher Suite Priority
The cipher suite ordering matters:- Preference for TLS 1.3 AEAD ciphers
- Support for ChaCha20-Poly1305 (mobile-optimized)
- Fallback to TLS 1.2 ECDHE ciphers
Extension Ordering
TLS extensions must appear in the exact order:Elliptic Curve Configuration
Supported curves in order of preference:x25519 is preferred for its performance on mobile devices, matching the Android app’s optimization.
Troubleshooting
TLS Handshake Failures
Symptom: Connection errors or SSL handshake failures Solutions:- Verify proxy supports TLS 1.2/1.3
- Check cipher suite compatibility
- Ensure libcurl version is up to date
Fingerprint Mismatch Detection
Symptom: 403 Forbidden despite correct headers Solutions:- Verify JA3 fingerprint matches exactly
- Check Akamai string is correct
- Ensure signature algorithms are in the right order
- Update the SDK if the app version changed
Performance Issues
Symptom: Slow TLS handshakes Solutions:- Reuse session objects (connection pooling)
- Enable HTTP/2 multiplexing
- Use faster proxy servers
Best Practices
1. Never Modify the Fingerprint
2. Keep SDK Updated
Bet365 updates their app regularly. Monitor for:- New app versions
- Updated cipher suites
- Changed TLS extensions
3. Test Fingerprint Regularly
4. Monitor for Detection
Log and analyze response patterns:Advanced Configuration
For advanced users, you can inspect the active TLS configuration:The SDK abstracts these details, but understanding them helps troubleshoot issues and optimize for specific scenarios.
Conclusion
TLS fingerprinting is a critical component of the Bet365 Scraper SDK’s anti-bot protection strategy. By precisely mimicking the Android app’s TLS characteristics, the SDK bypasses sophisticated detection systems. Key takeaways:- JA3 fingerprinting identifies clients by TLS handshake
- Akamai fingerprinting extends JA3 with HTTP/2 characteristics
- curl_cffi provides the low-level control needed for custom fingerprints
- Never modify the TLS_FINGERPRINT configuration
- Stay updated with the latest app versions