titanium-web-proxy icon indicating copy to clipboard operation
titanium-web-proxy copied to clipboard

Getting the remote server ip

Open Eonasdan opened this issue 2 years ago • 2 comments

Is there a way to get the remote server's ip address? E.g. google.com => 64.233.177.100

Thank you

Eonasdan avatar Jan 27 '23 13:01 Eonasdan

Well, how does a system connect to "google.com" ? Actually by doing a DNS resolution and getting it's 'physical' address, which is the IP address. If there can't be any IP found, no connection is made - that's how the internet works. Of course, when you are using forward proxies, probably including proxying of DNS, then you won't know what the endpoint will be. Different DNS-servers and (in case of DNS like 8.8.8.8) - also your geolocation affects the resolution. And due to the fact, that there is even more proxyfication included, which is probably also outside your scope (in case it's external proxies not under your control).

In a strict way -<your own Titanium-Proxy> environment. The endpoint you connect to, is the resolved IP address(es) from the DNS lookup. By default, Titanium.WebProxy is using the DNS servers of the machine where your proxy is running on. So using the default dotnet DnsClient to resolve the name, will yield the same result(s).

trontronicent avatar May 21 '23 16:05 trontronicent

I know how the internet works. My question was if Titanium.WebProxy provided this as part of the request object.

Eonasdan avatar May 22 '23 12:05 Eonasdan