Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Getting the remote server ip #949

Open
Eonasdan opened this issue Jan 27, 2023 · 2 comments
Open

Getting the remote server ip #949

Eonasdan opened this issue Jan 27, 2023 · 2 comments

Comments

@Eonasdan
Copy link

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

Thank you

@trontronicent
Copy link

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 - 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).

@Eonasdan
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants