9 releases

0.4.1 Jan 24, 2022
0.4.0 Aug 11, 2021
0.3.6 Apr 8, 2020
0.1.0 Apr 15, 2019

#1764 in Network programming

Download history 302/week @ 2024-07-21 346/week @ 2024-07-28 251/week @ 2024-08-04 290/week @ 2024-08-11 298/week @ 2024-08-18 202/week @ 2024-08-25 181/week @ 2024-09-01 96/week @ 2024-09-08 73/week @ 2024-09-15 115/week @ 2024-09-22 269/week @ 2024-09-29 198/week @ 2024-10-06 119/week @ 2024-10-13 192/week @ 2024-10-20 308/week @ 2024-10-27 339/week @ 2024-11-03

961 downloads per month
Used in 2 crates (via siquery)

MIT/Apache

31KB
663 lines

proxy-cfg

Crates.io Documentation

A Rust library to get proxy configuration from the OS.

Usage

if let Ok(Some(proxy_config)) = proxy_cfg::get_proxy_config() {
    if let Some(proxy_address) = proxy_config.get_proxy_for_url(Url::parse("http://www.google.com").unwrap()) {
        // use proxy_address to connect
    }
}

License

This project is provided under the terms of the Apache License 2.0 or the MIT License, at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~2–3.5MB
~58K SLoC