Skip to content

feat(browser): [browser] upstream_proxies routes chosen domains through an upstream proxy (TinyComputer v0.19.0) - #8743

Merged
senamakel merged 15 commits into
tinyhumansai:mainfrom
senamakel:browser-proxy
Nov 16, 2026
Merged

senamakel merged 15 commits into
tinyhumansai:mainfrom
senamakel:browser-proxy

Conversation

@senamakel

@senamakel senamakel commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

TinyComputer v0.19.0 re-pin

This PR pins TinyComputer v0.19.0 (tag commit 6d7624fb225ba2453d4cdaf48a31d22511703e77), which adds upstream-proxy routing to the browser egress proxy (tinyhumansai/tinycomputer#182). vendor/tinycomputer is at that gitlink, and the tinycomputer registry record takes its asset digests verbatim from the release's checksum.toml (scripts/modules/release-and-repin.mjs --version 0.19.0).

Release: https://github.com/tinyhumansai/tinycomputer/releases/tag/v0.19.0
Related: tinyhumansai/tinycomputer#182, tinyhumansai/tinycomputer#183

What

Adds [browser] upstream_proxies, which routes chosen destination domains through an upstream HTTP proxy. This is for sites that block the machine's own address, such as a datacenter range. Reddit, for example, answers every page from a VPS with "You've been blocked by network security".

[browser]
upstream_proxies = [
  { domains = ["reddit.com", "redd.it", "redditstatic.com"], url = "http://user:pass@proxy.example:8000" },
]
  • The host only owns the config. browser_egress_host::browser_dial_alias(config) adds the entries to TinyComputer's host-private browser.egress section as upstream_proxies ([{url, domains}]). When the list is empty, the section is the bare alias as before, byte for byte, so a host without the setting sees no change and older TinyComputer releases still load. The callback-bound load (ops::computer_callback_config) and every refresh (desktop::proxy) build the same bytes.
  • Policy does not change. BrowserEgressHost::authorize (TinySecurity plus the never-open list) still sees every routed page. It also sees the upstream proxy's own host:port, which TinyComputer authorizes, consumes and dials like any other browser dial. TinyComputer then sends CONNECT <approved address> to the proxy, so the proxy resolves nothing.
  • The URL is a credential. BrowserUpstreamProxy's Debug prints url: "[REDACTED]", and the config snapshot (config_snapshot RPC/tool) redacts the userinfo, because it already redacts any key named url. Nothing is logged except the number of entries.
  • It applies only with browser egress enforcement (security-module). Changes take effect on the next core start.

Tests

  • config/schema/tools/browser_tests.rs: TOML parse, default empty, not written back when unset, Debug redaction.
  • modules/browser_egress_host_tests.rs: the bare alias keeps exactly its two keys, configured proxies ride in the private egress section, and the bytes are stable.
  • modules/desktop_tests.rs: the callback-bound load config still equals every refresh.
  • config/ops_loader_and_search_tests.rs: the snapshot redacts the proxy credentials and keeps the domains.
  • modules/registry_computer_release_tests.rs: expects v0.19.0.

Routing behaviour itself is tested upstream in tinycomputer#182, through the bus.

Docs

docs/gitbooks/en/developing/tinycomputer-docker.md, section 5, "Sites that refuse a datacenter address".

Downstream: a teenydroid/brain PR (linked below once open) sets this from an operator secret.

Validation

  • node scripts/modules/release-and-repin.mjs tinycomputer --version 0.19.0: records rewritten from checksum.toml; check-module-pins.mjs ok, check-submodule-monotonic.mjs ok.
  • cargo test -p openhuman --lib -- registry upstream_prox browser_dial_alias stable_alias callback_bound_load browser_egress_host: 479 passed. 1 failed (prompt_size::session_report_measures_the_visible_belt_not_the_registry, "security module unavailable: secret approval unavailable"), and it fails the same way on main on this machine because no security module is available locally.
  • cargo metadata --locked for the root and crates/openhuman-app lockfiles.
  • I merged origin/main (e78115c, fix(wallet): harden the secondary Solana account and program signing #8740) in. crates/openhuman-app/Cargo.lock on main was already stale: --locked failed because main was missing the ed25519-dalek/bs58 closure that fix(wallet): harden the secondary Solana account and program signing #8740 added. This PR regenerates it offline. Root and app lockfiles now pass cargo metadata --locked.

Summary by CodeRabbit

  • New Features
    • Browser traffic can now use configured HTTP proxies for specified domains and their subdomains; other destinations connect directly.
    • Proxy credentials are protected in configuration displays, and existing browser security checks continue to apply.
  • Documentation
    • Added setup guidance covering proxy configuration, credential formatting, security requirements, activation, and common connection failures.
  • Updates
    • Updated the bundled TinyComputer release.

senamakel and others added 12 commits November 16, 2026 08:16
Update the vendored tinycomputer submodule to the latest upstream commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a `[browser] upstream_proxies` config option that routes listed destination domains through an HTTP proxy, for sites that reject the machine's own address. Proxy URLs are kept out of logs and Debug output, and every dial they cause still passes through egress authorization.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Expose the browser upstream proxy type alongside BrowserConfig so downstream code can reference it through the tools config module without reaching into the browser submodule directly.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add tests asserting that upstream proxy entries parse from TOML and default to empty, that proxy credentials are stripped from config snapshots and Debug output, and that configured proxies are carried in the private egress section while the dial alias stays stable.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Re-exported BrowserUpstreamProxy at the schema module root and updated the
tests to reference it there instead of the nested tools path, so callers can
import the type without reaching into the tools submodule.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a section explaining how to route chosen domains through an upstream HTTP proxy when sites reject datacenter addresses, covering domain matching, policy enforcement, credential handling and failure behaviour.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Document that TinyComputer requests a CONNECT tunnel to an address
TinySecurity approved for the page's host, so the proxy resolves nothing,
and that the Host header and TLS SNI pass through unchanged. The
tinycomputer vendor submodule is bumped to the matching revision.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinycomputer submodule to the latest upstream commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned tinycomputer module record to version 0.19.0, refreshing the release URL and the archive names and SHA-256 checksums for every published platform asset. The vendor submodule is advanced to the matching revision so the bundled source stays in sync with the pinned release.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bump the expected module version and the published artifact names and checksums for every target so the registry contract test tracks the 0.19.0 release.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the version of the tinycomputer crates in the lockfile from 0.18.0 to 0.19.0 to reflect the new release.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the locked tinycomputer-bus dependency from 0.18.0 to 0.19.0 in the app's Cargo.lock.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T10:29:32.537750Z 7ed093f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds browser upstream proxy configuration, passes configured proxy URLs and domains into browser egress settings, and updates TinyComputer to version 0.19.0. It also adds tests and documentation for proxy configuration and behavior.

Changes: Browser upstream proxy flow

Layer / File(s) Summary
Define and validate proxy configuration
crates/openhuman-core/src/config/schema/tools/browser.rs, crates/openhuman-core/src/config/schema/tools/mod.rs, crates/openhuman-core/src/config/schema/mod.rs, crates/openhuman-core/src/config/schema/tools/browser_tests.rs, crates/openhuman-core/src/config/ops_loader_and_search_tests.rs
BrowserConfig adds an optional upstream proxy list, and BrowserUpstreamProxy is publicly exported. Tests cover TOML parsing, defaults, serialization, debug redaction, and snapshot credential redaction.
Pass proxy entries through browser egress configuration
crates/openhuman-core/src/modules/browser_egress_host.rs, crates/openhuman-core/src/modules/ops.rs, crates/openhuman-core/src/modules/desktop_tests.rs, crates/openhuman-core/src/modules/browser_egress_host_tests.rs
browser_dial_alias accepts configuration and includes configured proxy URLs and domains. Callback configuration passes the config through; tests check default and configured aliases.
Update TinyComputer release reference and proxy documentation
crates/openhuman-core/src/modules/registry/records_computer.rs, crates/openhuman-core/src/modules/registry_computer_release_tests.rs, vendor/tinycomputer, docs/gitbooks/en/developing/tinycomputer-docker.md
The TinyComputer release reference, platform asset names, and hashes change to version 0.19.0. The guide documents proxy matching, authorization, tunneling, credential handling, and stated failure behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Config
  participant computer_callback_config
  participant browser_dial_alias
  participant TinyComputer
  Config->>computer_callback_config: browser configuration
  computer_callback_config->>browser_dial_alias: configuration
  browser_dial_alias-->>computer_callback_config: policy and upstream proxy entries
  computer_callback_config->>TinyComputer: browser security configuration
Loading

Possibly related issues

  • Epic: Harden vendored modules #7343: This PR advances the TinyComputer pin, but the available evidence does not establish whether version 0.19.0 resolves the risks described in the issue.

Possibly related PRs

Suggested labels: rust-core

Suggested reviewers: m3ga-mind, codeghost21

Merge Risk: Minimal · up to 76236

This adds an optional browser upstream-proxy setting that leaves behavior unchanged when it is not configured. No concrete merge-blocking problem was found. The routing behavior depends on the TinyComputer 0.19.0 release, and the PR reports that it is tested upstream. Confirm that the pinned commit accepts the new config shape before relying on the feature.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: a new [browser] upstream_proxies setting that routes selected domains through an upstream proxy. It also names the TinyComputer v0.19.0 bump, which the PR includes. …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a new [browser] upstream_proxies setting that routes selected domains through an upstream proxy. It also names the TinyComputer v0.19.0 bump, which the PR includes. The title is specific and matches the changeset, so it passes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the proxy list,
Domains and URLs join the flow.
Secrets hide from debug’s view,
New release pins make paths align.
Then off the rabbits hop!

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1343027d-1cdc-4bf9-bdc9-cbb3d7c90146
Commits

Reviewing files that changed from the base of the PR and between e78115c and 76236eb.

Files ignored due to path filters: 2

  • Cargo.lock is excluded by !**/*.lock
  • crates/openhuman-app/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 13

  • crates/openhuman-core/src/config/ops_loader_and_search_tests.rs
  • crates/openhuman-core/src/config/schema/mod.rs
  • crates/openhuman-core/src/config/schema/tools/browser.rs
  • crates/openhuman-core/src/config/schema/tools/browser_tests.rs
  • crates/openhuman-core/src/config/schema/tools/mod.rs
  • crates/openhuman-core/src/modules/browser_egress_host.rs
  • crates/openhuman-core/src/modules/browser_egress_host_tests.rs
  • crates/openhuman-core/src/modules/desktop_tests.rs
  • crates/openhuman-core/src/modules/ops.rs
  • crates/openhuman-core/src/modules/registry/records_computer.rs
  • crates/openhuman-core/src/modules/registry_computer_release_tests.rs
  • docs/gitbooks/en/developing/tinycomputer-docker.md
  • vendor/tinycomputer

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

senamakel and others added 2 commits November 16, 2026 10:23
Pin the tinycomputer-bus dependency back to 0.18.0 in the app lockfile, reverting the earlier bump to 0.19.0.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds Ed25519 signing dependencies and base58 encoding to the app crate, and updates tinycomputer-bus to 0.19.0.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai coderabbitai Bot added the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Nov 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Proxy configuration changes after module load trigger reinitialization that TinyBus rejects, causing calls to fail instead of preserving the existing routing until restart.

1 open issue
What changed in this PR

Adds domain-specific browser proxy configuration to OpenHuman, delegating routing to TinyComputer v0.19.0 while preserving browser egress policy checks.

Changes:

  • Adds [browser] upstream_proxies and passes configured entries through TinyComputer’s private egress configuration.
  • Adds configuration, credential-redaction, and stable-configuration tests, plus usage documentation.
  • Updates TinyComputer release pins, asset checksums, and lockfiles to v0.19.0.
File Description
docs/​gitbooks/​en/​developing/​tinycomputer-docker.md Documents proxy setup, security checks, and limitations.
crates/​openhuman-core/​src/​modules/​registry/​records_computer.rs Pins TinyComputer v0.19.0 release assets and checksums.
crates/​openhuman-core/​src/​modules/​registry_computer_release_tests.rs Updates expected release metadata and checksums.
crates/​openhuman-core/​src/​modules/​ops.rs Passes browser configuration into callback-bound loading.
crates/​openhuman-core/​src/​modules/​desktop_tests.rs Updates the load/refresh configuration consistency test.
crates/​openhuman-core/​src/​modules/​browser_egress_host.rs Includes configured proxies in private egress configuration.
crates/​openhuman-core/​src/​modules/​browser_egress_host_tests.rs Tests proxy serialization and unchanged empty configuration.
crates/​openhuman-core/​src/​config/​schema/​tools/​mod.rs Re-exports the proxy configuration type.
crates/​openhuman-core/​src/​config/​schema/​tools/​browser.rs Defines proxy settings with redacted debug output.
crates/​openhuman-core/​src/​config/​schema/​tools/​browser_tests.rs Tests parsing, defaults, serialization, and debug redaction.
crates/​openhuman-core/​src/​config/​schema/​mod.rs Exposes the proxy type through the configuration schema.
crates/​openhuman-core/​src/​config/​ops_loader_and_search_tests.rs Tests proxy credential redaction in snapshots.
crates/​openhuman-app/​Cargo.lock Updates the desktop host’s TinyComputer bus version.
Cargo.lock Updates workspace TinyComputer package versions.

Review effort: Balanced

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ed093f12e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@senamakel
senamakel merged commit dbbaf7f into tinyhumansai:main Nov 16, 2026
25 of 36 checks passed
@senamakel

Copy link
Copy Markdown
Member Author

Downstream: teenydroid/brain#319 sets [browser] upstream_proxies from the operator's BROWSER_PROXY_URL secret. The two late review threads are addressed in #8744.

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

Labels

rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants