Add a extra key value in [main]
section right after proxy settings like this
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
proxy=http://x.x.x.x:8080
proxy_username=username
proxy_password=password
proxy_auth_method=basic
and then try
dnf update
It will work, comment if didn't.