v0.2.72026-11-13
This release improves iframe automation, form handling, session history, and browser robustness. It adds opt-in MCP web search, fixes rendering hangs and process aborts, isolates CDP connection storage, and repairs Windows runtime packaging. 87 commits since v0.2.6.
Highlights
• Iframe automation uses the correct document and evaluation world. Child-frame evaluation, remote objects, uploads, and owner-frame metadata now follow the frame that owns them. Playwright iframe locators can resolve their content frames (#1479 (https://github.com/h4ckf0r0day/obscura/pull/1479), #1498 (https://github.com/h4ckf0r0day/obscura/pull/1498), #1502 (https://github.com/h4ckf0r0day/obscura/pull/1502)).
• Back and Forward preserve live document state. Same-document history traversal moves the cursor without duplicating entries or reloading the document. Identical-URL entries remain distinct, and replacements preserve forward history (#1577 (https://github.com/h4ckf0r0day/obscura/pull/1577)).
• Forms, selects, and tables support more existing automation. Native ownership determines which controls belong to a form, which options belong to a select, and which rows and cells belong to a table. Live collections and legacy mutation APIs are implemented (#1485 (https://github.com/h4ckf0r0day/obscura/pull/1485), #1488 (https://github.com/h4ckf0r0day/obscura/pull/1488)).
• Several crash and hang paths are fixed. Grid sizing stops when floating-point redistribution cannot progress. Invalid grid spans, malformed CSS imports, short SVG viewBox values, and deeply nested documents no longer trigger the repaired abort paths.
• MCP gains opt-in web search. The new websearch tool uses Keenable to find pages that agents can then open with browsernavigate. Deep-document and nested-table Markdown extraction also avoid repeated work (#1445 (https://github.com/h4ckf0r0day/obscura/pull/1445), #1493 (https://github.com/h4ckf0r0day/obscura/pull/1493)).
• Windows archives include required runtime dependencies. Packaging resolves and bundles the required Visual C++ runtime DLLs and checks the extracted distribution (#1492 (https://github.com/h4ckf0r0day/obscura/pull/1492)).
Behavior changes
• Noninteractive confirm() now returns false instead of automatically accepting the action. alert() remains nonblocking and prompt() returns null. Client-controlled synchronous dialogs remain unsupported (#1475 (https://github.com/h4ckf0r0day/obscura/pull/1475)).
• Each CDP connection receives an independent copy-on-write localStorage snapshot of the server’s startup profile and a fresh IndexedDB store. Changed localStorage keys merge back into the persistent profile when the connection closes. Embeddable persistent context copies continue sharing their configured live profile stores (#1478 (https://github.com/h4ckf0r0day/obscura/pull/1478)).
Security
• The privileged deno_core bootstrap alias is removed from page and frame globals (#1429 (https://github.com/h4ckf0r0day/obscura/pull/1429)).
• Newly created profile directories use owner-only permissions on Unix. Cookie files use mode 0600, and failed cookie saves produce an error log. Existing directory permissions are preserved; Windows directories inherit their parent’s ACL. Profile contents remain plaintext (#1512 (https://github.com/h4ckf0r0day/obscura/pull/1512), #1549 (https://github.com/h4ckf0r0day/obscura/pull/1549)).
• CDP WebSocket connections accept the endpoint’s own HTTP Origin by default. Other origins require OBSCURACDPALLOWED_ORIGINS. Native clients without an Origin remain supported, and Host validation and bearer authentication remain enforced (#1501 (https://github.com/h4ckf0r0day/obscura/pull/1501)).
• File uploads validate the target input, node identity, and owning frame before reading local files. Invalid or retired handles return protocol errors. Local file access still requires explicit opt-in (#1477 (https://github.com/h4ckf0r0day/obscura/pull/1477)).
• Imported public-suffix cookies receive exact-host scope instead of being silently discarded. SameSite validation and cookie-prefix restrictions remain enforced (#1550 (https://github.com/h4ckf0r0day/obscura/pull/1550)).
• History URL validation uses the committed document URL rather than a queued Location destination, preventing pending navigation from changing the origin used by history updates (#1577 (https://github.com/h4ckf0r0day/obscura/pull/1577)).
CDP and automation
• Child-frame evaluations and function calls execute in the selected frame’s V8 realm. Remote objects and property-derived handles retain their producing evaluation world. Released, retired, and cross-world handles are rejected instead of being redirected into the main document (#1498 (https://github.com/h4ckf0r0day/obscura/pull/1498)).
• DOM.describeNode and DOM.getOuterHTML preserve remote-node ownership. Frame owner elements report live child frameId metadata through document responses and child-node events (#1479 (https://github.com/h4ckf0r0day/obscura/pull/1479), #1502 (https://github.com/h4ckf0r0day/obscura/pull/1502)).
• DOM selector queries stay within the requested subtree, support :scope, and report invalid selectors and node IDs as protocol errors. Explicit shadow-root queries do not pierce unrelated trees (#1481 (https://github.com/h4ckf0r0day/obscura/pull/1481)).
• Lifecycle subscriptions replay the current document’s completed lifecycle state, allowing clients to attach after loading without waiting for events that already happened (#1418 (https://github.com/h4ckf0r0day/obscura/pull/1418)).
• Page.navigateToHistoryEntry preserves the runtime, history state, and popstate behavior when traversing within the live document (#1577 (https://github.com/h4ckf0r0day/obscura/pull/1577)).
• Discovery requests are routed by their request-target path. Header values, query values, and endpoint prefixes no longer change endpoint selection. Discovery URLs also accept trailing slashes (#1549 (https://github.com/h4ckf0r0day/obscura/pull/1549), #1570 (https://github.com/h4ckf0r0day/obscura/pull/1570)).
MCP and extraction
• Set OBSCURAWEBSEARCH=keenable to enable websearch. Enabling it sends search queries to Keenable. The integration supports the public endpoint and optional KEENABLEAPI_KEY, with bounded responses and result limits (#1445 (https://github.com/h4ckf0r0day/obscura/pull/1445)).
• Search limits accept integer-valued JSON numbers such as 5.0, while preserving defaults and clamping.
• Markdown extraction bounds recursive traversal and uses an explicit stack for deeper subtrees. Nested tables reuse converted cell output instead of recursively converting the same content again. CLI Markdown output, LP.getMarkdown, and MCP share the repair (#1493 (https://github.com/h4ckf0r0day/obscura/pull/1493)).
• MCP cookie and storage-state imports retain public-suffix host cookies with exact-host delivery (#1550 (https://github.com/h4ckf0r0day/obscura/pull/1550)).
Networking and page lifecycle
• Native GET and POST navigation preserve the initiating document when deriving Origin, Referer, Fetch Metadata, and cookie context. Redirects retain origin/site taint and progressively reduced referrers. Native stealth POST uses the selected stealth transport (#1486 (https://github.com/h4ckf0r0day/obscura/pull/1486)).
• Eligible Last-Modified subresources use age-adjusted heuristic cache freshness, capped at 24 hours. Explicit cache controls and existing bypass rules remain in effect (#1457 (https://github.com/h4ckf0r0day/obscura/pull/1457)).
• Empty HTTP error responses fail navigation instead of reporting a successful empty page (#1366 (https://github.com/h4ckf0r0day/obscura/pull/1366)).
• Classic scripts marked nomodule are skipped (#1525 (https://github.com/h4ckf0r0day/obscura/pull/1525)).
• Nested frame parent chains and message sources preserve browsing-context identity across navigation, removal, and reinsertion. Retired frames cann
v0.2.62026-10-31
v0.2.6:请求拦截、帧导航与 CDP 响应性全面优化
这版围绕自动化体验做了不少修补。主文档请求现在能在真正发出前被拦截,Playwright 和 Puppeteer 可以直接接管导航请求,二进制响应体、重复 Cookie、重定向等场景行为不变。CDP 在异步求值等待 Promise 期间不再卡住,其他命令和拦截回复可以照常推进;Runtime.evaluate 改为直接走 V8,页面里覆盖 eval 不再影响协议求值,全局词法绑定也能被后续求值读到。
帧导航方面,子帧的 Location 方法和具名表单目标会正确导航到所属帧,空白 iframe 在插入时初始化,iframe 影子根也用上了正确的文档。启动和响应处理也做了减负:常用浏览器方法预编译、bootstrap 源码跨 isolate 共享、内联样式按需分配、缓存的响应体只在客户端读取时才编码。
安全侧升级了 Tokio、rustls-webpki、zstd 等依赖,审计无新增例外,且保留了原有仿真配置;网络加载器自身强制 file:// 白名单,脚本 fetch() 会忽略禁改请求头。
有一处 Rust API 变更需要留意:StoredResponseBody.body 从 String 改为 Vec<u8>,存放原始响应字节,需要文本或 base64 形式请改用 .cdp_body(),CDP 协议格式不受影响。
v0.2.52026-10-17
v0.2.5 聚焦 MCP 自动化、存储正确性与浏览器兼容性,共 128 次提交。
MCP 快照现在返回可直接操作的元素引用、无障碍名称、控件状态与可见文本,过期引用会在执行前被拦截,避免误操作;元素引用指向原始节点,克隆或复制属性不会转移引用,新列表会使旧引用失效。browserevaluate 会等待脚本返回的 Promise,脚本只执行一次,异常、拒绝与超时均返回工具错误而非空结果;新增 browserwaitforfunction 支持基于谓词的等待。请求间隙中,活跃页面继续处理定时器与网络回调,切换标签页也不再销毁页面运行时,JavaScript 全局变量、事件监听与未完成的 Promise 会一直存活到标签关闭。
存储方面,Web Storage 可在导航与目标切换后保留,IndexedDB 事务能保留记录并在中止时回滚,storage-state 导入会把 localStorage 恢复到声明的各源。iframe 加载更贴近文档生命周期,srcdoc 在原生子文档中加载并继承 base URL 与 sandbox 限制。长驻服务新增 worker 回收机制,可按连接数、存活时长或 Linux RSS 上限替换,新 worker 在旧连接排空前即启动。
Rust API 有破坏性变更:InterceptResolution::Continue.body 改为 Option<Vec<u8>>,自有文本需用 Some(text.into_bytes());None 保留原请求体,Some(Vec::new()) 替换为空体,线上格式不变。安全上,Rustls 升至 0.23.46,修复四项 RUSTSEC 公告。
v0.2.42026-10-04
v0.2.4 是一次以自动化稳定性为主的维护版本,距上版 212 个提交。
最要紧的修复是 iframe 上下文在 GC 回收时崩溃的问题——借用的 iframe isolate 被销毁后能安全清理,页面关闭不再触发进程中止。多进程模式下,挂掉的 CDP worker 会被回收重启,新连接不会再派给已知不可用的 worker;不过失败 worker 上的会话仍需重连。
自动化等待也压了下来:空闲轮询、CDP 应答卡顿、重复 DOM 遍历和无变化的渲染工作都有削减,就绪计时与 await 的求值改为让出执行,浏览器其他任务得以推进。输入与页面生命周期更贴近真实浏览器——文本插入遵循 beforeinput 与被取消的键盘事件,只读控件拒绝删除,脱离的 frame 停止计时器,document 替换保留解析行为。发布 CI 现在要求 33 个障碍测试阶段全部通过,基线与候选共有的失败不能再通过绝对行为门槛。
安全方面补了一批洞:SSRF 拦截拒绝含非法 IPv4 目标的 Teredo 地址,独立渲染器的 HTTP 加载器与页面网络同受私网限制,畸形的请求拦截 URL 改写改为失败关闭,file:// 导航需浏览器层显式授权,history.pushState()/replaceState() 强制同源,__Host- cookie 要求显式 Path=/,CSS 图片与 mask 分配、robots 缓存等也加了边界。
网络侧,Fetch 在响应头到达即 resolve,不再等完整缓冲体;取消 fetch/XHR 会真正终止原生请求并发出 Network.loadingFailed;折叠的 HTTP/1 响应头、同源非 GET 的 Origin 头、WebAssembly 流式调用的空回调崩溃也都修了。另有 Runtime.getHeapUsage 改报原生 V8 堆数据、屏幕录制能拿到新文档帧以减少空白录像等改进。
v0.2.32026-09-20
v0.2.3 共 114 次提交,重心在安全、并发与浏览器兼容三块。
对外暴露的 CDP、MCP 控制端口现在强制鉴权:非回环绑定必须配置至少 32 字节的 token(OBSCURACDPTOKEN、OBSCURAMCPTOKEN),并拒绝浏览器来源请求与可疑 Host 头,限制请求体大小与连接数。CORS 预检、跨域重定向、Cookie 作用域与 SameSite 规则同步收紧,WebCrypto 输出加上长度上限,Rustls 也补上了安全修复。
deno_core 升到 0.412、V8 升到 150.4,旧的安全公告例外随之移除。并发自动化更可靠:同一连接下的页面各持独立 isolate,断连即释放状态,多 worker 服务立即启动并改用系统分配端口。渲染又过了一轮正确性与性能优化,资源加载、字体与文本整形复用、表单状态上屏都有改善;document.write 顺序、:scope、指针事件等 Web 平台行为继续向浏览器对齐。
v0.2.22026-09-05
v0.2.2 是一次兼容性与健壮性的集中打磨,距 v0.2.1 共 126 次提交。
生成的 CDP 客户端终于能端到端跑通:Page.enable 每页只发一次完整加载序列,chromiumoxide 的 new_page 不再卡在首次导航前;Playwright 侧补齐表单填写与上下文初始化,getByLabel、grantPermissions 均可用。单个抛错脚本或未处理的 Promise 不再拖垮事件循环,行为对齐 Chrome;Worker 进程在深层页面上也扛得住——样式级联改用显式栈,深层定时器与抓取体积都加上限。二进制内容全程保真,XHR、fetch 按字节读取,Response.body 可用。安全方面,SSRF 黑名单补入 IPv6 嵌套 IPv4、CGNAT 等区间,stealth 传输同享 DNS 护栏,profile setter 的注入路径被堵死。MCP 现在会先排空合成导航,再回复工具调用。
v0.2.12026-08-23
Child frames now run their own scripts and talk to the parent page, MCP keeps driving the page between tool calls, and rendering, CDP, and stealth all gained fidelity and consistency fixes. 122 commits since v0.2.0.
Highlights
• iframes run their own scripts. Child frames get their own V8 realm, a page can reach into its same-origin frames, postMessage flows between a page and its frames, and CDP reports the real child frame tree. Frame realms are released before the isolate they point into, fixing a class of crashes on frame-heavy pages (#600).
• MCP drives the page between tool calls. The active page's task queue is pumped while the transport waits, so timers, fetches, and queued navigations (form submits, location changes, clicks) complete instead of stranding until the next tool call (#618, #640).
• Rendering keeps closing on Chrome. Webfont icons and color emoji render, outset box shadows clip correctly, and textarea gets an intrinsic control box and its own JS interface, so Playwright visibility checks, clicks, and fills work on textareas.
• SPA routes are reported. Same-document navigations surface after clicks and location coerces assigned values, so client-side routers (Next.js, React Router, vue-router) no longer freeze on the original route.
• Stealth tells one story. --stealth applies to --dump original, ES modules load over the stealth transport instead of the plain client, and stealth requests use emulation compression.
CDP and networking
• Runtime.bindingCalled is delivered to the session that subscribed.
• Input.insertText embeds text as a JSON literal, so text with newlines or quotes is inserted instead of dropped.
• Storage.clearCookies is implemented; cookie domains are canonicalized on every jar key, and expired updates delete the cookie.
• --eval awaits promise-returning expressions, so async IIFEs resolve instead of serializing as {} (#693).
• objectId lookups escape backslashes before interpolation (#557).
• fetch and XHR resolve relative URLs through the URL parser against the document base, replacing a :// substring check (#663), and follow twenty redirects per the Fetch standard.
• The stealth client applies the SSRF DNS guard, so --stealth no longer trades away protection against hostnames that resolve to private or loopback addresses.
• Accept-Language can be overridden, plain GETs retry after a connection reset, and connection refusals produce a proper CDP response.
DOM and Web APIs
• DOMParser produces a <parsererror> document for malformed XML mime types, matching Chrome's signal.
• Document.createEvent rejects unknown interface names (#610), and DOMStringMap is exposed globally (#599).
• Function.prototype.toString keeps its native shape, and the bootstrap shim runs in an IIFE so internal DOM classes no longer leak into page script scope.
• insertBefore and replaceChild run the full insertion steps, and document.write feeds one input stream per document.
• HTMLSelectElement gains parity for type, change-on-assignment, and selectedIndex.
• performance.timeOrigin can no longer land in the future.
Security and robustness
• Runtime.removeBinding validates binding names, closing a JS injection path into the page (#578).
• DOM.setFileInputFiles is gated behind --allow-file-access, matching the file:// navigation opt-in (#579). Behavior change: Puppeteer/Playwright file uploads now fail with a clear error unless the flag is set.
• PBKDF2 iterations and output length are capped against runtime DoS (#580).
• children() and ancestors() walks are bounded against cyclic DOM chains (#582), and duplicate module graphs and heap exhaustion are contained.
Tooling and docs
• New tools/live-view.mjs watches agent sessions live with target-following and adaptive pacing, with a guide under docs/.
• Cross-compilation builds generate the V8 snapshot with the target-architecture mksnapshot (#682).
• The CLI enforces --obey-robots.
• PR validation compares obstacle-course failures against the base revision and covers render, stealth, and no-render configurations.
Contributors
Thanks to @xrip, @mnaza, @aech, @Suydev, @zhangyang-crazy-one, @lisa0314, @Zed128, @aleekaz, @ousamabenyounes, @marcoripa96, and @dgcavalcante-png for contributions to this release.
Full Changelog: https://github.com/h4ckf0r0day/obscura/compare/v0.2.0...v0.2.1
v0.2.02026-08-08
Obscura v0.2.0 引入自研 Rust 渲染引擎,无需内置或启动 Chromium 即可直接渲染、抓取现代网页。新版覆盖块级与行内布局、Flexbox、Grid、表格、定位、滚动、变换、文本排版、SVG、Canvas、动画等能力,并支持外部样式表、JS 模块、Web 字体、Shadow DOM 与自定义元素。
截图支持视口、裁剪、滚动与整页捕获,输出 PNG/JPEG/WebP;新增 screencasting,可按页面活动输出带背压控制的帧序列;PDF 导出支持打印样式、分页、纸张尺寸、页码范围与流式输出。以上能力均可通过 CLI、MCP、Puppeteer、Playwright 调用,例如:
``sh
obscura fetch https://example.com --screenshot page.png
`
同时修复了 React 表单填充、命名空间属性、cloneNode()、各类事件与定时器执行、data:` 动态脚本、字符集检测等兼容性问题。
需要留意的限制:渲染尚未达到 Chromium 完全对齐,长尾 CSS、部分 Web API 与 GPU 合成效果仍有差异;PDF 目前为栅格化输出,文字不可选中;screencasting 记录的是页面活动而非固定帧率桌面视频。发布包提供含/不含渲染、含/不含 stealth 的四种组合,默认包已含渲染能力。
v0.1.112026-07-26
v0.1.11(距上版 81 次提交)
CDP 会话彻底隔离,可安全并发:每个连接独占运行时与浏览器上下文,不再跨 isolate 中断,Cookie、请求头、目标标签页和 User-Agent 覆写也不会在客户端之间串味。DOM 部分大幅向真实浏览器看齐——TreeWalker、NodeIterator 按文档顺序双向遍历,过滤器正确处理 FILTERSKIP 与 FILTERREJECT,template.content 返回解析后的文档片段,插入 DocumentFragment 会迁移其子节点。网络方面,脚本发起的 fetch/XHR 会发出 Network 事件,被动回调可随时摘除且不跨页面泄漏;进程内的 fetch 状态改由所属 BrowserContext 持有,顺序启动多个 Browser 实例也不再共用过期的异步网络状态。此外还修了一堆兼容性细节:structuredClone 保住 CryptoKey 与循环引用,Cookie 按 name+path 共存,SVG 元素保留命名空间,scroll 系列真正更新滚动位置并派发事件。
v0.1.102026-07-11
v0.1.10:React/Vue 受控输入终于能真正端到端工作——通过 CDP 写入时改走原型 setter,配合暴露在 document/element 上的事件处理器,React 走 input-event 路径触发 onChange,表单填写类 agent 可以驱动真实 SPA 了。深层嵌套与重型页面不再崩溃:序列化、textContent、import 遍历及 --dump text 全部改为迭代实现,避免爆栈;Vite dev / React Refresh 应用也能正常挂载,不再留下空 #root。CDP 补齐 DOM.setFileInputFiles(对应 Puppeteer uploadFile() 与 Playwright setInputFiles())和 Fetch.takeResponseBodyAsStream 流式下载,大文件分块读取、有界缓存,不再占满内存。另修 Cookie 路径匹配越界、new Image() 缺 style、goBack/goBack 误判等问题;WebCrypto 补上 HMAC、AES 系列、PBKDF2、HKDF;serve --workers 代理改走 OBSCURA_PROXY 环境变量,凭据不再暴露在进程参数里。