[SOLVED] Get local IP Address
#1
Does anyone know of a way I can get my local IP address from within my addon?

I previously did:
Code:
ip = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
ip.connect(("gmail.com",80))
HOST_NAME = ip.getsockname()[0]

but now that I am running a VPN on boot I'm getting an odd value (10.29.10.6) instead of 192.168.x.x
Reply
#2
Used this in the end:

Code:
subprocess.check_output(["ifconfig", "eth0"])
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED] Get local IP Address0