feat: 添加注入前探测 QQ 登录状态功能 (#56)

通过扫描 QQ 进程开放的 9210-9219 端口,在注入 DLL 前即可获取登录状态和账号信息。

- 新增端口探测模块 (qq-port-probe.ts)
- 前端添加"探测登录"按钮和状态显示对话框
- 兼容 Windows 和 Linux 平台
- 修复端口查询逻辑,正确识别每个 PID 开放的端口

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
H3CoF6andClaude Sonnet 4.6 authored and GitHub committed 2026-05-20 10:29:41 +08:00
1 parent 1db287d8cc
commit 312df29b5f
8 files changed
+353

No files matched your search

+7
View File
@@ -12,9 +12,11 @@ import { HookSession, type HookSessionDeps } from './hook-session';
import { PipeWatcher } from './pipe-watcher';
import { QqHookClient } from './qq-hook-client';
import type { HookProcessInfo } from './types';
import { probeQqLoginInfo, type QqPortLoginInfo } from './qq-port-probe';
export type { HookProcessInfo, HookProcessStatus } from './types';
export type { HookProcessBaseInfo } from './injector';
export type { QqPortLoginInfo } from './qq-port-probe';
export type HookManagerDeps = {
bridgeManager: BridgeManager;
@@ -147,6 +149,11 @@ export class HookManager {
return session.refresh();
}
async probeProcessLoginInfo(pid: number): Promise<QqPortLoginInfo | null> {
this.assertValidPid(pid);
return probeQqLoginInfo(pid);
}
dispose(): void {
if (this.disposed) return;
this.disposed = true;