Setup Proxy for Fedora Package Manager - DNF
For various reasons, we may want let dnf run behind a proxy for some repos, or all repos. Here is a simple and effecient way that can sovle this problem.
The behavior of dnf is controlled by
/etc/dnf/dnf.conf, where we will do with dnf. The solution is simple, adding the following lines into
There are serveral proxy types that dnf supports: http, https, socks5, socks5h, socks4, ftp, socks4a. For a socks5 proxy,
Then all network traffic from dnf will go through a proxy.
In the meanwhile, what if we just want set proxy for some a repo?
One can just add the proxy part to the specific repo like google-chrome.repo.
That’s all and feel free with dnf.