The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Specify game server IP address

2021-01-04 21:38:22

-PUN 2
-Selfhosted Photon Server

Question: Can my app specify the IP address of the game server it connects to?

Right now my app chooses the IP address for the master server it connects to, which is great. But then the master server redirects the app to the game server IP address of it's choosing. Instead, I want to specify a different IP address.

This is because my server has multiple network interfaces. Some network clients are only supposed to use interface 1 (IP address 1), and other clients are only supposed to use interface 2 (IP address 2). This should work, since I believe the game server and master server (and any web service) are accessible on both interfaces.

The problem is the PUN client automatically uses the game server IP address sent to it by the master server. I don't want to use that IP address, I want to be able use the computer's second IP address.


2021-01-07 15:00:04

This is not built-in to the client APIs as a fixed game server API would limit the load balancing we do. This would scale badly.

Per Game Server there is a config, which specifies the IP clients should use to connect to. This is used by the Master Server and sent to the clients. So .. you should just edit that.

Have a look at this:

Back to top