proxyparser 0.2.0

A cross-platform system proxy detector with strong support for complex enterprise PAC scripts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// src/main.rs
use proxyparser::find_proxy_for_url;
use std::env;

fn main() {
    let args: Vec<String> = env::args().collect();
    let url = args
        .get(1)
        .map(|s| s.as_str())
        .unwrap_or("https://www.google.com");

    match find_proxy_for_url(url) {
        Ok(proxy) => println!("Proxy for {} → {}", url, proxy),
        Err(e) => eprintln!("Error: {}", e),
    }
}