DNS: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
Line 2: Line 2:


[https://en.wikipedia.org/wiki/Domain_Name_System The Domain Name System] (DNS) is being used within FlightGear to look up resources providing several services. Its use started with release [[Changelog 2016.2|2016.2.1]] as an experimental feature to resolve the location of the [[TerraSync]] servers.
[https://en.wikipedia.org/wiki/Domain_Name_System The Domain Name System] (DNS) is being used within FlightGear to look up resources providing several services. Its use started with release [[Changelog 2016.2|2016.2.1]] as an experimental feature to resolve the location of the [[TerraSync]] servers.
This page documents the used services in detail.
This page documents the used services in detail<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35483751/
  |title  =  <nowiki> Re: [Flightgear-devel] Proposal for storing the mp server
information in DNS instead of a web service </nowiki>
  |author =  <nowiki> Torsten Dreyer </nowiki>
  |date  =  Nov 10th, 2016
  |added  =  Nov 10th, 2016
  |script_version = 0.40
  }}</ref>.


== FlightGear systems using DNS ==
== FlightGear systems using DNS ==

Revision as of 19:19, 10 November 2016

Usage of DNS within FlightGear

The Domain Name System (DNS) is being used within FlightGear to look up resources providing several services. Its use started with release 2016.2.1 as an experimental feature to resolve the location of the TerraSync servers. This page documents the used services in detail[1].

FlightGear systems using DNS

Currently, (as of version 2016.4.0) these systems use DNS for service discovery:

TerraSync

The TerraSync client queries NAPTR record This is a link to a Wikipedia articles for the DNS name terrasync.flightgear.org. As of version 2016.4, the configured entries are:

At system start, FlightGear sends a query for the DNS name terrasync.flightgear.org. The URL for scenery download is encoded in the regex field between the last two exclamation marks. This string MUST start with !^.*$! and must end with !, the regex itself is not interpreted by the TerraSync client, only the fixed string is taken. The hostname to query is configurable at system start by setting a property, so is the scenery version number. The default scenery version is "ws20".


Multiplayer

The multiplayer client queries SRV record This is a link to a Wikipedia articles for a list of multiplayer servers and TXT record This is a link to a Wikipedia articles on each server for detailed information about the server.

The SRV record for a multiplayer server looks like this: _fgms._udp IN SRV 10 20 5001 mpserver01 All entries currently use the same values for priority and weight. The port numbers for active servers are set to the port number of the running fgms instance. The port number is zero for inactive servers.

The TXT record for each referenced multiplayer server looks like this:

mpserver01 IN TXT "flightgear-mpserver=eyJuYW1lIjoibXBzZXJ2ZXIwMSIsImxvY2F0aW9uIjoiRnJhbmtmdXJ0LEdlcm1hbnkifQo="

with the text data used as in RFC 1464 - Using the Domain Name System To Store Arbitrary String Attributes. The attribute name flightgear-mpserver marks this entry as "ours" while it's attribute value is a base64 encoded json string containing additional attributes for the server not available within the SRV record. For the given example, the base64 string of

eyJuYW1lIjoibXBzZXJ2ZXIwMSIsImxvY2F0aW9uIjoiRnJhbmtmdXJ0LEdlcm1hbnkifQo= 

decodes to

{"name":"mpserver01","location":"Frankfurt,Germany"}

References

References