Skip to main content

Add your description here

Project description

no-proxy

Standalone no_proxy/NO_PROXY parser and evaluator.

Usage

from no_proxy import bypass # More specific functions and types available
from urllib.parse import urlparse

bypass(no_proxy="*", host="example.com") # True
bypass("127.0.0.0/8,::1", "127.0.0.1") # True

my_host = urlparse("//example.com:5000/path?x=y").hostname # example.com
bypass("www.example.com,example.org", my_host) # False

Specification

A no-proxy string is either * or a comma-separated list of no-proxy entries. An IP-address or hostname matches a no-proxy string if the string is * or if any of its entries matches.

A no-proxy entry is either

  • an IP-address, which matches itself,
  • an IP-range, which matches included IP-addresses,
  • a domain with leading ., which matches all of its subdomains, or
  • a hostname, which matches itself.

Hostnames are not validated and there is no special handling of whitespace, trailing dots, ports, etc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

no_proxy-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

no_proxy-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file no_proxy-0.1.0.tar.gz.

File metadata

  • Download URL: no_proxy-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for no_proxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d94942fa1ee1f34b8aca5154881c501b9c9a811de19ba828856b7a752410aaef
MD5 e04cf4a07c5f73da27e43e224dfb0452
BLAKE2b-256 ae7d998ec7f0a9aee9d3290edcb586c0173328f80e789f1e797161db68f1b0d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for no_proxy-0.1.0.tar.gz:

Publisher: release.yaml on bachorp/no-proxy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file no_proxy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: no_proxy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for no_proxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88ed5800661b117f27f7d728be0e66fc9066b01a9a0126d088a58f54c86aaa9a
MD5 5a39c4277865f8f9ec5fc080755862b8
BLAKE2b-256 5781fb1df3c72fcb7924044232651a628ba994cc7aee7350f65c5a631b0d4bb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for no_proxy-0.1.0-py3-none-any.whl:

Publisher: release.yaml on bachorp/no-proxy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page