consider the following connection to a misconfigured .onion hkp backend:
dirmngr: permanently loaded certificates: 0 dirmngr: runtime cached certificates: 0 dirmngr: URL 'http://jirk5u4osbsr34t5.onion:11371/pks/lookup?op=get&options=mr&search=0xXXXXXXXXXXXXXXXX' redirected to 'https://geekchimp.com/pks/lookup?op=get&options=mr&search=0xXXXXXXXXXXXXXXXX' (301) dirmngr: can't connect to 'geekchimp.com': no IP address for host dirmngr: error connecting to 'http://jirk5u4osbsr34t5.onion:11371': Unknown host dirmngr: marking host 'jirk5u4osbsr34t5.onion' as dead dirmngr: host 'jirk5u4osbsr34t5.onion' marked as dead dirmngr: command 'KS_GET' failed: No keyserver available
While the server side is clearly misconfigured here, i think if the user has chosen only a .onion address, dirmngr itself should not accept redirections to a public (non-onion) service, to protect the user from such a misconfiguration.