0

I am trying to make a multi-client application in which somebody is the host and other people join into the game. I need this to be possible without port forwarding so that users can easily set up their server. Is this possible without any help from any of those server hosting companies that help out? Is there any special port that doesn't require port forwarding?

verymessi
  • 117
  • 1
  • 12
  • Have you explored purely cloud based options such as AppWarp or Photon? Clients can communicate with each other by joining a game room and you don't need to go to any server hosting companies like rackspace or AWS etc. – dhruv chopra Jul 28 '13 at 04:49
  • Well if I sell it I was wondering if I might get sued so all I want is a library. I can't ask anymore questions fail. – verymessi Jul 28 '13 at 22:44

1 Answers1

1

As far as I know, the only possible approach is to use UPnP (Universal Plug and Play). More specific: Internet Gateway Device Protocol (IGDP). This makes the port forwarding go automatically. It is a protocol that has the possibility to ask the gateway to forward a port to your machine. So this isn't really "without" port forwarding, but it will do it automatically, instead of the user having to go and configure their router.

Martijn Courteaux
  • 67,591
  • 47
  • 198
  • 287
  • Well, how do you put this in an android app? – verymessi Jul 24 '13 at 23:00
  • Take a look at this library: http://bitletorg.github.io/weupnp/ – Martijn Courteaux Jul 24 '13 at 23:09
  • This might not work on android because mobile devices don't have a definite ip address, right? – verymessi Jul 24 '13 at 23:19
  • That is not a problem. Just use the current IP address of the device to add a port forward rule. – Martijn Courteaux Jul 25 '13 at 16:59
  • So it has to be connected to wifi right? – verymessi Jul 25 '13 at 19:10
  • Yes, of course. That is the configuration UPnP is meant for (as far as I know). You are thinking about 3G right? If so, I don't have a clue. Never used 3G as a costumer, neither as a developer. But I guess that when you are on 3G, you don't need to port forward, since you are not behind a router, but are using your IP address you got from the 3G provider, which is an "external ip", which is enough to be reachable when running a server. – Martijn Courteaux Jul 26 '13 at 15:48
  • All I wanted was wifi. I was wondering how things like What'sApp work on 3G. I read somewhere that I have to hack to get to the phone in 3G. – verymessi Jul 26 '13 at 20:33