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:
1 parent
1db287d8cc
commit
312df29b5f
8 files changed
+353
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
AlertCircle,
|
||||
CheckCircle2,
|
||||
Cpu,
|
||||
Eye,
|
||||
Loader2,
|
||||
MemoryStick,
|
||||
MonitorCog,
|
||||
@@ -21,6 +22,7 @@ import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
import { ConfirmDialog } from '@/components/confirm-dialog';
|
||||
import { ProcessProbeDialog } from '@/components/process-probe-dialog';
|
||||
import { cn, formatBytes, formatUptime } from '@/lib/utils';
|
||||
import type { HookProcessInfo } from '@/types';
|
||||
import { useAppState } from '@/contexts/AppStateContext';
|
||||
@@ -91,6 +93,7 @@ export function OverviewPage() {
|
||||
| { kind: 'load' | 'unload'; pid: number; name: string }
|
||||
| null
|
||||
>(null);
|
||||
const [probeDialog, setProbeDialog] = useState<{ pid: number; name: string } | null>(null);
|
||||
|
||||
// Lightweight tick to refresh "uptime" pretty-print every 30s
|
||||
const [, force] = useState(0);
|
||||
@@ -325,6 +328,14 @@ export function OverviewPage() {
|
||||
)}
|
||||
</div>
|
||||
<div className="flex shrink-0 items-center gap-1.5">
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
disabled={busy}
|
||||
onClick={() => setProbeDialog({ pid: proc.pid, name: proc.name || `PID ${proc.pid}` })}
|
||||
>
|
||||
<Eye className="size-3.5" /> 探测登录
|
||||
</Button>
|
||||
{showRefresh && (
|
||||
<Button
|
||||
size="icon"
|
||||
@@ -430,6 +441,15 @@ export function OverviewPage() {
|
||||
else await load(confirm.pid);
|
||||
}}
|
||||
/>
|
||||
|
||||
{probeDialog && (
|
||||
<ProcessProbeDialog
|
||||
pid={probeDialog.pid}
|
||||
processName={probeDialog.name}
|
||||
open={!!probeDialog}
|
||||
onOpenChange={(open) => !open && setProbeDialog(null)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user