How do I get the external IP of a socket in Python? -


when call socket.getsockname() on socket object, returns tuple of machine's internal ip , port. however, retrieve external ip. what's cheapest, efficient manner of doing this?

this isn't possible without cooperation external server, because there number of nats between , other computer. if it's custom protocol, ask other system report address it's connected to.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -