net.publicip
readonly |
The net.publicip property gets the current public IPv4 address as a string. A valid Internet connection must be available, or returns false otherwise.
Example
--! luart-extensions
import net
print("Public IPv4 IP : "..net.publicip)