@anonympins/fingerprint 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -1
- package/README.md +29 -1063
- package/package.json +1 -1
- package/src/js/build-client.js +4 -5
- package/src/js/fingerprint.client.js +2 -2
- package/src/js/fingerprint.js +452 -143
- package/src/js/library.js +1 -1
- package/src/js/mongodb-store.js +79 -52
- package/src/js/optimization.worker.js +2 -2
- package/src/js/problem-manager.js +2 -2
- package/src/php/Challenge/ChallengeUtils.php +64 -8
- package/src/php/DirectFingerprint.php +145 -80
- package/src/php/FingerprintEngine.php +19 -3
- package/src/php/ProblemManager.php +1 -1
- package/src/php/RequestContext.php +90 -90
- package/src/php/Store/MongoDbStore.php +105 -0
- package/src/php/Store/RedisStore.php +54 -0
- package/src/php/Tests/ChallengeUtilsTest.php +1 -1
- package/src/php/Tests/FingerprintBuilderTest.php +1 -1
- package/src/php/Tests/FingerprintEngineTest.php +4 -4
- package/src/php/Tests/IpReputationTest.php +4 -4
- package/src/php/Tests/Ja3AnomalyDetectorTest.php +1 -1
- package/src/php/Tests/MetricsTest.php +46 -0
- package/src/php/Tests/PowTest.php +2 -2
- package/src/php/Tests/ProblemManagerTest.php +5 -3
- package/src/php/Tests/RequestUtilsTest.php +1 -1
- package/src/php/Utils/MetricsManager.php +167 -0
- package/src/php/Utils/RequestUtils.php +32 -5
- package/src/php/bin/auto-tune.php +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
## Version 0.3.8
|
|
2
|
+
|
|
3
|
+
### 🎫 Opaque Tickets Implementation (JS/PHP)
|
|
4
|
+
- **Opaque Clearance Tickets**: Upgraded clearance tickets to use cryptographically secure, random, and opaque token identifiers. This completely mitigates client-side prediction, token tampering, and replay/unauthorized reuse.
|
|
5
|
+
- **PHP Parity**: Implemented secure opaque ticket handling and validation inside the PHP engine to match the Node.js architecture.
|
|
6
|
+
|
|
7
|
+
### 🌐 Independent Subnet Score (JS/PHP)
|
|
8
|
+
- **Independent Subnet Scoring**: Decoupled and isolated the subnet activity and reputation calculation from individual host/device threat vectors. This ensures distributed crawler attacks on specific IP ranges are mitigated at the subnet level without cascading penalties to unaffected neighboring residential IPs.
|
|
9
|
+
|
|
10
|
+
### 🛡️ Reverse Proxy Header Spoofing Protection (JS)
|
|
11
|
+
- **Trusted Proxies verification**: Added `trustedProxies` configuration to restrict proxy-injected headers (`X-JA3-Hash`, `X-JA4-Hash`, `X-HTTP2-Fingerprint`, `X-TCP-Fingerprint`, `X-JA3-Raw`) only to requests originating from configured trusted proxy IPs/networks. Unauthenticated clients attempting to send these headers will have them automatically stripped.
|
|
12
|
+
|
|
13
|
+
## Version 0.3.7
|
|
14
|
+
|
|
15
|
+
### 📊 Prometheus Metrics & Monitoring (JS/PHP)
|
|
16
|
+
- **Prometheus metrics export support**:
|
|
17
|
+
- Implemented a metrics generator using the standard Prometheus format (`text/plain`).
|
|
18
|
+
- Exported active configuration indicators: weight (`fingerprint_security_weight`) and thresholds (`fingerprint_security_threshold`).
|
|
19
|
+
- Real-time export of Auto-Tuner performance metrics: false positive rate (`fingerprint_autotuning_false_positive_rate`) and false negative rate (`fingerprint_autotuning_false_negative_rate`).
|
|
20
|
+
- Secured access via a customizable authorization callback (`metricsAuthorizationCallback`) supporting blocking and secure redirects.
|
|
21
|
+
|
|
22
|
+
### ⚙️ Background Pareto-Optimal TTL Tuning (JS)
|
|
23
|
+
- **Non-blocking asynchronous optimization**:
|
|
24
|
+
- Added `runBackgroundTtlOptimization`, which runs periodically in the background without blocking the event loop.
|
|
25
|
+
- Utilized a multi-objective genetic algorithm to dynamically calculate a Pareto front of optimal TTLs based on suspicion scores.
|
|
26
|
+
- Implemented instant linear interpolation from the optimization cache for efficient ticket TTL assignment (`determineOptimalTicketTtl`).
|
|
27
|
+
|
|
28
|
+
### 🚀 Maintenance
|
|
29
|
+
- **Repository cleanup**:
|
|
30
|
+
- Removed obsolete temporary specification files (`enhancements.md`).
|
|
31
|
+
|
|
1
32
|
## Version 0.3.6
|
|
2
33
|
|
|
3
34
|
### 🛡️ Sybil Protection & Auto-Tuner Hardening (JS/PHP)
|
|
@@ -114,7 +145,7 @@ This release marks a major expansion of the library, introducing a full-featured
|
|
|
114
145
|
|
|
115
146
|
### ✨ New Features
|
|
116
147
|
|
|
117
|
-
* **Full PHP Support**: The library is now available for PHP
|
|
148
|
+
* **Full PHP Support**: The library is now available for PHP 8.0+ with a feature set equivalent to the Node.js version.
|
|
118
149
|
* **Direct Integration**: A `DirectFingerprint` class allows for easy integration into any PHP application, including legacy codebases, by interacting directly with PHP's superglobals.
|
|
119
150
|
* **PSR-15 Middleware**: A `FingerprintMiddleware` is provided for modern, framework-agnostic integration with applications that follow PSR-7, PSR-15, and PSR-17 standards (e.g., Slim, Laminas).
|
|
120
151
|
* **Pluggable Datastores**: The PHP version supports the same pluggable store architecture, allowing state to be persisted in Redis, databases, or other external systems.
|