bededec29c
服务页(/services): - lg+ 双栏:左列服务菜单(NO.01-07,点击选中)、右列表单 (sticky 跟随);移动端保持上下堆叠 滑块验证码 v2(防机械脚本): - 答案坐标不再下发:缺口位置由服务端烘进 PNG(lib/captchaImage 自绘点阵底图 + 拼块裁片,lib/pngEncoder 纯 TS PNG 编码器, node:zlib 零依赖),脚本必须做图像识别才能定位 - 行为轨迹校验:拖动采样提交服务端,样本数 ≥6、总时长 ≥1.2s、 单调时间戳、峰值速度 > 平均×1.8(匀速直线 = 拒)、末点 ≈ 答案 - 位置容差 ±10px;失败 5 次作废;挑战 10 分钟过期 - IP 指纹(哈希)限流:challenge 15/10min、verify 30/10min、 咨询提交 3/小时;蜜罐字段(website)命中静默丢弃 端到端:无轨迹/匀速直线/超短时长均拒;真人节奏通过;重放拦截; 蜜罐丢弃;第 14 次刷 challenge 起 429;SMTP 真发正常。
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect, useSyncExternalStore } from "react";
|
|
import { loadingBus } from "@/lib/loadingBus";
|
|
|
|
/**
|
|
* Heavy-load hooks (formerly the entry LoadingOverlay). The entry/route
|
|
* curtain orchestration now lives in RouteTransitionOverlay (the original
|
|
* module 34841 drives BOTH flows from one pinhole curtain); this file keeps
|
|
* only the readiness plumbing other components consume.
|
|
*/
|
|
|
|
/** Stable server snapshot (must be cached — a fresh object would loop). */
|
|
const SERVER_SNAPSHOT = { progress: 0, ready: false };
|
|
|
|
export function useHeavyLoad() {
|
|
return useSyncExternalStore(
|
|
loadingBusSubscribe,
|
|
loadingBusGetSnapshot,
|
|
() => SERVER_SNAPSHOT
|
|
);
|
|
}
|
|
|
|
const loadingBusSubscribe = loadingBus.subscribe;
|
|
const loadingBusGetSnapshot = loadingBus.getSnapshot;
|
|
|
|
/**
|
|
* Heavy-asset readiness for the camera intro dolly (original cV's `p`:
|
|
* models + image layers ready — fonts are NOT part of this gate).
|
|
*/
|
|
export function useAppReady(): boolean {
|
|
const heavy = useHeavyLoad();
|
|
|
|
// Safety valve: a stalled asset must never soft-lock the page.
|
|
useEffect(() => {
|
|
const safety = window.setTimeout(() => loadingBus.forceReady(), 6000);
|
|
return () => window.clearTimeout(safety);
|
|
}, []);
|
|
|
|
return heavy.ready;
|
|
}
|