dp-worker 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/agent.d.ts +6 -13
- package/dist/agent/agent.js +9 -19
- package/dist/agent/agent.js.map +1 -1
- package/dist/browser/chrome-process.d.ts +3 -0
- package/dist/browser/chrome-process.js +101 -13
- package/dist/browser/chrome-process.js.map +1 -1
- package/dist/browser/manager.d.ts +4 -4
- package/dist/browser/manager.js +94 -44
- package/dist/browser/manager.js.map +1 -1
- package/dist/center/session-sync.d.ts +16 -77
- package/dist/center/session-sync.js +58 -303
- package/dist/center/session-sync.js.map +1 -1
- package/dist/chrome-extension/omni-flow/background.js +561 -0
- package/dist/chrome-extension/omni-flow/content.js +29 -0
- package/dist/chrome-extension/omni-flow/icon.png +0 -0
- package/dist/chrome-extension/omni-flow/inject.js +173 -0
- package/dist/chrome-extension/omni-flow/manifest.json +44 -0
- package/dist/chrome-extension/omni-flow/popup.css +819 -0
- package/dist/chrome-extension/omni-flow/popup.html +284 -0
- package/dist/chrome-extension/omni-flow/popup.js +1021 -0
- package/dist/chrome-extension/omni-flow/usage_guide.md +139 -0
- package/dist/index.js +15 -45
- package/dist/index.js.map +1 -1
- package/node_modules/dp-shared/dist/domain.d.ts +4 -4
- package/node_modules/dp-shared/dist/domain.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/domain.js +4 -4
- package/node_modules/dp-shared/dist/domain.js.map +1 -1
- package/node_modules/dp-shared/dist/identities.d.ts +22 -0
- package/node_modules/dp-shared/dist/identities.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/identities.js +3 -0
- package/node_modules/dp-shared/dist/identities.js.map +1 -1
- package/node_modules/dp-shared/dist/index.d.ts +1 -0
- package/node_modules/dp-shared/dist/index.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/index.js +1 -0
- package/node_modules/dp-shared/dist/index.js.map +1 -1
- package/node_modules/dp-shared/dist/omni-flow-session.d.ts +85 -0
- package/node_modules/dp-shared/dist/omni-flow-session.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/omni-flow-session.js +59 -0
- package/node_modules/dp-shared/dist/omni-flow-session.js.map +1 -0
- package/node_modules/dp-shared/dist/rest-contracts.d.ts +12 -1
- package/node_modules/dp-shared/dist/rest-contracts.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/rest-contracts.js +5 -3
- package/node_modules/dp-shared/dist/rest-contracts.js.map +1 -1
- package/node_modules/dp-shared/dist/ws-protocol.d.ts +4 -4
- package/node_modules/dp-shared/src/admin-broadcast.ts +38 -0
- package/node_modules/dp-shared/src/audit-contracts.ts +33 -0
- package/node_modules/dp-shared/src/configs-contracts.ts +206 -0
- package/node_modules/dp-shared/src/db-rows.ts +280 -0
- package/node_modules/dp-shared/src/deploy-contracts.ts +38 -0
- package/node_modules/dp-shared/src/domain.ts +124 -0
- package/node_modules/dp-shared/src/identities.ts +36 -0
- package/node_modules/dp-shared/src/index.ts +25 -0
- package/node_modules/dp-shared/src/omni-flow-session.ts +80 -0
- package/node_modules/dp-shared/src/rest-contracts.ts +409 -0
- package/node_modules/dp-shared/src/task-history-contracts.ts +115 -0
- package/node_modules/dp-shared/src/worker-detail-contracts.ts +230 -0
- package/node_modules/dp-shared/src/ws-protocol.ts +435 -0
- package/package.json +2 -4
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>OmniFlow - 代理指纹控制台</title>
|
|
6
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
7
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
8
|
+
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
9
|
+
<link rel="stylesheet" href="popup.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div class="container">
|
|
13
|
+
<!-- Header -->
|
|
14
|
+
<header>
|
|
15
|
+
<div class="logo-area">
|
|
16
|
+
<img src="icon.png" alt="OmniFlow Logo" class="logo-img">
|
|
17
|
+
<span class="logo-text">OmniFlow</span>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="header-actions">
|
|
20
|
+
<!-- Open in Standalone Window Button -->
|
|
21
|
+
<button class="action-btn" id="openWindowBtn" title="悬浮独立窗口 (防失去焦点消失)">
|
|
22
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
23
|
+
<path d="M15 3h6v6"></path>
|
|
24
|
+
<path d="M9 21H3v-6"></path>
|
|
25
|
+
<path d="M21 3l-7 7"></path>
|
|
26
|
+
<path d="M3 21l7-7"></path>
|
|
27
|
+
</svg>
|
|
28
|
+
</button>
|
|
29
|
+
<!-- Close Window Button (Only visible in Window Mode) -->
|
|
30
|
+
<button class="action-btn hidden" id="closeWindowBtn" title="关闭控制台">
|
|
31
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
32
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
33
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
34
|
+
</svg>
|
|
35
|
+
</button>
|
|
36
|
+
<!-- Theme Toggle -->
|
|
37
|
+
<button class="action-btn" id="themeToggle" title="切换主题">
|
|
38
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
39
|
+
<circle cx="12" cy="12" r="5"></circle>
|
|
40
|
+
<line x1="12" y1="1" x2="12" y2="3"></line>
|
|
41
|
+
<line x1="12" y1="21" x2="12" y2="23"></line>
|
|
42
|
+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
|
43
|
+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
|
44
|
+
<line x1="1" y1="12" x2="3" y2="12"></line>
|
|
45
|
+
<line x1="21" y1="12" x2="23" y2="12"></line>
|
|
46
|
+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
|
47
|
+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
|
48
|
+
</svg>
|
|
49
|
+
</button>
|
|
50
|
+
</div>
|
|
51
|
+
</header>
|
|
52
|
+
|
|
53
|
+
<!-- Content Area: Scrolling Container -->
|
|
54
|
+
<main class="content-scroll">
|
|
55
|
+
<!-- Card 1: Proxy Server Config -->
|
|
56
|
+
<div class="glass-card">
|
|
57
|
+
<div class="card-header">
|
|
58
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="header-icon"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>
|
|
59
|
+
<h4>代理服务器配置</h4>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<!-- 智能一键解析导入容器 -->
|
|
63
|
+
<div class="smart-parse-container">
|
|
64
|
+
<div class="input-field">
|
|
65
|
+
<label for="smartInput" class="smart-label">
|
|
66
|
+
<span>智能一键解析填充</span>
|
|
67
|
+
<span class="smart-tag">智能匹配 IP / 端口 / 账密</span>
|
|
68
|
+
</label>
|
|
69
|
+
<div class="smart-input-wrapper">
|
|
70
|
+
<input type="text" id="smartInput" placeholder="在此粘贴 代理IP:端口:账号:密码 或 URL 格式" autocomplete="off">
|
|
71
|
+
<button id="smartParseBtn" class="smart-btn" type="button" title="一键解析并自动对齐时区">
|
|
72
|
+
<span>智能填充</span>
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<!-- Type Selection -->
|
|
79
|
+
<div class="form-row type-selection">
|
|
80
|
+
<label class="radio-pill">
|
|
81
|
+
<input type="radio" name="proxyType" value="HTTP" checked>
|
|
82
|
+
<span>HTTP</span>
|
|
83
|
+
</label>
|
|
84
|
+
<label class="radio-pill">
|
|
85
|
+
<input type="radio" name="proxyType" value="SOCKS5">
|
|
86
|
+
<span>SOCKS5</span>
|
|
87
|
+
</label>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<!-- IP & Port -->
|
|
91
|
+
<div class="form-grid">
|
|
92
|
+
<div class="input-field col-8">
|
|
93
|
+
<label for="proxyHost">代理 IP / 主机名</label>
|
|
94
|
+
<input type="text" id="proxyHost" placeholder="127.0.0.1" autocomplete="off">
|
|
95
|
+
</div>
|
|
96
|
+
<div class="input-field col-4">
|
|
97
|
+
<label for="proxyPort">端口</label>
|
|
98
|
+
<input type="text" id="proxyPort" placeholder="8080" autocomplete="off">
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<!-- Username & Password -->
|
|
103
|
+
<div class="form-grid margin-top">
|
|
104
|
+
<div class="input-field col-6">
|
|
105
|
+
<label for="proxyUser">用户名 (可选)</label>
|
|
106
|
+
<input type="text" id="proxyUser" placeholder="Username" autocomplete="off">
|
|
107
|
+
</div>
|
|
108
|
+
<div class="input-field col-6 relative">
|
|
109
|
+
<label for="proxyPass">密码 (可选)</label>
|
|
110
|
+
<div class="pass-wrapper">
|
|
111
|
+
<input type="password" id="proxyPass" placeholder="Password" autocomplete="off">
|
|
112
|
+
<button id="togglePassBtn" type="button" title="显示密码">👁️</button>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<!-- Auto-Detect Timezone Action Trigger -->
|
|
118
|
+
<button class="outline-btn margin-top" id="detectTimezoneBtn">
|
|
119
|
+
<svg class="loading-spinner hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><circle cx="12" cy="12" r="10" stroke-dasharray="40"></circle></svg>
|
|
120
|
+
<svg class="icon-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a10 10 0 0 0-10 10c0 5.523 4.477 10 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path><path d="M12 6v6l4 2"></path></svg>
|
|
121
|
+
<span>自动识别 IP 时区</span>
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<!-- Card 2: Fingerprint Shield Configurations -->
|
|
126
|
+
<div class="glass-card">
|
|
127
|
+
<div class="card-header">
|
|
128
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="header-icon"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>
|
|
129
|
+
<h4>防关联指纹遮罩</h4>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<!-- WebRTC protection Toggle -->
|
|
133
|
+
<div class="toggle-row justify-between flex-align margin-bottom">
|
|
134
|
+
<div class="toggle-meta">
|
|
135
|
+
<div class="toggle-title">WebRTC 泄露防护</div>
|
|
136
|
+
<div class="toggle-desc">强制 WebRTC 流量走代理,防止真实 IP 泄露</div>
|
|
137
|
+
</div>
|
|
138
|
+
<label class="switch-container">
|
|
139
|
+
<input type="checkbox" id="webrtcDisabled" checked>
|
|
140
|
+
<span class="switch-slider"></span>
|
|
141
|
+
</label>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<!-- Language spoofing Toggle -->
|
|
145
|
+
<div class="toggle-row justify-between flex-align margin-bottom">
|
|
146
|
+
<div class="toggle-meta">
|
|
147
|
+
<div class="toggle-title">浏览器语言同步</div>
|
|
148
|
+
<div class="toggle-desc">自动根据 IP 时区伪装对应语言(如 US -> en-US)</div>
|
|
149
|
+
</div>
|
|
150
|
+
<label class="switch-container">
|
|
151
|
+
<input type="checkbox" id="languagesEnabled" checked>
|
|
152
|
+
<span class="switch-slider"></span>
|
|
153
|
+
</label>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<!-- Hardware metrics Toggle -->
|
|
157
|
+
<div class="toggle-row justify-between flex-align margin-bottom">
|
|
158
|
+
<div class="toggle-meta">
|
|
159
|
+
<div class="toggle-title">硬件指纹标准化</div>
|
|
160
|
+
<div class="toggle-desc">锁定系统硬件规格为标准主流配置 (8核 / 8GB)</div>
|
|
161
|
+
</div>
|
|
162
|
+
<label class="switch-container">
|
|
163
|
+
<input type="checkbox" id="hardwareMaskingEnabled" checked>
|
|
164
|
+
<span class="switch-slider"></span>
|
|
165
|
+
</label>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<!-- Automation webdriver Toggle -->
|
|
169
|
+
<div class="toggle-row justify-between flex-align margin-bottom">
|
|
170
|
+
<div class="toggle-meta">
|
|
171
|
+
<div class="toggle-title">Webdriver 自动标记屏蔽</div>
|
|
172
|
+
<div class="toggle-desc">擦除自动化参数痕迹,锁定 navigator.webdriver 为 false</div>
|
|
173
|
+
</div>
|
|
174
|
+
<label class="switch-container">
|
|
175
|
+
<input type="checkbox" id="antiBotEnabled" checked>
|
|
176
|
+
<span class="switch-slider"></span>
|
|
177
|
+
</label>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<!-- Timezone spoofing Toggle -->
|
|
181
|
+
<div class="toggle-row justify-between flex-align margin-top border-top pt-10">
|
|
182
|
+
<div class="toggle-meta">
|
|
183
|
+
<div class="toggle-title">时区伪装劫持</div>
|
|
184
|
+
<div class="toggle-desc">强制重写浏览器日期时区,防时区偏差检测</div>
|
|
185
|
+
</div>
|
|
186
|
+
<label class="switch-container">
|
|
187
|
+
<input type="checkbox" id="timezoneEnabled" checked>
|
|
188
|
+
<span class="switch-slider"></span>
|
|
189
|
+
</label>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<!-- Timezone Input Area -->
|
|
193
|
+
<div class="input-field margin-top" id="timezoneInputSection">
|
|
194
|
+
<label for="spoofTimezone">伪装时区名 (如 America/New_York)</label>
|
|
195
|
+
<input type="text" id="spoofTimezone" placeholder="未设置时区" autocomplete="off">
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<!-- Card 3: Live Environment Diagnostic (Integrated check simulating ping0.cc) -->
|
|
200
|
+
<div class="glass-card" id="diagnosticCard">
|
|
201
|
+
<div class="card-header justify-between">
|
|
202
|
+
<div class="flex-align">
|
|
203
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="header-icon"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
|
|
204
|
+
<h4>实时风控环境报告 (IP & 时区校验)</h4>
|
|
205
|
+
</div>
|
|
206
|
+
<button class="action-btn-small" id="refreshDiagBtn" title="刷新环境检测">🔄 重新检测</button>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<!-- Diagnostic List -->
|
|
210
|
+
<div class="diag-body">
|
|
211
|
+
<div class="diag-item">
|
|
212
|
+
<span class="diag-label">出口公网 IP:</span>
|
|
213
|
+
<span class="diag-value" id="diagIp">正在检测...</span>
|
|
214
|
+
</div>
|
|
215
|
+
<div class="diag-item">
|
|
216
|
+
<span class="diag-label">代理物理归属地:</span>
|
|
217
|
+
<span class="diag-value" id="diagGeo">正在检测...</span>
|
|
218
|
+
</div>
|
|
219
|
+
<div class="diag-item">
|
|
220
|
+
<span class="diag-label">时区对齐状态:</span>
|
|
221
|
+
<span class="diag-value text-truncate" id="diagTz">正在检测...</span>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="diag-item">
|
|
224
|
+
<span class="diag-label">WebRTC 泄露防护:</span>
|
|
225
|
+
<span class="diag-value" id="diagWebrtc">正在检测...</span>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<!-- Deep Check External Link -->
|
|
230
|
+
<button class="outline-btn margin-top btn-small" id="openPingBtn" title="在新标签页中打开 ping0.cc 进行完整详细环境指纹诊断">
|
|
231
|
+
<svg class="icon-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>
|
|
232
|
+
<span>打开 ping0.cc 深度体检</span>
|
|
233
|
+
</button>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<!-- Card 4: Environment Migration & Backup (Safe Profile Cloner) -->
|
|
237
|
+
<div class="glass-card" id="migrationCard">
|
|
238
|
+
<div class="card-header">
|
|
239
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="header-icon"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
|
|
240
|
+
<h4>环境迁移与备份 (分身无缝克隆)</h4>
|
|
241
|
+
</div>
|
|
242
|
+
<p class="card-description">打包当前分身的代理指纹设置与**全网已登录 Session (Cookies)** 备份导出。在新分身导入即可瞬间克隆代理环境并自动免密登录,防止异地重新登录风控。</p>
|
|
243
|
+
|
|
244
|
+
<div class="form-grid margin-top">
|
|
245
|
+
<button class="outline-btn col-6 btn-small" id="exportBtn" title="导出当前分身的完整配置与全网 Cookies 备份">
|
|
246
|
+
<span>📤 备份当前环境</span>
|
|
247
|
+
</button>
|
|
248
|
+
<button class="outline-btn col-6 btn-small" id="importTriggerBtn" title="导入备份文件,瞬间恢复代理指纹环境并自动恢复免密登录">
|
|
249
|
+
<span>📥 还原环境备份</span>
|
|
250
|
+
</button>
|
|
251
|
+
<!-- Hidden File Pick Element -->
|
|
252
|
+
<input type="file" id="importFileInput" accept=".json" class="hidden">
|
|
253
|
+
</div>
|
|
254
|
+
<button class="outline-btn btn-small margin-top" id="destroyBtn" style="border-color: var(--danger); color: var(--danger);" title="一键安全销毁环境,清空所有全网 Cookies 和指纹配置,彻底防止卸载或关闭分身后的 IP 泄露风控">
|
|
255
|
+
<span>🔥 一键彻底重置与销毁分身</span>
|
|
256
|
+
</button>
|
|
257
|
+
<div class="helper-text align-center margin-top hidden" id="migrationStatus">状态提示</div>
|
|
258
|
+
</div>
|
|
259
|
+
</main>
|
|
260
|
+
|
|
261
|
+
<!-- Footer Action Buttons & Live Badge -->
|
|
262
|
+
<footer>
|
|
263
|
+
<div class="status-panel">
|
|
264
|
+
<div class="status-item">
|
|
265
|
+
<span class="dot" id="statusProxyDot"></span>
|
|
266
|
+
<span class="status-lbl">代理:</span>
|
|
267
|
+
<span class="status-val" id="statusProxyVal">等待配置</span>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="status-item">
|
|
270
|
+
<span class="dot" id="statusTzDot"></span>
|
|
271
|
+
<span class="status-lbl">时区:</span>
|
|
272
|
+
<span class="status-val text-truncate" id="statusTzVal">系统默认</span>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
<button class="primary-btn glow-btn" id="saveApplyBtn">
|
|
277
|
+
<span>应用配置并保存</span>
|
|
278
|
+
</button>
|
|
279
|
+
</footer>
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
<script src="popup.js"></script>
|
|
283
|
+
</body>
|
|
284
|
+
</html>
|