5

Interpretation of the NO_PROXY environment variable doesn't appear to be officially standardised. And most documentation for specific programs is fairly fuzzy about its exact interpretation (e.g. emacs).

This makes it difficult for me to answer one question I was curious about:

Does NO_PROXY=.example.com match all of example.com, subdomain.example.com and sub.domain.example.com?

I want to set the NO_PROXY variable to match a bunch of main domains as well as all sub-domains of those main domains, in as many contexts as possible within my system.

Does anyone know how diverse the implementation of NO_PROXY actually is in practice? To achieve my goal, would I need to specify nothing less than the following for each domain?:

export NO_PROXY=example.com,.example.com,*.example.com
  • have you tried it using curl ? – Felipe Alvarez Jul 11 '18 at 4:42
  • 1
    @FelipeAlvarez I don't remember if I used curl at the time, but curl's implementation is largely irrelevant. I need to set the variable to be correctly interpreted by all clients, not juse curl. – Robin Winslow Jul 11 '18 at 11:58
  • Unfortunate I don't think there is a formal standard. I think each application may interpret it differently. – Felipe Alvarez Jul 12 '18 at 13:34
6

For the the widest acceptance, use .example.com to specify a domain and all of its subdomains. Some implementation accept wildcards, many do not. But I think all support the dot.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.