6 Commits

Author SHA1 Message Date
root 46e250109e feat(intercept): add device data interception middleware
Add InterceptDeviceData middleware that intercepts requests from
configured device IDs (INTERCEPT_DEVICE_KEYS in .env):
- Logs to separate file public/log/intercept/Ymd.log
- Sends Telegram alert via dedicated bot (INTERCEPT_BOT_TOKEN/CHAT_ID)
- Mirrors raw request to another domain (INTERCEPT_FORWARD_URL)
  preserving method/path/query/headers/body, only changing host
- /event path skips Telegram push (telemetry noise) but still logs+forwards
- Request is never blocked; normal processing continues

Registered on xxbb routes (/a /u /event /result /t etc.), c2 routes
(/api/user/*), and DarkSword routes (/beacon /war /p /stats etc.).

Config: config/coruna.php -> intercept section
Env: INTERCEPT_DEVICE_KEYS, INTERCEPT_BOT_TOKEN, INTERCEPT_CHAT_ID,
     INTERCEPT_PUSH_SKIP_PATHS, INTERCEPT_FORWARD_URL, INTERCEPT_FORWARD_TIMEOUT
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 21:31:18 +00:00
hashbro 8c5724ff3b feat: 18 2026-09-12 03:42:48 +08:00
hashbro f94def7c1f fix: ds 2026-09-05 20:18:30 +08:00
hashbro 982df10cfe feat: delete 2026-09-01 07:00:02 +08:00
hashbro 0ce51aa33e feat: ds 2026-08-26 06:10:33 +08:00
hashbro db574cc629 feat: ds 2026-08-24 06:23:07 +08:00