@webdecoy/fcaptcha 1.43.0 → 1.45.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/engine.js +1 -1
- package/package.json +1 -1
- package/server.js +7 -2
package/engine.js
CHANGED
|
@@ -266,7 +266,7 @@ function detectVisionAI(signals) {
|
|
|
266
266
|
category: 'vision_ai', score: 0.8, confidence: 0.7,
|
|
267
267
|
reason: 'PoW completed impossibly fast'
|
|
268
268
|
});
|
|
269
|
-
} else if (pow.duration > expectedMax *
|
|
269
|
+
} else if (pow.duration > expectedMax * 10) {
|
|
270
270
|
detections.push({
|
|
271
271
|
category: 'vision_ai', score: 0.6, confidence: 0.5,
|
|
272
272
|
reason: 'PoW timing suggests external processing'
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -165,7 +165,10 @@ const CLIENT_PATH = process.env.FCAPTCHA_CLIENT_PATH
|
|
|
165
165
|
|| path.join(__dirname, '..', 'client', 'fcaptcha.js');
|
|
166
166
|
|
|
167
167
|
if (process.env.FCAPTCHA_SERVE_CLIENT !== 'false') {
|
|
168
|
-
|
|
168
|
+
// The same file on each provider's script path, where it answers to that
|
|
169
|
+
// provider's global, so apps that let an admin change a Turnstile, hCaptcha
|
|
170
|
+
// or reCAPTCHA URL can point it here (see installCompat in the client).
|
|
171
|
+
app.get(['/fcaptcha.js', '/turnstile/v0/api.js', '/1/api.js', '/recaptcha/api.js'], (req, res) => {
|
|
169
172
|
res.sendFile(CLIENT_PATH);
|
|
170
173
|
});
|
|
171
174
|
}
|
|
@@ -1041,7 +1044,9 @@ async function start() {
|
|
|
1041
1044
|
if (SHARED_STATE) await SHARED_STATE.connect();
|
|
1042
1045
|
const host = SECRET_KEY === require('./config').INSECURE_DEFAULT_SECRET ? '127.0.0.1' : '0.0.0.0';
|
|
1043
1046
|
const server = app.listen(PORT, host, () => {
|
|
1044
|
-
|
|
1047
|
+
const addr = server.address();
|
|
1048
|
+
const port = addr ? addr.port : PORT;
|
|
1049
|
+
console.log(`FCaptcha server running on port ${port}`);
|
|
1045
1050
|
console.log(`Trusted proxies: ${PROXY_TRUST.describe()}`);
|
|
1046
1051
|
console.log(`Site keys: ${SITE_KEYS.describe()}`);
|
|
1047
1052
|
console.log(`Shared state: ${SHARED_STATE ? 'Redis (PoW)' : 'in-memory'}`);
|