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
One IP, two servers, two (sub)domains. Reverse proxy?
Re: One IP, two servers, two (sub)domains. Reverse proxy?
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.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?
Re: One IP, two servers, two (sub)domains. Reverse proxy?
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
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !
Re: One IP, two servers, two (sub)domains. Reverse proxy?
Factorio currently doesn't support SRV records, but it has been suggested: viewtopic.php?f=6&t=21276Neemys 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
Rseding91 wrote:This has been on our to-do for a while now.
Re: One IP, two servers, two (sub)domains. Reverse proxy?
Well alright then. That's a shame. But thank you for the response
/Morten
/Morten