Skip to content

Advanced Configuration

matthew tirtawidjaja edited this page Feb 21, 2024 · 2 revisions

LCDirectLAN have features that did not directly affect the game, but rather how the mod behaves and how it interacts with the game.

These features are considered advanced and are mostly not important at all by the average player, but rather by the mod maintainers, Huge Lobby Party/Tournament organizers, and other users who want to take advantage of the mod's advanced features.

If you're trying to adjust the mod's game behavior, you'd probably more interested in the Configuration page instead.

Automatic DNS Configuration

LCDirectLAN can automatically use DNS available in the system to resolve the server's join data, including the IP Address and Port Number via several DNS record types, minimizing the need for manual input and making the join process more seamless.

Base DNS Record elements visualized as a table:

Key Name Description Example
Name Name of the record lc.example.com
Type Type of the record SRV/TXT/AAAA/A
TTL Time to live of the record 3600
Class Class of the record IN
Data Data of the record See below data format for each record type

Please note that, each DNS Management System may have different ways to input the data, so please refer to your DNS management system documentation for more information, we only provide the raw data format specific to the RFC standard that LCDirectLAN uses.

Below are the supported DNS record types (ordered by the most prioritized to the least prioritized):

SRV (IP + Port)

SRV record are designed to specifically store a digital service location (IP Address and Port Number) located in a specific server, this is perfect for the mod's use case as the game host are providing a service (game server) and the client are trying to locate and connect to that service.

However, SRV record are not widely known and even may not be implemented in some DNS servers, which is why LCDirectLAN also supports other record types.

LCDirectLAN uses the data field of this record to store the IP Address and Port Number in a specific format, the format is as follows:

Key Name Description Example
priority LCDirectLAN didn't use value of this field. -
weight LCDirectLAN didn't use value of this field. -
port The host Port Number. 7777
target A/AAAA Record name of the host -

TXT (IP + Port)

LCDirectLAN also supports attempt to resolve the server's join data using the TXT record type, by taking advantage of the text value of this record type, there is no RFC standard for the format of the text value, as it is designed to be a free-text field.

TXT record are more known, and mostly supported by major DNS servers, making it a good alternative to the SRV record type, LCDirectLAN uses the data/text field of this record to store the IP Address and Port Number in a specific format, the format is as follows:

LCDirectLAN_{ip}:{port}

Where {ip} is replaced by the IP Address and {port} is replaced by the Port Number, please make sure to not left any extra spaces or characters in the data/text field.

IPv6 Address is not yet supported for TXT Record as there is a conflict in LCDirectLAN parsing, which will be fixed in future releases.

Example of telling the client to join the server at 127.0.0.1 at port 7777:

LCDirectLAN_127.0.0.1:7777

AAAA (IP)

LCDirectLAN will try to resolve the server's IP Address usingAAAA record type, this has lower priority because it only resolves the IP Address and not the Port Number, requiring the player to manually input the port number to be able to join the lobby/server.

AAAA record should usually be supported by DNS servers in an IPv6-capable Network, LCDirectLAN uses the address field of this record to store the IP Address.

For example, if the server's IP Address is ::1, the AAAA record address field should be ::1 (basically just the IP Address).


A (IP)

At last, LCDirectLAN will attempt to resolve the server's IP Address using the A record type, this is the least prioritized record type because it only resolves the IP Address and not the Port Number, requiring the player to manually input the port number to be able to join the lobby/server.

A record is the most basic and should be supported by ALL DNS servers, LCDirectLAN uses the address field of this record to store the IP Address.

For example, if the server's IP Address is 127.0.0.1, the A record address field should be 127.0.0.1 (basically just the IP Address).


DNS Record Deployment Best Practices

LCDirectLAN will query the default DNS server in the user system, which is usually a Public DNS server on the Internet, this may not be ideal for huge lobby parties, tournaments or any other private/protected events, as anyone in the internet can query and potentially join the lobby (depending on each network configuration).

It is recommended to host a central DNS server, and then distribute the DNS IP Address to all participants via Automatic DHCP or other methods, this way:

  • All the participants needs to know is the server's name, such as "playlc.example.com"

  • Easy Centralized Management, hosting multiple lobbies in the same network have never been easier.
    Your DNS can just host multiple records for each server, such as:

    • playlc1.example.com
    • playlc2.example.com

    .... and so on

  • Isolated from the Public Internet, only participants/players within the network can query the DNS server, making it more secure, private, and controlled.

Clone this wiki locally