feat: anti-bot inspekce a vězení + přepínač hraní/objednávání
CI / Generate TypeScript types (push) Successful in 15s
CI / Server unit tests (push) Successful in 24s
CI / Build server (push) Successful in 31s
CI / Build client (push) Successful in 1m0s
CI / Playwright E2E tests (push) Successful in 1m30s
CI / Build and push Docker image (push) Successful in 1m6s
CI / Notify (push) Successful in 5s
CI / Generate TypeScript types (push) Successful in 15s
CI / Server unit tests (push) Successful in 24s
CI / Build server (push) Successful in 31s
CI / Build client (push) Successful in 1m0s
CI / Playwright E2E tests (push) Successful in 1m30s
CI / Build and push Docker image (push) Successful in 1m6s
CI / Notify (push) Successful in 5s
- přepínač Hraní/Objednávání; v objednávání hra nic neruší, v hraní herní vrstva odstíní kliknutí - scéna žije trvale (přepnutí režimu neobejde pavučinu, omráčení, zabavenou síťku ani ban) - anti-bot: ovládání jen reálnou myší (isTrusted/webdriver), občasná motýlí inspekce (chyť korunovaného) - neúspěch inspekce = zabavená síťka 45 s (opticky skrytá); opakovaně = serverový ban s mříží a odpočtem - během banu server nekredituje úlovky (F5/přepnutí-proof) - větší síťka se teď viditelně zvětší hned po koupi - changelog route přeskočí vadný JSON (nespadne celý endpoint) + oprava changelogu Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
252d105408
commit
377a350211
@@ -13,6 +13,7 @@ import {
|
||||
caterpillarAte,
|
||||
defeatCaterpillar,
|
||||
mothHit,
|
||||
reportInspectionFail,
|
||||
buyPremium,
|
||||
waspSpray,
|
||||
buyInsurance,
|
||||
@@ -128,6 +129,14 @@ router.post("/moth", async (req: Request, res, next) => {
|
||||
} catch (e: any) { next(e) }
|
||||
});
|
||||
|
||||
router.post("/inspectionFailed", async (req: Request, res, next) => {
|
||||
try {
|
||||
const login = getLogin(parseToken(req));
|
||||
const data = await reportInspectionFail(login);
|
||||
res.status(200).json(data);
|
||||
} catch (e: any) { next(e) }
|
||||
});
|
||||
|
||||
router.post("/buyPremium", async (req: Request, res, next) => {
|
||||
try {
|
||||
const login = getLogin(parseToken(req));
|
||||
|
||||
@@ -20,8 +20,19 @@ function loadAllChangelogs(): Record<string, string[]> {
|
||||
for (const file of files) {
|
||||
const date = file.replace(".json", "");
|
||||
if (!cache[date]) {
|
||||
const content = fs.readFileSync(path.join(CHANGELOGS_DIR, file), "utf-8");
|
||||
cache[date] = JSON.parse(content);
|
||||
try {
|
||||
const content = fs.readFileSync(path.join(CHANGELOGS_DIR, file), "utf-8");
|
||||
const parsed = JSON.parse(content);
|
||||
// Očekáváme pole řetězců; jiný obsah přeskočíme
|
||||
if (Array.isArray(parsed)) {
|
||||
cache[date] = parsed;
|
||||
} else {
|
||||
console.warn(`Changelog ${file} není pole – přeskočeno.`);
|
||||
}
|
||||
} catch (e) {
|
||||
// Vadný JSON nesmí shodit celý changelog endpoint – přeskočíme ho
|
||||
console.warn(`Changelog ${file} má neplatný JSON – přeskočeno:`, (e as Error).message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user