![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Mr. Gamezz |
I am attempting to make a game that takes your IP address and simplifies it so that you can use it as a party code. I am also attempting to make this game cross-platform so that it can be run from iOS, Mac, Windows, Android, Linux and on Itch. How would I get the IPv4 address without having to exactly find the IPv4 on every device. I also can’t just go and do every device because I don’t have most of the devices I listed above. Is there just a code that grabs JUST your IP address. (also I have tried IP.get_local_addresses() but it is different on every platform.) For example this is the kind of code I want:
print(get_local_IPv4())
What is was hoping that line of code would do is return “192.168.1.2” (Example IP) or whatever my IP was.