ID:270900
Oct 23 2006, 10:23 am
|
|
Anybody know exactly how this can be utilized? I'm unsure of this but, would a player knowing this address be able to access a game hosted behind a firewall/router that isn't portforwarded?
|
Mecha Destroyer JD wrote:
Anybody know exactly how this can be utilized? It's very simple. When the game contacts the hub, it sets <code>world.internet_address</code> to the IP the hub believes it to be. 99% of the times it's the external IP of the host. The game only contacts the hub when it's being hosted. It immidiatly contacts the hub after a call to <code>world.OpenPort()</code> has been made with a valid port number. It takes around 30 seconds for it to contact the hub after a reboot. During this time, <code>world.internet_address</code> is <code>null</code>. You can use <code>world.internet_address</code> to display the true external IP. This can be useful in cases like <code>world/Reboot()</code>, where you might not be connected automatically for some reason and you can output a byond:// url to reconnect to to the world. I'm unsure of this but, would a player knowing this address be able to access a game hosted behind a firewall/router that isn't portforwarded? No. BYOND will never be able to allow games to be hosted behind a firewall/router that isn't configured, UNLESS they reroute all traffic via the BYOND servers. The chances of this happening are below zero, since it'll just suck their bandwidth out even more. |
If the game is not port fowarded, chances are that people can not access the game, like usual. It's merely for those who wants to grab the server's external IP address rather than making a slightly complex method involving world.Export()
(world.internet_address == External IP, world.address == Internal IP (eg 192.168.X.X for people with routers))
- GhostAnime