How to specify that Yum should not use proxy for specific domain


Is it possible to specify domain for which yum should bypass proxy configuration ?
I'm afraid this is not possible…

I read that it was possible to use the environment variable HTTP_PROXY then NO_PROXY, is it the most elegant solution?


I tried the solution with the environment variables:

export HTTP_PROXY=http://user:pass@host:port
export http_proxy=http://user:pass@host:port
export no_proxy=.domain
export NO_PROXY=.domain

Yum uses proxy but the repos *.domain are not bypassed.


Using I can configure which domain should be ignore. But this wotks only with proxy that requires NTLM authentication…

Best Answer

I have not been able to get this to work using environment variables as you describe here. Yum does support proxies itself, however, and you should be able to do something like this:


Into yum.conf and then adding


Into the repo definitions you don't want to access via the global proxy. This is detailed (albeit succinctly) in the yum.conf man page.