Add SRV Record support

Suggestions that have been added to the game.

Moderator: ickputzdirwech

User avatar
Johannes
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Mar 10, 2016 9:36 pm
Contact:

Add SRV Record support

Post by Johannes »

If a user attempts to connect to a server via a domain, their client should perform an SRV DNS record check on that domain, and if such a record is found, should use the port and srv hostname from the record as the actual connection.

So for a given foo.bar.com, the SRV check should be performed on _factorio._udp.foo.bar.com (since factorio exclusively uses UDP ports), and parse any found record for a port and host address to use during the connection.

This would make it far easier for server hosts to run multiple Factorio instances on one server and allow users to connect to them with distinct subdomains instead of having to enter port numbers.



For example, given a dedicated Linux server that has two headless Factorio games running, located at:
  • server.example.com:34197
  • server.example.com:34198
And we want to allow users to connect to these two servers without having to enter the port number by using subdomains:
  • foo.example.com
  • bar.example.com
We would create two SRV DNS records:
  • _factorio._udp.foo.example.com. <TTL> IN SRV <priority> <weight> 34197 server.example.com.
  • _factorio._udp.bar.example.com. <TTL> IN SRV <priority> <weight> 34198 server.example.com.

Minecraft's client for example has this capability: http://gaming.stackexchange.com/questions/106646 as of 1.3: http://minecraft.gamepedia.com/1.3.1#Gameplay_2 (search for "srv")
Last edited by Johannes on Fri Mar 11, 2016 12:47 am, edited 8 times in total.
Koub
Global Moderator
Global Moderator
Posts: 7796
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Add SRV Record support

Post by Koub »

[Koub] Merged the topics because they're merely the same.
[Edit] and superfluous post deleted :)
Koub - Please consider English is not my native language.
User avatar
Johannes
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Mar 10, 2016 9:36 pm
Contact:

Re: Add SRV Record support

Post by Johannes »

Koub wrote:[Koub] Merged the topics because they're merely the same.
Cheers, I was going to delete the other topic after I realized it would probably be better as a suggestion than a technical support question
MakCuber
Burner Inserter
Burner Inserter
Posts: 13
Joined: Tue Mar 01, 2016 5:18 am
Contact:

Re: Add SRV Record support

Post by MakCuber »

Ive tried to set this up on my domain but I guess the game itself doesn't recognize SRV records yet, which is really unfortunate. I also wish they would add a server list GUI so the game remembers your favourite servers (like minecraft does kinda). Least now that I think I have the SRV record setup correctly on my domain if they ever do add support for it in the game it will already be setup :P
skord
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Mar 26, 2016 4:48 pm
Contact:

Re: Add SRV Record support

Post by skord »

I'd like to totally +1 this feature request. I have a Factorio headless running in a Docker container which is linked to by another container which pulls environmental variables from the Factorio containers and automatically can create these DNS records.

In simpler terms, you start your first Factorio server and another process picks up that the server named "vanilla" has started. That other process automatically creates the A and SRV records for vanilla.factorio.example.com. If I want to spawn another server process on the same server called "bobmod", it will automatically create "bobmod.factorio.example.com". Then, the client only needs to know the DNS names, and not the port, effectively making it look as though the servers are running on separate machines.

This really comes in handy when you're playing multiple games with small groups of friends in that the servers that aren't being used are using minimal resources when people aren't connected, making it so you can run many Factorio server processes on the same box.
domgetter
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Apr 02, 2016 6:53 am
Contact:

The ability to put a domain name instead of an ip address

Post by domgetter »

I'd love to be able to type out a domain name in the "Connect to Game" window when connecting to a multiplayer game.

As an example, assuming a headless server is running at myserver.com:

Image

Would this be possible?

Also, this is a small thing, but when my cursor is over the text input, it doesn't turn into the vertical text-insertion cursor. Would it be possible to modify it so that the cursor changes depending on where it's hovering?

Even if not, I'm loving this game and everything you've poured into it :) Thanks for the (so far) dozens of hours of fun.
domgetter
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Apr 02, 2016 6:53 am
Contact:

Re: The ability to put a domain name instead of an ip address

Post by domgetter »

I feel this may be a duplicate of this post: viewtopic.php?f=6&t=21276&p=133660 but I'm not sure.
Koub
Global Moderator
Global Moderator
Posts: 7796
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Add SRV Record support

Post by Koub »

[Koub] : Indeed. Merged topics.
Koub - Please consider English is not my native language.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: The ability to put a domain name instead of an ip address

Post by daniel34 »

domgetter wrote:I'd love to be able to type out a domain name in the "Connect to Game" window when connecting to a multiplayer game.

As an example, assuming a headless server is running at myserver.com:

Image

Would this be possible?
This and the OP are two different (but similar) topics.

(1) What domgetter would like to have is already in the game. If he has a server called myserver.com and a Factorio server is running on it, clients that connect to that server by name (and port if different from 34197) will automatically look up the IP associated with it and connect correctly (called an A record). But if you are running several Factorio servers on the same hostname/IP, you need to specify a port for each server.

(2) On the other hand, SRV records as Johannes (OP) described also include the port in the record, and are not supported by Factorio right now.
Example: the server is example.com with IP 12.34.56.78 and there are two Factorio servers running on it.
With SRV it is possible to have one running with vanilla.example.com and the other with modded.example.com, without having to enter a port number although both run on the same server/IP. See the OP for more details or use Wikipedia.
quick links: log file | graphical issues | wiki
domgetter
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Apr 02, 2016 6:53 am
Contact:

Re: Add SRV Record support

Post by domgetter »

Ah, my bad. Just tested, and it works!
franzmueller
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Jun 05, 2016 12:25 pm
Contact:

Support SRV DNS

Post by franzmueller »

merged with existing topic --daniel34

SRV would allow to host more factorio servers on the same domain without requiring players to know the exact port of the server instance.
For example a player could connect to factorio1.domain.org or factorio2.domain.org while with the current system the player would need to connect to domain.org:1234 and domain.org:4567 which is obviously less comfortable.
This works by propagating the service with DNS entrys which contain information about the service and the port (among some other information) a server offers. Some other popular Internet services like Teamspeak, Minecraft and XMPP use SRV as well, You can find out more about it on Wikipedia: https://en.wikipedia.org/wiki/SRV_record

TL;DR: SRV Support removes the need to know the port of a factorio server.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Add SRV Record support

Post by daniel34 »

Friday Facts #139 - Wrapping Up Multiplayer
Starting with the upcoming 0.13 Factorio will include a multiplayer server/game browser.
FFF #139 wrote:This service greatly simplifies the game discovery and connectability. Player hosting the game (or a headless server) will simply publish the game to the Multiplayer Matching Server. This makes the game available to other players via the Browse Games Gui. This will make the clumsy connecting directly to the server pretty much obsolete (though the functionality stays).
Given this new feature I don't think that the current direct connect will be used much in the future, nor improved to add new features.
quick links: log file | graphical issues | wiki
dj4am
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Apr 23, 2016 8:21 pm
Contact:

Re: Add SRV Record support

Post by dj4am »

Johannes wrote:If a user attempts to connect to a server via a domain, their client should perform an SRV DNS record check on that domain, and if such a record is found, should use the port and srv hostname from the record as the actual connection.
Bump for show of support for SRV records. I set this up for Minecraft and it was glorious, no more explaining to anyone what a port number is or how to type it properly
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Add SRV Record support

Post by Zeblote »

dj4am wrote:
Johannes wrote:If a user attempts to connect to a server via a domain, their client should perform an SRV DNS record check on that domain, and if such a record is found, should use the port and srv hostname from the record as the actual connection.
Bump for show of support for SRV records. I set this up for Minecraft and it was glorious, no more explaining to anyone what a port number is or how to type it properly
There's no need for this anymore, just use the official server list.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add SRV Record support

Post by ssilk »

Moved to implemented.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
Mini-Me
Inserter
Inserter
Posts: 21
Joined: Thu Feb 12, 2015 8:50 pm
Contact:

Re: Add SRV Record support

Post by Mini-Me »

Has the SRV support been implemented? Otherwise this move might be a bit misleading...

While I do understand that the implementation of the ingame server browser does make this feature a bit redundant, it would still be helpful for hidden (or unlisted) servers.
Factorio-Hidden.PNG
Factorio-Hidden.PNG (64.35 KiB) Viewed 33825 times
Image
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add SRV Record support

Post by ssilk »

Maybe. I moved it back.
But to be honest I think this is very low prio, cause there is a working solution. It would be much more clever to suggest hidden or unlisted servers instead of this. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
Mini-Me
Inserter
Inserter
Posts: 21
Joined: Thu Feb 12, 2015 8:50 pm
Contact:

Re: Add SRV Record support

Post by Mini-Me »

Yeah, I do agree that it's not a high priority task :D.
ssilk wrote:It would be much more clever to suggest hidden or unlisted servers instead of this. :)
Hmm, I don't quite understand what you mean by that. As I wanted to point with my screenshot, unlisted servers already exist :). If you choose "hidden" as visibility option, the server won't add itself to the matchmaking server.

And what I just noticed too, there actually is a way to "bookmark" a server for quick access: if you enter the address into the "Direct connection" box it will be remembered across game restarts. So if you could use a handy subdomain there instead of a port number that'd be cool :).
Image
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add SRV Record support

Post by ssilk »

Oh, I mean something like with dropbox/google drive etc.: You create a game, then you can share a number (a link) to this game. Only those, who have that number can join.

In the same way users can watch a game: You can make a public viewing by sharing a number, that allows only public views, not playing.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
nukleus
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Nov 24, 2016 11:38 pm
Contact:

Re: Add SRV Record support

Post by nukleus »

+1 for supporting SRV records! Been using them to host minecraft servers in the past, many hosters provide easy support for them in their control centers making it easy for the general user. Being able to have a speaking name for the server ($topic.server.lan) proved useful back then (and no one could remember the port number anyways) and it'd be really awesome to have it supported in Factorio!
Post Reply

Return to “Implemented Suggestions”