I have an HTTP proxy URL which is working perfectly, now I wanna resolve some domain name's IP address using that particular proxy server. I'm not sure if that is even possible. Could somebody please point me in the right direction?

Use case: Actually, I know a domain which is giving output with that particular HTTP-PROXY but that domain is not even resolving when I try to open it on my computer directly. So I wanna to know to which particular IP that domain is resolving when queried through the HTTP-PROXY server


Using normal DNS this wouldn't be possible, but there is a recent standard for DNS over HTTPS that could nearly work for this.

I say nearly because the DNS resolution wouldn't actually happen on the proxy server, but you could use the proxy server to access one of the public DNS over HTTPS servers (e.g. [https://dns.google.com/experimental] for Google or [https://cloudflare-dns.com/dns-query] for Cloudflare, or you could run your own using my code https://www.hardill.me.uk/wordpress/2018/04/14/dns-over-https/)


curl -H "Content-Type: application/dns-json" "https://dns.google.com/resolve?name=www.google.com&type=A"

gives an answer like:

  "Status": 0,
  "TC": false,
  "RD": true,
  "RA": true,
  "AD": false,
  "CD": false,
      "name": "www.google.com.",
      "type": 1
      "name": "www.google.com.",
      "type": 1,
      "TTL": 134,
      "data": ""

You would then configure curl (or what ever user agent) to use the proxy to make the request e.g.

export HTTPS_PROXY=http://proxy.server.com:8080
curl -H "Content-Type: application/dns-json" "https://dns.google.com/resolve?name=www.google.com&type=A"

Both Chrome and Firefox can be configured to do DNS resolution use DNS over HTTPS in the latest versions

| improve this answer | |
  • Thank you for your reply. But I guess in my case it wouldn't work because that particular domain is accessible only thought that proxy address and the domain in nowhere is available on public DNS. So I believe the response from the public DNS would always be same irrespective of I use a proxy or not. Anyways thank you for the reply. I have upvoted the answer but I wanted to know to which partucular IP address domain is pointing to when open through http-proxy – Point Networks Jan 30 '19 at 12:49
  • Then look at the foxyproxy plugin, that allows DNS resolution on the proxy (might only be in socks proxy mode) – hardillb Jan 30 '19 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.