mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-07-05 04:27:49 +02:00
feat: extension management
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user