feat(browser): unify site credentials with browser profiles (BR-2)
- Inject the site account Cookie (manual + auto-login session, session wins)
into the camofox profile before the first tab opens; password accounts
without a session run refresh-login first; API Key sites are skipped.
- Cookie expired after injection -> credential.status=expired; cookie
accounts go to waiting/login_required ("log in once, applies site-wide").
- Write back site-domain cookies from the browser on handover, session close,
every 10 min of activity, and from refresh-login when the stored cookie is
invalid (verified before saving). user_info.cookieOrigin records
source=browser; source shown as manual/login/browser in the origin view.
- New camofox plugin umt-cookies (GET/POST /umt/sessions/:userId/cookies
under the access key); profile dir 0700/files 0600 in the desktop image.
- Single entry: sources-identity/service/credentials.ts.
- Real check: HHClub cookie injected into a fresh profile -> home page
logged in (logout link present), 5 cookies read back.
Requires rebuilding umt-browser-desktop (docker compose build camofox &&
docker compose up -d camofox) to take effect.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
901b01d1a1
commit
28974d1e1a
58 files changed
+2843
-1112
No files matched your search
@@ -45,38 +45,3 @@ export const HHANCLUB_DETAIL_PAGE = `<!DOCTYPE html><html><head><title>HHCLUB ::
|
||||
<div><a href="download.php?id=90002">下载种子</a></div>
|
||||
<div id="kdescr"><a href="https://www.imdb.com/title/tt15239678/">IMDb</a> <a href="https://movie.douban.com/subject/35575567/">豆瓣</a> 简介……</div>
|
||||
</div></body></html>`;
|
||||
|
||||
/**
|
||||
* 2026-09-29 真实账号核对后补的最小脱敏片段(名称、ID、数值均已替换;不含 passkey 与用户信息)。
|
||||
* 核对到的真实行为:列表标题链接文本末尾带新种标记「[新]」(详情页标题没有);短剧分类 412;
|
||||
* 新种完成数为 0;无促销时没有 promotion-tag 元素;上传时间在 span[title] 里,文本是相对时间。
|
||||
* 下载链接带 passkey(这里用占位值)。
|
||||
*/
|
||||
export const HHANCLUB_LIST_PAGE_2026 = `<!DOCTYPE html><html><head><title>HHCLUB :: 种子</title></head><body>
|
||||
<div id="user-info-panel"><a href="userdetails.php?id=7" class="VIP_Name">bob</a> <a href="logout.php">退出</a></div>
|
||||
<div class="torrent-table">
|
||||
<div class="torrent-table-sub-info">
|
||||
<div class="torrent-cat"><a href="?cat[]=412"><img src="pic/cattrans.gif" alt="短剧"/></a></div>
|
||||
<div class="torrent-title"><a class="torrent-info-text-name" href="details.php?id=91001&hit=1">示例短剧 1080p WEB-DL H265 AAC-HHWEB[新]</a></div>
|
||||
<div class="torrent-info-text-small_name">示例短剧 | 全30集 | 1080p</div>
|
||||
<div class="torrent-manage"><a href="download.php?id=91001&passkey=0000000000000000">下载</a></div>
|
||||
<div class="torrent-info-text-added"><span title="2026-09-29 14:07:03">5分钟</span></div>
|
||||
<div class="torrent-info-text-size">185.38 MB</div>
|
||||
<div class="torrent-info-text-seeders">1</div>
|
||||
<div class="torrent-info-text-leechers">58</div>
|
||||
<div class="torrent-info-text-finished">0</div>
|
||||
</div>
|
||||
<div class="torrent-table-sub-info">
|
||||
<div class="torrent-cat"><a href="?cat[]=402"><img src="pic/cattrans.gif" alt="电视剧"/></a></div>
|
||||
<div class="torrent-title"><a class="torrent-info-text-name" href="details.php?id=91002&hit=1">Example Show S01 2026 2160p WEB-DL H.264 AAC-HHWEB</a></div>
|
||||
<div class="torrent-info-text-small_name">示例剧集 | 第12集 | 4K | 类型: 奇幻 [内嵌中字]</div>
|
||||
<div class="torrent-manage"><a href="download.php?id=91002&passkey=0000000000000000">下载</a></div>
|
||||
<div class="torrent-info-text-added"><span title="2026-09-29 12:03:28">2时8分钟</span></div>
|
||||
<div class="torrent-info-text-size">1.46 GB</div>
|
||||
<div class="torrent-info-text-seeders">131</div>
|
||||
<div class="torrent-info-text-leechers">5</div>
|
||||
<div class="torrent-info-text-finished">187</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagination"><a href="?page=0">1-100</a><a href="?page=1">101-200</a></div>
|
||||
</body></html>`;
|
||||
Reference in new issue
Block a user