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
Post a Comment