diff --git a/Cargo.lock b/Cargo.lock index c56a15d7bb9..070c25adb8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9596,7 +9596,7 @@ dependencies = [ [[package]] name = "tinycomputer" -version = "0.18.0" +version = "0.19.0" dependencies = [ "getrandom 0.4.3", "serde", @@ -9615,7 +9615,7 @@ dependencies = [ [[package]] name = "tinycomputer-accessibility" -version = "0.18.0" +version = "0.19.0" dependencies = [ "arboard", "command-group", @@ -9630,7 +9630,7 @@ dependencies = [ [[package]] name = "tinycomputer-browser" -version = "0.18.0" +version = "0.19.0" dependencies = [ "agent-browser", "base64 0.22.1", @@ -9649,7 +9649,7 @@ dependencies = [ [[package]] name = "tinycomputer-bus" -version = "0.18.0" +version = "0.19.0" dependencies = [ "base64 0.22.1", "serde", @@ -9659,7 +9659,7 @@ dependencies = [ [[package]] name = "tinycomputer-core" -version = "0.18.0" +version = "0.19.0" dependencies = [ "serde", "serde_json", @@ -9671,7 +9671,7 @@ dependencies = [ [[package]] name = "tinycomputer-cursor" -version = "0.18.0" +version = "0.19.0" dependencies = [ "getrandom 0.4.3", "serde", @@ -9681,7 +9681,7 @@ dependencies = [ [[package]] name = "tinycomputer-desktop" -version = "0.18.0" +version = "0.19.0" dependencies = [ "agent-desktop-core", "agent-desktop-linux", @@ -9696,7 +9696,7 @@ dependencies = [ [[package]] name = "tinycomputer-engine" -version = "0.18.0" +version = "0.19.0" dependencies = [ "getrandom 0.4.3", "image", diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lock index ecea2761eda..0a750c9effa 100644 --- a/crates/openhuman-app/Cargo.lock +++ b/crates/openhuman-app/Cargo.lock @@ -1314,6 +1314,33 @@ dependencies = [ "cmov", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "darling" version = "0.24.1" @@ -1729,6 +1756,30 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2 0.10.9", + "subtle", + "zeroize", +] + [[package]] name = "either" version = "1.19.0" @@ -1922,6 +1973,12 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "field-offset" version = "0.3.6" @@ -4547,12 +4604,14 @@ dependencies = [ "async-trait", "axum", "base64 0.22.1", + "bs58", "bytes", "chrono", "chrono-tz", "directories 6.0.0", "dirs", "dotenvy", + "ed25519-dalek", "flate2", "fs2", "futures", @@ -5140,6 +5199,16 @@ dependencies = [ "spki", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.34" @@ -6607,6 +6676,15 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "simd-adler32" version = "0.3.10" @@ -7901,7 +7979,7 @@ dependencies = [ [[package]] name = "tinycomputer-bus" -version = "0.18.0" +version = "0.19.0" dependencies = [ "base64 0.22.1", "serde", diff --git a/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs b/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs index c63f5a2f962..b57bd015f6d 100644 --- a/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs +++ b/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs @@ -354,6 +354,22 @@ async fn snapshot_config_json_redacts_every_search_key_but_keeps_settings() { assert!(snapshot["config"]["seltz"]["api_key"].is_null()); } +#[tokio::test] +async fn snapshot_config_json_redacts_browser_upstream_proxy_credentials() { + let mut cfg = Config::default(); + cfg.browser.upstream_proxies = vec![crate::config::schema::BrowserUpstreamProxy { + domains: vec!["reddit.com".into()], + url: "http://resi-user:hunter2@gate.example:7000".into(), + }]; + let snapshot = snapshot_config_json(&cfg).await.unwrap(); + let serialized = snapshot.to_string(); + assert!(!serialized.contains("hunter2")); + assert!(!serialized.contains("resi-user")); + let proxy = &snapshot["config"]["browser"]["upstream_proxies"][0]; + assert_eq!(proxy["domains"][0], "reddit.com"); + assert!(proxy["url"].as_str().unwrap().contains("gate.example")); +} + #[tokio::test] async fn snapshot_config_json_redacts_the_storage_url_credentials() { let mut cfg = Config::default(); diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs index 019eb018c51..225358cb698 100644 --- a/crates/openhuman-core/src/config/schema/mod.rs +++ b/crates/openhuman-core/src/config/schema/mod.rs @@ -172,16 +172,17 @@ pub use tinychannels_bus::config::{ }; pub use tokenjuice::TokenjuiceConfig; pub use tools::{ - BrowserConfig, ComposioConfig, ComposioDirectBaseUrls, ComposioHostCredential, CurlConfig, - GitbooksConfig, HttpHeader, HttpRequestConfig, IntegrationToggle, IntegrationsConfig, - LegacySearchInputs, McpAuthConfig, McpClientConfig, McpClientIdentityConfig, McpServerConfig, - McpToolExposure, MultimodalConfig, MultimodalFileConfig, PresentationMode, ProviderRoute, - SearchConfig, SearchEngineCredentials, SearchHostCredential, SearchProviderSettings, - SearxngConfig, SecretsConfig, SeltzConfig, UnknownKeyedSearchProvider, COMPOSIO_MODE_BACKEND, - COMPOSIO_MODE_DIRECT, COMPOSIO_MODE_DISABLED, MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, - SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, - SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, - SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH, + BrowserConfig, BrowserUpstreamProxy, ComposioConfig, ComposioDirectBaseUrls, + ComposioHostCredential, CurlConfig, GitbooksConfig, HttpHeader, HttpRequestConfig, + IntegrationToggle, IntegrationsConfig, LegacySearchInputs, McpAuthConfig, McpClientConfig, + McpClientIdentityConfig, McpServerConfig, McpToolExposure, MultimodalConfig, + MultimodalFileConfig, PresentationMode, ProviderRoute, SearchConfig, SearchEngineCredentials, + SearchHostCredential, SearchProviderSettings, SearxngConfig, SecretsConfig, SeltzConfig, + UnknownKeyedSearchProvider, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT, + COMPOSIO_MODE_DISABLED, MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, + SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, + SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, + SEARCH_ROLE_SEARCH, }; pub use update::{UpdateConfig, UpdateRestartStrategy}; pub use web_chat_config::WebChatConfig; diff --git a/crates/openhuman-core/src/config/schema/tools/browser.rs b/crates/openhuman-core/src/config/schema/tools/browser.rs index 04baf30b73c..56c9e8c68b8 100644 --- a/crates/openhuman-core/src/config/schema/tools/browser.rs +++ b/crates/openhuman-core/src/config/schema/tools/browser.rs @@ -61,6 +61,36 @@ pub struct BrowserConfig { /// placeholder off: a fill or type that carries one is refused. #[serde(default, skip_serializing_if = "Option::is_none")] pub keychain_command: Option, + /// Destination domains the browser reaches through an upstream HTTP + /// proxy, for sites that refuse this machine's own address (a datacenter + /// range, say). Each entry's `domains` match themselves and every + /// subdomain. TinySecurity still authorizes every such destination, and + /// the proxy's own host and port as well; TinyComputer then tunnels with + /// `CONNECT` (`browser.egress.upstream_proxies` in its module config). + /// Applies only with browser egress enforcement (`security-module`). + /// Empty, the default, routes nothing. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub upstream_proxies: Vec, +} + +/// One `[browser] upstream_proxies` entry. `url` is an +/// `http://user:password@host:port` proxy URL with percent-encoded +/// credentials; it is never logged, and `Debug` leaves it out. +#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] +pub struct BrowserUpstreamProxy { + /// Destination domains routed through this proxy, such as `reddit.com`. + pub domains: Vec, + /// The proxy URL. Only `http://` proxies are supported. + pub url: String, +} + +impl std::fmt::Debug for BrowserUpstreamProxy { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("BrowserUpstreamProxy") + .field("domains", &self.domains) + .field("url", &"[REDACTED]") + .finish() + } } /// Action kinds `[browser] unattended_actions` may name: the gated direct @@ -159,6 +189,7 @@ impl Default for BrowserConfig { unattended_actions: Vec::new(), learn_from_tasks: true, keychain_command: None, + upstream_proxies: Vec::new(), } } } diff --git a/crates/openhuman-core/src/config/schema/tools/browser_tests.rs b/crates/openhuman-core/src/config/schema/tools/browser_tests.rs index fbc171e7e9a..70a6f64768f 100644 --- a/crates/openhuman-core/src/config/schema/tools/browser_tests.rs +++ b/crates/openhuman-core/src/config/schema/tools/browser_tests.rs @@ -82,3 +82,38 @@ fn an_allowed_kind_resolves_to_its_static_canonical_name() { assert_eq!(config.unattended_kind("click"), None); assert_eq!(config.unattended_kind("#secret selector"), None); } + +#[test] +fn upstream_proxies_parse_from_toml_and_default_to_none() { + let parsed: BrowserConfig = toml::from_str( + r#"upstream_proxies = [{ domains = ["reddit.com", "redd.it"], url = "http://user:hunter2@gate.example:7000" }]"#, + ) + .unwrap(); + assert_eq!( + parsed.upstream_proxies, + vec![BrowserUpstreamProxy { + domains: vec!["reddit.com".into(), "redd.it".into()], + url: "http://user:hunter2@gate.example:7000".into(), + }] + ); + let absent: BrowserConfig = toml::from_str("enabled = true").unwrap(); + assert!(absent.upstream_proxies.is_empty()); + // Unset, the key is not written back. + let written = toml::to_string(&BrowserConfig::default()).unwrap(); + assert!(!written.contains("upstream_proxies")); +} + +#[test] +fn an_upstream_proxy_url_never_appears_in_debug_output() { + let config = BrowserConfig { + upstream_proxies: vec![BrowserUpstreamProxy { + domains: vec!["reddit.com".into()], + url: "http://user:hunter2@gate.example:7000".into(), + }], + ..BrowserConfig::default() + }; + let debug = format!("{config:?}"); + assert!(!debug.contains("hunter2")); + assert!(!debug.contains("gate.example")); + assert!(debug.contains("reddit.com")); +} diff --git a/crates/openhuman-core/src/config/schema/tools/mod.rs b/crates/openhuman-core/src/config/schema/tools/mod.rs index 3ee5094ae66..724f23d98f9 100644 --- a/crates/openhuman-core/src/config/schema/tools/mod.rs +++ b/crates/openhuman-core/src/config/schema/tools/mod.rs @@ -7,7 +7,7 @@ pub mod mcp; pub mod multimodal; pub mod search; -pub use browser::BrowserConfig; +pub use browser::{BrowserConfig, BrowserUpstreamProxy}; pub use http::{CurlConfig, HttpRequestConfig}; pub use integrations::{ ComposioConfig, ComposioDirectBaseUrls, ComposioHostCredential, IntegrationToggle, diff --git a/crates/openhuman-core/src/modules/browser_egress_host.rs b/crates/openhuman-core/src/modules/browser_egress_host.rs index e76522451e3..6e56402777a 100644 --- a/crates/openhuman-core/src/modules/browser_egress_host.rs +++ b/crates/openhuman-core/src/modules/browser_egress_host.rs @@ -37,19 +37,35 @@ fn registered_scopes() -> &'static parking_lot::Mutex> { pub(crate) const BROWSER_POLICY_ALIAS: &str = "openhuman-browser-egress"; pub(crate) const BROWSER_POLICY_ALIAS_GENERATION: u64 = 1; -/// The `browser.egress` value TinyComputer is loaded and refreshed with. -pub(crate) fn browser_dial_alias() -> Value { - serde_json::json!({ +/// The `browser.egress` value TinyComputer is loaded and refreshed with: the +/// stable alias, plus `[browser] upstream_proxies` when any are configured. +/// Those stay in this host-private section because their URLs carry +/// credentials; every dial they cause, the proxy's own included, still comes +/// back through [`BrowserEgressHost::authorize`]. +pub(crate) fn browser_dial_alias(config: &crate::config::Config) -> Value { + let mut alias = serde_json::json!({ "policy_id": BROWSER_POLICY_ALIAS, "generation": BROWSER_POLICY_ALIAS_GENERATION, - }) + }); + let upstreams = &config.browser.upstream_proxies; + if !upstreams.is_empty() { + tracing::debug!( + upstream_proxies = upstreams.len(), + "[computer] browser egress routes domains through upstream proxies" + ); + alias["upstream_proxies"] = upstreams + .iter() + .map(|proxy| serde_json::json!({ "url": proxy.url, "domains": proxy.domains })) + .collect(); + } + alias } /// Make sure the browser's destination-only policy is registered for this /// host context, then return the stable alias for TinyComputer config. pub(crate) async fn browser_dial_config(config: &crate::config::Config) -> Result { current_browser_policy(config).await?; - Ok(browser_dial_alias()) + Ok(browser_dial_alias(config)) } /// The id and generation of the current browser policy, registering a new one diff --git a/crates/openhuman-core/src/modules/browser_egress_host_tests.rs b/crates/openhuman-core/src/modules/browser_egress_host_tests.rs index 712eef37a97..edae5c8ec3f 100644 --- a/crates/openhuman-core/src/modules/browser_egress_host_tests.rs +++ b/crates/openhuman-core/src/modules/browser_egress_host_tests.rs @@ -170,10 +170,34 @@ fn owner() -> tinysecurity_bus::SubjectScope { fn the_config_names_a_stable_alias_not_the_rotating_policy() { // TinyBus fixes TinyComputer's config at load; a policy id in it would // change at the first re-registration and every refresh would be refused. - let alias = browser_dial_alias(); + let config = crate::config::Config::default(); + let alias = browser_dial_alias(&config); assert_eq!(alias["policy_id"], BROWSER_POLICY_ALIAS); assert_eq!(alias["generation"], BROWSER_POLICY_ALIAS_GENERATION); - assert_eq!(alias, browser_dial_alias()); + assert_eq!(alias, browser_dial_alias(&config)); + // With nothing routed the section holds exactly the alias, which every + // TinyComputer release accepts. + assert_eq!(alias.as_object().unwrap().len(), 2); +} + +#[test] +fn configured_upstream_proxies_ride_in_the_private_egress_section() { + let mut config = crate::config::Config::default(); + config.browser.upstream_proxies = vec![crate::config::schema::BrowserUpstreamProxy { + domains: vec!["reddit.com".into(), "redd.it".into()], + url: "http://resi:secret@gate.example:7000".into(), + }]; + let alias = browser_dial_alias(&config); + assert_eq!(alias["policy_id"], BROWSER_POLICY_ALIAS); + assert_eq!( + alias["upstream_proxies"], + serde_json::json!([{ + "url": "http://resi:secret@gate.example:7000", + "domains": ["reddit.com", "redd.it"], + }]) + ); + // Stable bytes: TinyBus refuses a callback-bound refresh that differs. + assert_eq!(alias, browser_dial_alias(&config)); } #[test] diff --git a/crates/openhuman-core/src/modules/desktop_tests.rs b/crates/openhuman-core/src/modules/desktop_tests.rs index c4d883da727..bca1273749f 100644 --- a/crates/openhuman-core/src/modules/desktop_tests.rs +++ b/crates/openhuman-core/src/modules/desktop_tests.rs @@ -206,7 +206,7 @@ async fn the_callback_bound_load_config_is_what_every_refresh_pushes() { let mut refreshed = module_config(&config).await; inject_security_browser_config( &mut refreshed, - crate::modules::browser_egress_host::browser_dial_alias(), + crate::modules::browser_egress_host::browser_dial_alias(&config), ":1.42", ); diff --git a/crates/openhuman-core/src/modules/ops.rs b/crates/openhuman-core/src/modules/ops.rs index b6d12d97de7..0e00c1beb3d 100644 --- a/crates/openhuman-core/src/modules/ops.rs +++ b/crates/openhuman-core/src/modules/ops.rs @@ -391,7 +391,7 @@ pub(super) async fn computer_callback_config( let mut module_config = module_config(config, id).await; super::desktop::inject_security_browser_config( &mut module_config, - super::browser_egress_host::browser_dial_alias(), + super::browser_egress_host::browser_dial_alias(config), callback_destination, ); module_config diff --git a/crates/openhuman-core/src/modules/registry/records_computer.rs b/crates/openhuman-core/src/modules/registry/records_computer.rs index 01f2ec1534a..5673d942180 100644 --- a/crates/openhuman-core/src/modules/registry/records_computer.rs +++ b/crates/openhuman-core/src/modules/registry/records_computer.rs @@ -8,112 +8,112 @@ pub(crate) const TINYCOMPUTER: ModuleRecord = ModuleRecord { description: "Permission-aware desktop and browser observation and control", bus_name: names::INTERFACE, object_path: names::OBJECT_PATH, - version: "0.18.0", - release_url: "https://github.com/tinyhumansai/tinycomputer/releases/tag/v0.18.0", + version: "0.19.0", + release_url: "https://github.com/tinyhumansai/tinycomputer/releases/tag/v0.19.0", // All seventeen published archives were checked against checksum.toml // and GitHub asset digests before pinning. Linux permission probes are // part of the shipped voice surface alongside macOS and Windows. assets: &[ PlatformAsset { host_key: "archlinux-arm64", - archive: "tinycomputer-0.18.0-archlinux-arm64.tar.gz", - sha256: "32ed1e7d7eb3ed93496752d3342bb28b02d302e2425a3bfa3d3c65b8b306060f", + archive: "tinycomputer-0.19.0-archlinux-arm64.tar.gz", + sha256: "ea4a12c51ce892079d1e6b1fd9b953abb0c60e086647b30d897995fda0461d19", library_sha256: None, }, PlatformAsset { host_key: "archlinux-x86_64", - archive: "tinycomputer-0.18.0-archlinux-x86_64.tar.gz", - sha256: "6ba9df62f52ab4f23552ed2e12ff0bbabc16d7d076a20589c6be646f175bf735", + archive: "tinycomputer-0.19.0-archlinux-x86_64.tar.gz", + sha256: "3a91ce5c644e24e9e83acbbc4d74d4a76a78206b2eab2ebdadf9f6995249dd77", library_sha256: None, }, PlatformAsset { host_key: "fedora-43-arm64", - archive: "tinycomputer-0.18.0-fedora-43-arm64.tar.gz", - sha256: "9252d5f7dc27297f71a0187b57fe82fc17595b38937bda0a242700e54db52757", + archive: "tinycomputer-0.19.0-fedora-43-arm64.tar.gz", + sha256: "a9257c5347c7fe4a6a0579298ab7a2a03f655faf542b7689dfbd137ab2a486a2", library_sha256: None, }, PlatformAsset { host_key: "fedora-43-x86_64", - archive: "tinycomputer-0.18.0-fedora-43-x86_64.tar.gz", - sha256: "c634e7380ae1dddd04cdd45b0ef8e84dea7e15c0be4dcddf5ad2157fcfb86252", + archive: "tinycomputer-0.19.0-fedora-43-x86_64.tar.gz", + sha256: "025e999d6cd489e0749676757d7780980ff3c5fea7fe94d85bae294ea9fc5b3b", library_sha256: None, }, PlatformAsset { host_key: "fedora-44-arm64", - archive: "tinycomputer-0.18.0-fedora-44-arm64.tar.gz", - sha256: "acf92a651670614ccefaadd104b7d0e1701eb82fb838abd4ab5a05fbc6684a51", + archive: "tinycomputer-0.19.0-fedora-44-arm64.tar.gz", + sha256: "a2620a91a090b39601ce9184392d767c5ab4a6a285b315c99e88713489d52258", library_sha256: None, }, PlatformAsset { host_key: "fedora-44-x86_64", - archive: "tinycomputer-0.18.0-fedora-44-x86_64.tar.gz", - sha256: "a1ce13fd3c6b9e99730c92e3bf2c4edf41bcc4dd7f4259ced9417f0f1107fc39", + archive: "tinycomputer-0.19.0-fedora-44-x86_64.tar.gz", + sha256: "be9af3bc9f8da9fa16f62a6e0116e05282071990365524b81c2fac83198bf682", library_sha256: None, }, PlatformAsset { host_key: "macos-15-arm64", - archive: "tinycomputer-0.18.0-macos-15-arm64.tar.gz", - sha256: "99a078dd03d3d444e51fcb7c12d3554929b0f6a8c9acb6b3cfb9d7f49040cf35", + archive: "tinycomputer-0.19.0-macos-15-arm64.tar.gz", + sha256: "9730bdd2feae352d04817c4fec22ee29928a254985000c885706178c5acb94a4", library_sha256: None, }, PlatformAsset { host_key: "macos-15-x86_64", - archive: "tinycomputer-0.18.0-macos-15-x86_64.tar.gz", - sha256: "eda9edca053a42fb82e06ba5a2a8b3dd873bc3e8d3d1be86a032787350b8a6dd", + archive: "tinycomputer-0.19.0-macos-15-x86_64.tar.gz", + sha256: "6645458507757c41e67269e6653da49f9908e831159447743c8f9e120ae6a550", library_sha256: None, }, PlatformAsset { host_key: "macos-26-arm64", - archive: "tinycomputer-0.18.0-macos-26-arm64.tar.gz", - sha256: "06b3fbdc70520ecf8bc131f67bc5c7104af06a54bcb989b379ce3cd39491073f", + archive: "tinycomputer-0.19.0-macos-26-arm64.tar.gz", + sha256: "56ca22e19b2e937ca2ab9416a73c82faa5ecf57701c9d1b781d922382e85a593", library_sha256: None, }, PlatformAsset { host_key: "macos-26-x86_64", - archive: "tinycomputer-0.18.0-macos-26-x86_64.tar.gz", - sha256: "69d20c98997cbed3a0198076b1a3ccea127959585b2245abcd130c9de19567b1", + archive: "tinycomputer-0.19.0-macos-26-x86_64.tar.gz", + sha256: "89ee27db6560645f205d2d32085d739b12f58d375a9a84110e68c4b1a2ba8b53", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-22.04-arm64", - archive: "tinycomputer-0.18.0-ubuntu-22.04-arm64.tar.gz", - sha256: "0e752ce55fe488e5372242a064857ed9e2733f6be11b223a179e40aa8003bc1e", + archive: "tinycomputer-0.19.0-ubuntu-22.04-arm64.tar.gz", + sha256: "4153e966cf6d5a0482367eaff213106f005b31045a250437edf1c7daa8e321cf", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-22.04-x86_64", - archive: "tinycomputer-0.18.0-ubuntu-22.04-x86_64.tar.gz", - sha256: "976fdcb8e3406886bad35a6743ab56783989db67d9ab22669b04033397cadeae", + archive: "tinycomputer-0.19.0-ubuntu-22.04-x86_64.tar.gz", + sha256: "21a5886f79670706ff7aa31d3a8136723046283d79837ab6ba7efd0330fd6295", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-24.04-arm64", - archive: "tinycomputer-0.18.0-ubuntu-24.04-arm64.tar.gz", - sha256: "ec20f09440218efe9f29080f59fcf9dba94a25fe3532d53580204b57059937be", + archive: "tinycomputer-0.19.0-ubuntu-24.04-arm64.tar.gz", + sha256: "4568ee593e006300320ec0e68d524325b0bd33f0f774df8da83eb0de005e2cc2", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-24.04-x86_64", - archive: "tinycomputer-0.18.0-ubuntu-24.04-x86_64.tar.gz", - sha256: "6cb3141cb850f308fc63ecb441e18cd727b26591f59c379fe317c5a2d13e95ec", + archive: "tinycomputer-0.19.0-ubuntu-24.04-x86_64.tar.gz", + sha256: "087e0f80858d7641ee2c925d86cde4d6e47f0260f7182fdddbb98a34af560f84", library_sha256: None, }, PlatformAsset { host_key: "windows-11-arm64", - archive: "tinycomputer-0.18.0-windows-11-arm64.zip", - sha256: "f3046dfea2ed3e048ec46acf2511c40262c210c564335e496aa7d418d27deb9b", + archive: "tinycomputer-0.19.0-windows-11-arm64.zip", + sha256: "eda643fe7dac2452aa7a7f9827b389f0479e7867af65306ed7ebb6ec900167a6", library_sha256: None, }, PlatformAsset { host_key: "windows-2022-x86_64", - archive: "tinycomputer-0.18.0-windows-2022-x86_64.zip", - sha256: "5915fd327a657dfd47f1402bcb21006e3e3a72d41cab176aac7614d9cfb20d12", + archive: "tinycomputer-0.19.0-windows-2022-x86_64.zip", + sha256: "82f94ba13a0dfe11e6bc663d19f0791f1dcaba30952adcc3c24fb5804c11070e", library_sha256: None, }, PlatformAsset { host_key: "windows-2025-x86_64", - archive: "tinycomputer-0.18.0-windows-2025-x86_64.zip", - sha256: "a170cd5f27eb0db06a0852b045a29f9e205c87e6c69df929174972f1f2e04d9c", + archive: "tinycomputer-0.19.0-windows-2025-x86_64.zip", + sha256: "7269870c6abf98aa57f2076156ba8888cbc7be6eaa96274cd4a49f3d135e4e9f", library_sha256: None, }, ], diff --git a/crates/openhuman-core/src/modules/registry_computer_release_tests.rs b/crates/openhuman-core/src/modules/registry_computer_release_tests.rs index c64e6c918d1..bb9eb507842 100644 --- a/crates/openhuman-core/src/modules/registry_computer_release_tests.rs +++ b/crates/openhuman-core/src/modules/registry_computer_release_tests.rs @@ -5,7 +5,7 @@ fn tinycomputer_registry_matches_bus_contract_and_published_release() { let desktop = find("tinycomputer").expect("compiled computer module"); assert_eq!(desktop.bus_name, tinycomputer_bus::names::INTERFACE); assert_eq!(desktop.object_path, tinycomputer_bus::names::OBJECT_PATH); - assert_eq!(desktop.version, "0.18.0"); + assert_eq!(desktop.version, "0.19.0"); assert_eq!(tinycomputer_bus::CONTRACT_VERSION, (3, 3)); let mut actual = desktop @@ -16,88 +16,88 @@ fn tinycomputer_registry_matches_bus_contract_and_published_release() { let mut published = [ ( "archlinux-arm64", - "tinycomputer-0.18.0-archlinux-arm64.tar.gz", - "32ed1e7d7eb3ed93496752d3342bb28b02d302e2425a3bfa3d3c65b8b306060f", + "tinycomputer-0.19.0-archlinux-arm64.tar.gz", + "ea4a12c51ce892079d1e6b1fd9b953abb0c60e086647b30d897995fda0461d19", ), ( "archlinux-x86_64", - "tinycomputer-0.18.0-archlinux-x86_64.tar.gz", - "6ba9df62f52ab4f23552ed2e12ff0bbabc16d7d076a20589c6be646f175bf735", + "tinycomputer-0.19.0-archlinux-x86_64.tar.gz", + "3a91ce5c644e24e9e83acbbc4d74d4a76a78206b2eab2ebdadf9f6995249dd77", ), ( "fedora-43-arm64", - "tinycomputer-0.18.0-fedora-43-arm64.tar.gz", - "9252d5f7dc27297f71a0187b57fe82fc17595b38937bda0a242700e54db52757", + "tinycomputer-0.19.0-fedora-43-arm64.tar.gz", + "a9257c5347c7fe4a6a0579298ab7a2a03f655faf542b7689dfbd137ab2a486a2", ), ( "fedora-43-x86_64", - "tinycomputer-0.18.0-fedora-43-x86_64.tar.gz", - "c634e7380ae1dddd04cdd45b0ef8e84dea7e15c0be4dcddf5ad2157fcfb86252", + "tinycomputer-0.19.0-fedora-43-x86_64.tar.gz", + "025e999d6cd489e0749676757d7780980ff3c5fea7fe94d85bae294ea9fc5b3b", ), ( "fedora-44-arm64", - "tinycomputer-0.18.0-fedora-44-arm64.tar.gz", - "acf92a651670614ccefaadd104b7d0e1701eb82fb838abd4ab5a05fbc6684a51", + "tinycomputer-0.19.0-fedora-44-arm64.tar.gz", + "a2620a91a090b39601ce9184392d767c5ab4a6a285b315c99e88713489d52258", ), ( "fedora-44-x86_64", - "tinycomputer-0.18.0-fedora-44-x86_64.tar.gz", - "a1ce13fd3c6b9e99730c92e3bf2c4edf41bcc4dd7f4259ced9417f0f1107fc39", + "tinycomputer-0.19.0-fedora-44-x86_64.tar.gz", + "be9af3bc9f8da9fa16f62a6e0116e05282071990365524b81c2fac83198bf682", ), ( "macos-15-arm64", - "tinycomputer-0.18.0-macos-15-arm64.tar.gz", - "99a078dd03d3d444e51fcb7c12d3554929b0f6a8c9acb6b3cfb9d7f49040cf35", + "tinycomputer-0.19.0-macos-15-arm64.tar.gz", + "9730bdd2feae352d04817c4fec22ee29928a254985000c885706178c5acb94a4", ), ( "macos-15-x86_64", - "tinycomputer-0.18.0-macos-15-x86_64.tar.gz", - "eda9edca053a42fb82e06ba5a2a8b3dd873bc3e8d3d1be86a032787350b8a6dd", + "tinycomputer-0.19.0-macos-15-x86_64.tar.gz", + "6645458507757c41e67269e6653da49f9908e831159447743c8f9e120ae6a550", ), ( "macos-26-arm64", - "tinycomputer-0.18.0-macos-26-arm64.tar.gz", - "06b3fbdc70520ecf8bc131f67bc5c7104af06a54bcb989b379ce3cd39491073f", + "tinycomputer-0.19.0-macos-26-arm64.tar.gz", + "56ca22e19b2e937ca2ab9416a73c82faa5ecf57701c9d1b781d922382e85a593", ), ( "macos-26-x86_64", - "tinycomputer-0.18.0-macos-26-x86_64.tar.gz", - "69d20c98997cbed3a0198076b1a3ccea127959585b2245abcd130c9de19567b1", + "tinycomputer-0.19.0-macos-26-x86_64.tar.gz", + "89ee27db6560645f205d2d32085d739b12f58d375a9a84110e68c4b1a2ba8b53", ), ( "ubuntu-22.04-arm64", - "tinycomputer-0.18.0-ubuntu-22.04-arm64.tar.gz", - "0e752ce55fe488e5372242a064857ed9e2733f6be11b223a179e40aa8003bc1e", + "tinycomputer-0.19.0-ubuntu-22.04-arm64.tar.gz", + "4153e966cf6d5a0482367eaff213106f005b31045a250437edf1c7daa8e321cf", ), ( "ubuntu-22.04-x86_64", - "tinycomputer-0.18.0-ubuntu-22.04-x86_64.tar.gz", - "976fdcb8e3406886bad35a6743ab56783989db67d9ab22669b04033397cadeae", + "tinycomputer-0.19.0-ubuntu-22.04-x86_64.tar.gz", + "21a5886f79670706ff7aa31d3a8136723046283d79837ab6ba7efd0330fd6295", ), ( "ubuntu-24.04-arm64", - "tinycomputer-0.18.0-ubuntu-24.04-arm64.tar.gz", - "ec20f09440218efe9f29080f59fcf9dba94a25fe3532d53580204b57059937be", + "tinycomputer-0.19.0-ubuntu-24.04-arm64.tar.gz", + "4568ee593e006300320ec0e68d524325b0bd33f0f774df8da83eb0de005e2cc2", ), ( "ubuntu-24.04-x86_64", - "tinycomputer-0.18.0-ubuntu-24.04-x86_64.tar.gz", - "6cb3141cb850f308fc63ecb441e18cd727b26591f59c379fe317c5a2d13e95ec", + "tinycomputer-0.19.0-ubuntu-24.04-x86_64.tar.gz", + "087e0f80858d7641ee2c925d86cde4d6e47f0260f7182fdddbb98a34af560f84", ), ( "windows-11-arm64", - "tinycomputer-0.18.0-windows-11-arm64.zip", - "f3046dfea2ed3e048ec46acf2511c40262c210c564335e496aa7d418d27deb9b", + "tinycomputer-0.19.0-windows-11-arm64.zip", + "eda643fe7dac2452aa7a7f9827b389f0479e7867af65306ed7ebb6ec900167a6", ), ( "windows-2022-x86_64", - "tinycomputer-0.18.0-windows-2022-x86_64.zip", - "5915fd327a657dfd47f1402bcb21006e3e3a72d41cab176aac7614d9cfb20d12", + "tinycomputer-0.19.0-windows-2022-x86_64.zip", + "82f94ba13a0dfe11e6bc663d19f0791f1dcaba30952adcc3c24fb5804c11070e", ), ( "windows-2025-x86_64", - "tinycomputer-0.18.0-windows-2025-x86_64.zip", - "a170cd5f27eb0db06a0852b045a29f9e205c87e6c69df929174972f1f2e04d9c", + "tinycomputer-0.19.0-windows-2025-x86_64.zip", + "7269870c6abf98aa57f2076156ba8888cbc7be6eaa96274cd4a49f3d135e4e9f", ), ]; assert_eq!(desktop.assets.len(), published.len()); diff --git a/docs/gitbooks/en/developing/tinycomputer-docker.md b/docs/gitbooks/en/developing/tinycomputer-docker.md index b4f12eae682..0be1f24856b 100644 --- a/docs/gitbooks/en/developing/tinycomputer-docker.md +++ b/docs/gitbooks/en/developing/tinycomputer-docker.md @@ -175,3 +175,40 @@ turn** may take without that approval: `task_step` waves through steps the task controller itself marks irreversible, such as sending, submitting or deleting. List it only for jobs whose prompt and allowed websites you control. + +## 5. Sites that refuse a datacenter address + +Some sites block whole datacenter ranges. Reddit, for one, answers every page +from a cloud VM with "You've been blocked by network security". To fix that, +`[browser] upstream_proxies` routes chosen domains through an upstream HTTP +proxy, such as a residential or mobile exit: + +```toml +[browser] +upstream_proxies = [ + { domains = ["reddit.com", "redd.it", "redditstatic.com", "redditmedia.com"], url = "http://user:password@proxy.example:8000" }, +] +``` + +- A domain matches itself and every subdomain. Every other host is still + dialed directly. +- Routing never bypasses policy. TinySecurity authorizes each routed page + exactly as it would a direct one, and the never-open list still applies. + The proxy's own host and port also go through TinySecurity's browser dial + authorization before TinyComputer opens a socket to them. TinyComputer then + asks the proxy for a `CONNECT` tunnel to an address TinySecurity approved + for the page's host, so the proxy resolves nothing. The browser's `Host` + header and TLS SNI pass through the tunnel unchanged. Plain `http://` + pages use the same tunnel. +- Only `http://` proxy URLs work. Percent-encode any `@`, `:` or `/` in the + user name or password. The credentials go to the proxy as + `Proxy-Authorization: Basic`. +- The URL is a credential. It reaches TinyComputer only in its host-private + `browser.egress` section. It is redacted from the config snapshot and from + debug output, and it is never logged. Keep `config.toml` readable by the + core's user only. +- This works only with browser egress enforcement on, which is the default + build with `security-module`. Changing the list takes effect on the next + core start. +- A proxy that rejects the credentials (`407`) or refuses the tunnel makes the + page fail with `502`. The core log names only the status. diff --git a/vendor/tinycomputer b/vendor/tinycomputer index 54aea142427..6d7624fb225 160000 --- a/vendor/tinycomputer +++ b/vendor/tinycomputer @@ -1 +1 @@ -Subproject commit 54aea142427d384aa38301c10d24038a1010acca +Subproject commit 6d7624fb225ba2453d4cdaf48a31d22511703e77