Skip to content

connection_properties.lua

Bui edited this page Jan 6, 2018 · 2 revisions

Table of Contents

inter_password

Required: Yes

Type: string

Default value(s): "changeme"

Notes: This is the password that your servers use to authenticate to one another. This prevents malicious persons from connecting their ChannelServer to your WorldServer and then taking player data or worse.

inter_salt

Required: Yes

Type: string

Default value(s): "changeme"

Notes: This is the salt that combines with your inter_password for additional security. You may increase security further by changing how the salt is used in MiscUtilities::hashPassword. For example, you might change it so that it inserts one character of the salt for every character of the regular password.

use_client_encryption

Required: Yes

Type: boolean

Default value(s): true

Notes: This should always be set to true unless you know a good reason to disable it. It will remove encryption entirely from the protocol, which means that all of the packets sent and received will be raw. The ordinary game client will not accept these.

use_inter_ping

Required: Yes

Type: boolean

Default value(s): true

Notes: This should always be set to true unless you have a need to use the debugger for prolonged periods of time. It will stop servers from pinging eachother and timing out (read: closing connections and closing the servers) if there is no ping response.

use_client_ping

Required: Yes

Type: boolean

Default value(s): true

Notes: This should always be set to true unless you have a need to use the debugger for prolonged periods of time. It will stop servers from pinging players and timing them out if there is no ping response.

login_ip

Required: Yes

Type: string (url/ipv4)

Default value(s): "127.0.0.1"

Notes: This tells WorldServers and ChannelServers where to connect to the LoginServer. It supports arbitrary URLs and of course it supports direct IPs. Currently, only IPv4 is supported, however, IPv6 support is planned for the future.

login_inter_port

Required: Yes

Type: uint16

Default value(s): 8485

Notes: This tells WorldServers and ChannelServers which port to connect to on the LoginServer.

external_ip

Required: Yes

Type: array of pairs of string (url/ipv4) and string (url/ipv4)

Default value(s): {{["ip"] = "127.0.0.1", ["mask"] = "255.0.0.0"}}

Notes: This is how you open up your server to the outside world. The subnet mask allows you to determine which network a user is a part of to allow LAN play as well as external players at the same time. The server sends these players different IP locations based on which network they are connecting from.

Example:

 external_ip = {
 	{["ip"] = "127.0.0.1", ["mask"] = "255.0.0.0"},
 	{["ip"] = "192.168.1.2", ["mask"] = "255.255.255.0"},
 	{["ip"] = "your.wan.ip", ["mask"] = "0.0.0.0"}
 };

This means:

  1. If the client is localhost, the server should send the IP 127.0.0.1.
  2. If the client is on the LAN (_they_ have an IP of 192.168.1.xxx), the server should send the IP 192.168.1.2.
  3. Otherwise, the server should send the IP your.wan.ip.
Clone this wiki locally