Skip to content

Mobile: no plugin interception path for sealed client traffic — ask: capability declaration + proxy/host-mediated story (WebView hook is impossible on iOS) #3524

Description

@cad0p

The workflow

I'm building a bb plugin that gives users an encrypted path to their self-hosted sites: it intercepts HTTP(S) requests in bb's embedded browser (CDP Fetch via experimental_desktopBrowsers) and HPKE-seals them to a pinned origin key, so the CDN edge in between only sees ciphertext. Desktop works. Users will expect the same protection when they open the same site from bb mobile — and plugin authors need a way to declare, honestly, which surfaces support this. Related companion issues: the provenance (#3523) and activation-integrity (#3522) work for the same plugin, and the mobile docs drift issue (#3525) that misled this investigation.

What happens today (main @ 9b4f273, post-#2515)

  • apps/mobile is a WebView shell over the PWA since Replace the native mobile UI with a WebView shell around the PWA #2515 (15e87df42, 2026-08-27; ~620 files deleted): one ProfileWebViewScreen, a versioned @bb/mobile-bridge handshake, and native shell screens for connect/servers, machines, device, notifications, and appearance (NATIVE_ONLY_PREFIXES plus RootNavigator.tsx). Terminal and HTML previews are PWA content inside the shell; plugin nav panels render there too (the x-bb-app-surface: mobile header is the app-surface marker, not a gate). There is no native plugin list/config UI anymore.
  • There is no in-app browser on mobile to hook: the in-app browser is gated on isDesktopBrowserAvailable() (desktop window.bbDesktop only), and external URLs leave the app via shellOpenExternal to the system browser (url-open-routing.tsx). Intercepting the shell WebView would only see the PWA's traffic to the bb server — not arbitrary origins.
  • experimental_desktopBrowsers is host-scoped to a paired desktop host; CDP is Chromium-only. The repo's browser plan (plans/bb-browser.md) likewise defines the in-app browser as a desktop Electron WebContentsView with a scoped bb-owned bridge.
  • Platform reality (iOS): WKURLSchemeHandler covers custom schemes only; NSURLProtocol-style http(s) interception is unsupported in WKWebView (WebKit bug 138169, open for a decade with the request explicitly declined); WKContentRuleList is declarative URL blocking without body access; WKUserScript injection is a bypassable page-side shim that cannot cover non-JS subresources; CDP has no iOS equivalent. As a result, "request/response hooks in the WebView layer" is not shippable on iOS (private APIs = rejection). Android differs: shouldInterceptRequest can inspect requests and synthesize WebResourceResponse bodies, so such a surface would be Android-only with the declaration below covering iOS.
  • Since iOS 17, WKWebsiteDataStore.proxyConfigurations is a public way to route a WebView's traffic through a proxy you control — so a proxy-mediated path is technically viable on modern iOS even though a hook is not.
  • Apple policy is not the blocker: guideline 2.5.6 requires WebKit (WKWebView satisfies it); proxied/remote-rendered browsers exist on the App Store; the costs are ordinary privacy disclosure (5.1.1/5.1.2) and, only if a Network Extension were used, the 5.4 rules.
  • (Context: the shell cannot use service workers anyway — WKWebView requires app-bound domains, so Replace the native mobile UI with a WebView shell around the PWA #2515's commit message explicitly drops the service worker.)

What you would expect (ranked)

  1. Capability declaration + per-surface coverage docs (cheap, immediately useful). A plugin can declare e.g. capabilities: ["browser.intercept"]; surfaces that cannot provide it refuse gracefully instead of silently leaking unsealed traffic, and the docs state per-surface support. This is a new public plugin-API surface, so per the repo's own rules it should go through the experimental-to-stable audit (a docs/api_to_audit.md entry) — we accept that.
  2. Paired-host-daemon remote story. The desktop host performs the CDP interception; the phone displays. Requires no new iOS privileges and reuses the existing host-daemon relationship.
  3. A documented proxy-mediated path for mobile (iOS 17+ proxyConfigurations, Android equivalents) — or an explicit "not planned" so plugin authors can set expectations. If a native interception surface is ever built, it is Android-only.
  4. The WebView-hook ask is dropped: it is impossible on iOS public APIs (and there is no mobile in-app browser to attach it to anyway).

Context and alternatives

Checks

  • I searched open and closed issues for the same request.
  • If an agent wrote this, the body ends with > AGENT GENERATED.

AGENT GENERATED

Activity

  1. added
    mobile
    plugins
    on Sep 11, 2026
  2. bb-slop-cop commented on Sep 11, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied Type: Feature, Priority: Medium, Effort: High, and labels: mobile, plugins. All classifications were missing; no existing values were replaced. Final Type verified as Feature.

    This requests new mobile browser capabilities and plugin API design. Its scope is limited, but implementation requires architecture decisions. Reproduction and fix steps were skipped for this non-bug; no PR was opened because the request needs product and API design.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mobileplugins

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions