mirror of
https://github.com/openai/codex.git
synced 2026-11-22 07:13:50 +00:00
Respect system proxies during plugin startup sync (#34506)
## Why The curated plugin startup sync can fall back from Git to HTTP, but those requests did not use Codex's effective outbound proxy policy. ## What changed - Thread the configured HTTP client factory into curated plugin sync. - Route GitHub API, zipball, backup metadata, and returned download URLs through the route-aware client when system proxy support is enabled. - Preserve the existing default HTTP client behavior, including its custom CA fallback, when system proxy support is disabled. - Apply the standard Codex headers to startup-sync HTTP requests. ## Testing Add coverage that records route selection for repository, archive, metadata, and backend-supplied download URLs, and verifies standard headers are sent. GitOrigin-RevId: e1ea13bdab58a84c9948a2c8b82a5ec5c964ea99
This commit is contained in:
1 parent
cc875d61ce
commit
94bb6a09a6
17 files changed
+453
-87
No files matched your search
@@ -20,6 +20,7 @@ use crate::startup_sync::curated_plugins_repo_path;
|
||||
use crate::test_support::TEST_CURATED_PLUGIN_CACHE_VERSION;
|
||||
use crate::test_support::TEST_CURATED_PLUGIN_SHA;
|
||||
use crate::test_support::load_plugins_config as load_plugins_config_input;
|
||||
use crate::test_support::test_http_client_factory;
|
||||
use crate::test_support::write_curated_plugin;
|
||||
use crate::test_support::write_curated_plugin_sha_with as write_curated_plugin_sha;
|
||||
use crate::test_support::write_file;
|
||||
@@ -110,6 +111,7 @@ fn plugins_config_input_with_requirements(
|
||||
/*plugins_enabled*/ true,
|
||||
/*remote_plugin_enabled*/ false,
|
||||
String::new(),
|
||||
test_http_client_factory(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2626,6 +2628,7 @@ async fn plugin_cache_ignores_unrelated_session_overrides() {
|
||||
/*plugins_enabled*/ true,
|
||||
/*remote_plugin_enabled*/ false,
|
||||
"https://chatgpt.com".to_string(),
|
||||
test_http_client_factory(),
|
||||
)
|
||||
};
|
||||
let manager = PluginsManager::new(codex_home.path().to_path_buf());
|
||||
@@ -6071,9 +6074,10 @@ fn remote_installed_plugins_cache_refresh_coalesces_materializations() {
|
||||
};
|
||||
let request =
|
||||
|change, on_effective_plugins_changed| RemoteInstalledPluginsCacheRefreshRequest {
|
||||
service_config: RemotePluginServiceConfig {
|
||||
chatgpt_base_url: "https://example.com".to_string(),
|
||||
},
|
||||
service_config: RemotePluginServiceConfig::new(
|
||||
"https://example.com".to_string(),
|
||||
test_http_client_factory(),
|
||||
),
|
||||
auth: None,
|
||||
notify: RemoteInstalledPluginsCacheRefreshNotify::IfCacheChanged,
|
||||
on_effective_plugins_changed: Some(on_effective_plugins_changed),
|
||||
|
||||
Reference in new issue
Block a user