4

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

1 Answer 1

5

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. 8.8.8.8 [https://dns.google.com/experimental] for Google or 1.1.1.1 [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/)

e.g.

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,
  "Question":[ 
    {
      "name": "www.google.com.",
      "type": 1
    }
  ],
  "Answer":[ 
    {
      "name": "www.google.com.",
      "type": 1,
      "TTL": 134,
      "data": "216.58.210.36"
    }
  ]
}

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

2
  • 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 Jan 30, 2019 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, 2019 at 13:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .