proxy_cfg

Crates.ioproxy_cfg
lib.rsproxy_cfg
version0.4.1
sourcesrc
created_at2019-04-15 13:36:34.862401
updated_at2022-01-24 21:28:33.670378
descriptionA library to get proxy configuration from the OS.
homepage
repositoryhttps://github.com/devolutions/proxy-cfg
max_upload_size
id128106
size53,807
(devolutionsinfra)

documentation

https://docs.rs/proxy_cfg

README

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.

Commit count: 46

cargo fmt