it is possible get a real public ip address of game server?
Solved Getting server's public IP address?
Discussion in 'Rust Development' started by Andrew Mensky, Feb 22, 2017.
-
Wulf Community Admin
Yes, you'd need to call out to a site using a web request to return the IP, or query Steam.
-
-
Wulf Community Admin
-
Would using this not work? Or am I relating to something else. As this is what I use in a plugin of mine.
Code:using ConVar; ConVar.Server.ip
-
Wulf Community Admin
-
-
Wulf Community Admin
If you'd like some web request examples, take a look at CountryBlock, SteamProfiler, etc. You can use sites such as https://api.ipify.org.
-
-
Code:using Rust; void OnServerInitialized() { var publicIP = Global.SteamServer.PublicIp.ToString(); Puts($"Public IP is '{publicIP}'"); }
-
Wulf Community Admin