gx
chenyc
2026-05-24 a43f8991d3f5fa2ef4e0f3eeeca00fb4afc263c0
lib/logger.js
@@ -2,6 +2,7 @@
const fs = require("fs");
const path = require("path");
const { obfuscate } = require("./obfuscate");
const C = { reset: "\x1b[0m", dim: "\x1b[2m", green: "\x1b[32m", yellow: "\x1b[33m", red: "\x1b[31m", cyan: "\x1b[36m", white: "\x1b[37m" };
@@ -79,10 +80,10 @@
    // ── 数据收发 ──
    sendK(ip) {
      log(ip, C.yellow, "→", `发送 K 请求`);
      log(ip, C.yellow, "→", `发送轮询请求`);
    },
    recvK(ip, rawFrame, fieldCount, statusCode) {
      log(ip, C.green, "←", `${rawFrame}`);
      log(ip, C.green, "←", `${obfuscate(rawFrame)}`);
    },
    // ── 异常 ──