Jump to content
  • Advertisement
Sign in to follow this  
H0bbes

IP address

This topic is 4997 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Quote:
Original post by H0bbes
I like to know if i can get IP address from Machine that is connected with Proxy?
In general you'll have to ask someone with a public IP. This service for example.

Share this post


Link to post
Share on other sites
Just to expand on doynax's answer, you'd need to open a socket to www.whatismyip.com on port 80, and send:

GET / HTTP/1.0
Host: www.whatismyip.com
Connection: Close



Where each line ends with a "\r\n" pair, and the whole thing ends with a blank line (so the last 4 chars are "\r\n\r\n")
Then read the input until you get "<TITLE>Your ip is ", and then read the next part for the IP.
You could also use a library to make this stuff easier, I believe hplusplus has a very small bit of code to do this. Have a look in the Multiplayer and Network Programming forum.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Wouldn't this give the IP address of the proxy server?

Share this post


Link to post
Share on other sites
Quote:
Original post by H0bbes
I like to know if i can get IP address from Machine that is connected with Proxy?
Obviously confusingly worded.

Answer: no. Not unless they tell you. Some proxies will send headers that look like

X-Proxy-For: xxx.xxx.xxx.xxx

or something, but these are rare. really rare. nonexistant rare.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Wouldn't this give the IP address of the proxy server?

Yes, I thought that was what you wanted.
So do you want to know the internal address of a machine behind a proxy from the outside? Or perhaps something else entirely..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!