feat: extension management

This commit is contained in:
zhom
2026-03-02 07:26:42 +04:00
parent a723c8b30b
commit 8a96d18e46
36 changed files with 3915 additions and 86 deletions
+8
View File
@@ -1192,6 +1192,7 @@ impl ProxyManager {
proxy_settings: Option<&ProxySettings>,
browser_pid: u32,
profile_id: Option<&str>,
bypass_rules: Vec<String>,
) -> Result<ProxySettings, String> {
if let Some(name) = profile_id {
// Check if we have an active proxy recorded for this profile
@@ -1312,6 +1313,13 @@ impl ProxyManager {
proxy_cmd = proxy_cmd.arg("--profile-id").arg(id);
}
// Add bypass rules if any
if !bypass_rules.is_empty() {
let rules_json = serde_json::to_string(&bypass_rules)
.map_err(|e| format!("Failed to serialize bypass rules: {e}"))?;
proxy_cmd = proxy_cmd.arg("--bypass-rules").arg(rules_json);
}
// Execute the command and wait for it to complete
// The donut-proxy binary should start the worker and then exit
let output = proxy_cmd