Edit the /etc/dnf/dnf.conf file, adding these parameters in the [main] section:
proxy=http://proxy.compukitty.net:9090
proxy_username=compuk
proxy_password=compukpass
proxy_username and proxy_password are optional, based on your proxy server configuration.