pub fn secure_web_proxy(network: Network, setup: Config<&Address>) -> Result<ExitStatus> {
    let mut cmd = cmd();
    match setup {
        Config::Off => {
            cmd.args(&["-setsecurewebproxystate", network.as_str(), OFF]);
        }
        Config::On => {
            cmd.args(&["-setsecurewebproxystate", network.as_str(), ON]);
        }
        Config::Value(addr) => {
            let mut ops = vec!["-setsecurewebproxy", network.as_str(), addr.host, addr.port];
            if let Some((username, password)) = addr.auth {
                ops.extend_from_slice(&[ON, username, password]);
            }
            cmd.args(&ops);
        }
    }
    cmd.status()
}
/// macOS Proxies: Secure Web Proxy (HTTPS)
macOS Proxies: Secure Web Proxy (HTTPS)
macOS Proxies : Secure Web Proxy ( HTTPS )
pub fn secure_web_proxy(network: Network, setup: Config<&Address>) -> Result<ExitStatus> {
    let mut cmd = cmd();
    match setup {
        Config::Off => {
            cmd.args(&["-setsecurewebproxystate", network.as_str(), OFF]);
        }
        Config::On => {
            cmd.args(&["-setsecurewebproxystate", network.as_str(), ON]);
        }
        Config::Value(addr) => {
            let mut ops = vec!["-setsecurewebproxy", network.as_str(), addr.host, addr.port];
            if let Some((username, password)) = addr.auth {
                ops.extend_from_slice(&[ON, username, password]);
            }
            cmd.args(&ops);
        }
    }
    cmd.status()
}
pub fn secure_web_proxy ( network : Network , setup : Config < & Address > ) -> Result < ExitStatus > { let mut cmd = cmd ( ) ; match setup { Config :: Off => { cmd . args ( & [ " " , network . as_str ( ) , OFF ] ) ; } Config :: On => { cmd . args ( & [ " " , network . as_str ( ) , ON ] ) ; } Config :: Value ( addr ) => { let mut ops = vec ! [ " " network as_str ( ) addr host addr port ] ; if let Some ( ( username , password ) ) = addr . auth { ops . extend_from_slice ( & [ ON , username , password ] ) ; } cmd . args ( & ops ) ; } } cmd . status ( ) }
macOS Proxies: Secure Web Proxy (HTTPS)
macOS Proxies : Secure Web Proxy ( HTTPS )
network
Network
setup
Config<&Address>
network
Network
setup
Config<&Address>