You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
*.example.com in NO_PROXY never bypasses the proxy #1276
NO_PROXY entries written as *.example.com have no effect. Requests to subdomains of example.com still go through the proxy, and no error is raised.
get_environment_proxies() prepends * to every plain hostname entry, so *.example.com becomes the mount key all://**.example.com. URLPattern then escapes the remaining * and builds the regex ^(.+\.)?\*\.example\.com$, which matches no real hostname.
importosimporthttpx2os.environ["HTTPS_PROXY"] ="http://proxy.invalid:3128"os.environ["NO_PROXY"] ="*.example.com"print(httpx2._utils.get_environment_proxies())
# {'https://': 'http://proxy.invalid:3128', 'all://**.example.com': None}client=httpx2.Client()
print(client._transport_for_url(httpx2.URL("https://www.example.com")))
# The proxy transport, not the direct one.
The *. form is common in NO_PROXY values (it is what the Windows and macOS bypass lists use, and many corporate setups copy it into the environment). Go's net/http treats *.example.com the same as .example.com, which matches subdomains only. NO_PROXY=.example.com already works that way in HTTPX2.
Activity