proxyconfig

Crates.ioproxyconfig
lib.rsproxyconfig
version0.1.1
sourcesrc
created_at2023-10-18 15:15:42.606696
updated_at2023-10-18 15:21:10.572934
descriptionThis is a simple library to help you get the proxy configuration from the system.
homepagehttps://github.com/dragit-git/proxy_config
repositoryhttps://github.com/dragit-git/proxy_config
max_upload_size
id1006875
size33,245
BppleMan (BppleMan)

documentation

README

Proxy Config

This is a simple library to help you get the proxy configuration from the system.

Why

Usually you can get the proxy configuration through environment variables

Such as

  • http_proxy
  • https_proxy
  • all_proxy
  • no_proxy
  • etc.

But in a GUI environment?

The environment variables are not always inherited to the shell

And when you use some proxy software with gui, such as clash/surge

They will not set the proxy to environment variables for system's desktop, but directly sets the proxy configuration for the system's desktop manager

Usage

[dependencies]
proxyconfig = "0.1"
use proxyconfig::{ProxyConfig, ProxyConfigProvider};

let proxy_config = ProxyConfig::try_get().unwrap();

Supported Platforms

  • macOS
  • Linux with GNOME
  • Windows
Commit count: 6

cargo fmt