Page 1 of 1

One IP, two servers, two (sub)domains. Reverse proxy?

Posted: Fri Mar 17, 2017 10:41 am
by m112358
Hey guys.

I'm hosting a factorio server with a couple of friends of mine. The thing is, I'm playing with and hosting for two different groups.
I know I could just simply host on two different ports, but I would prefer that people could just use some address server1.fact.com or server2.fact.com without having to remember the ports.

Do any of you know, if I can somehow set up a reverse proxy, checking what domain people are trying to connect to, and then passing the UDP packages to the right instance of factorio? I've considered NGINX, but I dont really know that much about it, and most of what I've read seems to indicate that UDP proxying can't check the target address, and perhaps cant even handle the way a game sends information.

Does anyone in here know anything about it?

Thanks
/Morten

Re: One IP, two servers, two (sub)domains. Reverse proxy?

Posted: Fri Mar 17, 2017 12:52 pm
by daniel34
m112358 wrote:Do any of you know, if I can somehow set up a reverse proxy, checking what domain people are trying to connect to, and then passing the UDP packages to the right instance of factorio?
It's not possible. If you enter a domain name to connect to a server then Factorio will first resolve that domain name and then connect using ip:port, the domain name is not sent to the server. A reverse proxy would have no way to check to which instance the packet has to be forwarded.

Re: One IP, two servers, two (sub)domains. Reverse proxy?

Posted: Fri Mar 17, 2017 4:06 pm
by Neemys
I don't know if it work and I can't give you the full line to add to your dns, but a look at that migth do what you want : https://en.wikipedia.org/wiki/SRV_record

Re: One IP, two servers, two (sub)domains. Reverse proxy?

Posted: Fri Mar 17, 2017 7:15 pm
by daniel34
Neemys wrote:I don't know if it work and I can't give you the full line to add to your dns, but a look at that migth do what you want : https://en.wikipedia.org/wiki/SRV_record
Factorio currently doesn't support SRV records, but it has been suggested: viewtopic.php?f=6&t=21276
Rseding91 wrote:This has been on our to-do for a while now.

Re: One IP, two servers, two (sub)domains. Reverse proxy?

Posted: Sun Mar 19, 2017 5:17 pm
by m112358
Well alright then. That's a shame. But thank you for the response :)

/Morten