Skip to main content

read_prior_auto_proxy

Function read_prior_auto_proxy 

Source
pub fn read_prior_auto_proxy(
    platform: Platform,
    services: &[String],
    gnome: bool,
    our_url: &str,
) -> Vec<PriorAutoProxy>
Expand description

Active macOS network services, as networksetup names them. Read the automatic-proxy configuration that is in place right now.

Called before setup --pac overwrites it, so --undo has something to put back. A target already pointing at our_url is skipped: re-running setup must not record pitchfork’s own PAC file as the value to restore.

Anything unreadable is skipped rather than guessed at. A missing entry means undo switches the proxy off, which is what it did before this was recorded at all.