@anonympins/fingerprint 0.5.4 → 0.6.0
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 +16 -0
- package/README.md +7 -6
- package/package.json +1 -1
- package/src/js/build-client.js +67 -67
- package/src/js/fingerprint.client.js +1445 -1271
- package/src/js/fingerprint.client.obfuscated.js +1 -1
- package/src/js/fingerprint.js +499 -116
- package/src/js/obfuscation.worker.js +23 -0
- package/src/js/pow.solver.inline.js +37 -28
- package/src/js/pow.solver.js +37 -28
- package/src/js/problem-manager.js +22 -0
- package/src/js/tests/cross_parity.test.js +175 -0
- package/src/js/tests/fingerprint.client.test.js +130 -128
- package/src/js/tests/fingerprint.test.js +42 -2
- package/src/js/tests/obfuscation.test.js +48 -0
- package/src/js/ttl-optimization.worker.js +51 -0
- package/src/php/AutoTuner.php +42 -0
- package/src/php/Challenge/ChallengeUtils.php +57 -6
- package/src/php/FingerprintBuilder.php +193 -185
- package/src/php/FingerprintEngine.php +147 -1
- package/src/php/ProblemManager.php +20 -0
- package/src/php/Tests/ChallengeUtilsTest.php +446 -285
- package/src/php/Utils/RequestUtils.php +19 -0
|
@@ -827,6 +827,25 @@ class RequestUtils
|
|
|
827
827
|
$deviceData['ips'][] = $clientIp;
|
|
828
828
|
}
|
|
829
829
|
|
|
830
|
+
// Pruning par fenêtre glissante temporelle
|
|
831
|
+
if (!isset($deviceData['ipTimes'])) {
|
|
832
|
+
$deviceData['ipTimes'] = [];
|
|
833
|
+
}
|
|
834
|
+
$deviceData['ipTimes'][$clientIp] = $now;
|
|
835
|
+
|
|
836
|
+
$slidingWindow = 2 * 3600 * 1000; // 2 heures
|
|
837
|
+
$cutOff = $now - $slidingWindow;
|
|
838
|
+
foreach ($deviceData['ipTimes'] as $ip => $lastSeen) {
|
|
839
|
+
if ($lastSeen < $cutOff) {
|
|
840
|
+
$ipKey = array_search($ip, $deviceData['ips'], true);
|
|
841
|
+
if ($ipKey !== false) {
|
|
842
|
+
unset($deviceData['ips'][$ipKey]);
|
|
843
|
+
}
|
|
844
|
+
unset($deviceData['ipTimes'][$ip]);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
$deviceData['ips'] = array_values($deviceData['ips']);
|
|
848
|
+
|
|
830
849
|
// Score d'historique basé sur le nombre d'IPs utilisées (rotation de proxy)
|
|
831
850
|
$maxIpsPerDevice = 15;
|
|
832
851
|
$freeIpChanges = 3;
|