Research: Secure Architecture for Hero Browser inside HeroOS (Iframe vs Proxy) #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
HeroOS is a browser-based OS built using Rust + Dioxus, where applications are integrated via WASM.
Current apps include:
LiveKit Rooms (meetings)
Editors (Vim-like)(TODO)
AI Chat
Hero Business (employee/dashboard management)
Hero Browser (embedded browser app)
Problem Statement
Using a native browser embedded via
iframeintroduces security, UX, and functional limitations, including but not limited to:google.comdoes not reliably navigate to the final destination due to iframe restrictions (sandboxing, mixed content, CSP, X-Frame-Options).X-Frame-Options: DENY or SAMEORIGIN).This makes the current iframe-based approach non-viable for a production-grade “OS browser” experience.
Research Goal
Investigate alternative architectures for implementing Hero Browser inside HeroOS that:
google.com→https://www.google.com)Proposed Proxy-Based Flow (High-Level)
Research Summary: Hero Browser Architecture Options
Based on my research, here are the main approaches for implementing a browser-within-browser that avoids iframe limitations:
The Core Problem
The iframe approach fails because:
X-Frame-Options: DENY)Three Viable Architecture Approaches
1. Pixel Streaming (Remote Browser Isolation)
How it works:
Pros:
Cons:
Used by: Cloudflare Browser Isolation, enterprise RBI solutions
2. DOM Reconstruction with Proxy (Current hero_os approach, needs improvement)
How it works:
Pros:
Cons:
The JS Rewriting Challenge (from Titanium Network docs):
3. Service Worker Interception Proxy (Ultraviolet/Scramjet approach)
How it works:
Architecture:
Pros:
Cons:
Key Insight from Scramjet:
Recommended Approach for HeroOS
Given that HeroOS is WASM/Dioxus-based, I recommend a hybrid approach:
Phase 1: Enhanced DOM Reconstruction (Immediate)
Improve the current proxy to handle:
src/href)url()rewritinglocation,document.URLPhase 2: Service Worker Integration (Medium-term)
Add a Service Worker layer that:
Phase 3: Pixel Streaming Fallback (Long-term)
For sites that can't be proxied:
Key Technical Requirements
Server-side proxy must:
Client-side must:
window.locationaccess in JSWhat NOT to render in iframe:
dangerous_inner_htmlsrcdoc(current approach) but with better content sanitizationSources
we only support basic websites for now, lets disable browser for now