mac_proxy

Crates.iomac_proxy
lib.rsmac_proxy
version0.1.0
sourcesrc
created_at2023-07-21 13:09:21.09357
updated_at2023-07-21 13:09:21.09357
descriptionA library for Rust to fetch the proxy settings on MacOS
homepage
repositoryhttps://github.com/vincentdchan/mac_proxy
max_upload_size
id922401
size105,289
Vincent Chan (vincentdchan)

documentation

README

mac_proxy

This is a crate for Rust to fetch the proxy settings on MacOS.

Install

cargo add mac_procy

Usage

let settings = mac_procy::mac_proxy_settings()

Result

{
  "ExceptionsList": [
    "192.168.0.0/16",
    "10.0.0.0/8",
    "172.16.0.0/12",
    "127.0.0.1",
    "localhost",
    "*.local",
    "timestamp.apple.com",
    "sequoia.apple.com",
    "seed-sequoia.siri.apple.com"
  ],
  "ExcludeSimpleHostnames": 0,
  "HTTPEnable": 1,
  "HTTPPort": 7890,
  "HTTPProxy": "127.0.0.1",
  "HTTPSEnable": 1,
  "HTTPSPort": 7890,
  "HTTPSProxy": "127.0.0.1",
  "ProxyAutoConfigEnable": 0,
  "SOCKSEnable": 1,
  "SOCKSPort": 7890,
  "SOCKSProxy": "127.0.0.1",
  "__SCOPED__": {
    "en0": {
      "ExceptionsList": [
        "192.168.0.0/16",
        "10.0.0.0/8",
        "172.16.0.0/12",
        "127.0.0.1",
        "localhost",
        "*.local",
        "timestamp.apple.com",
        "sequoia.apple.com",
        "seed-sequoia.siri.apple.com"
      ],
      "ExcludeSimpleHostnames": 0,
      "HTTPEnable": 1,
      "HTTPPort": 7890,
      "HTTPProxy": "127.0.0.1",
      "HTTPSEnable": 1,
      "HTTPSPort": 7890,
      "HTTPSProxy": "127.0.0.1",
      "ProxyAutoConfigEnable": 0,
      "SOCKSEnable": 1,
      "SOCKSPort": 7890,
      "SOCKSProxy": "127.0.0.1"
    },
    "en1": {
      "ExceptionsList": [
        "192.168.0.0/16",
        "10.0.0.0/8",
        "172.16.0.0/12",
        "127.0.0.1",
        "localhost",
        "*.local",
        "timestamp.apple.com",
        "sequoia.apple.com",
        "seed-sequoia.siri.apple.com"
      ],
      "ExcludeSimpleHostnames": 0,
      "HTTPEnable": 1,
      "HTTPPort": 7890,
      "HTTPProxy": "127.0.0.1",
      "HTTPSEnable": 1,
      "HTTPSPort": 7890,
      "HTTPSProxy": "127.0.0.1",
      "ProxyAutoConfigEnable": 0,
      "SOCKSEnable": 1,
      "SOCKSPort": 7890,
      "SOCKSProxy": "127.0.0.1"
    }
  }
}
Commit count: 4

cargo fmt