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

#630 in Operating systems

Download history 166/week @ 2023-11-20 255/week @ 2023-11-27 266/week @ 2023-12-04 336/week @ 2023-12-11 286/week @ 2023-12-18 7/week @ 2023-12-25 59/week @ 2024-01-01 295/week @ 2024-01-08 305/week @ 2024-01-15 565/week @ 2024-01-22 145/week @ 2024-01-29 340/week @ 2024-02-05 331/week @ 2024-02-12 286/week @ 2024-02-19 255/week @ 2024-02-26 301/week @ 2024-03-04

1,187 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

~1.4–2MB
~62K SLoC