aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDarkelarious <darkelarious@333networks.com>2016-11-19 20:56:04 +0100
committerDarkelarious <darkelarious@333networks.com>2016-11-19 20:56:04 +0100
commitc3f8d65a4fb1f5674557ee67cf7f74369df86ad1 (patch)
tree92aab2a394bda28da0ed7c7c75e633fdf386fc71 /data
parent1de3da4b8027508a91144639455c934fd6ccb9b7 (diff)
downloadMasterServer-Perl-c3f8d65a4fb1f5674557ee67cf7f74369df86ad1.tar.gz
MasterServer-Perl-c3f8d65a4fb1f5674557ee67cf7f74369df86ad1.zip
Massive improvements on efficiency, robustness, security, reliability and more
Diffstat (limited to 'data')
-rwxr-xr-xdata/masterserver-config.pl127
-rwxr-xr-xdata/sql/tables-Pg.sql (renamed from data/database/tables-Pg.sql)0
-rwxr-xr-xdata/sql/tables-SQLite.sql (renamed from data/database/tables-SQLite.sql)0
-rwxr-xr-xdata/sql/tables-mysql.sql (renamed from data/database/tables-mysql.sql)0
-rwxr-xr-xdata/supportedgames.pl33
5 files changed, 92 insertions, 68 deletions
diff --git a/data/masterserver-config.pl b/data/masterserver-config.pl
index d5d6091..fcf6817 100755
--- a/data/masterserver-config.pl
+++ b/data/masterserver-config.pl
@@ -1,63 +1,73 @@
package MasterServer;
+
+#
+# Last update: Sat 19 Oct 2016 20:23 GMT+1
+#
+
our (%S, $ROOT);
our %S = (
+ # preserve root path
+ root => $ROOT,
+
################################################################################
# Masterserver HOST information #
# #
-# Please fill in YOUR contact details here, for two-way synchronization and #
+# Please fill in your contact details here, for two-way synchronization and #
# for your users to be able to contact you. #
# #
# Values may not contain backslashes and quotes: no \ or \\, nor ' and ", #
# unless you know exactly what you're doing! #
# #
################################################################################
+
+ # our public display name (shows in "online masterservers" on 333networks.com)
+ masterserver_hostname => "master.333networks.com (333networks MasterServer)",
- # example: 333networks -- http://master.333networks.com -- info@333networks.com
- contact_details => '333networks -- http://master.333networks.com -- info@333networks.com',
-
- # host address, shows when using sync-options
- masterserver_address => 'master.333networks.com',
+ # contact details (shows in TCP requests directly from master to master)
+ masterserver_contact => 'Darkelarious -- info@333networks.com',
+ masterserver_address => 'master.333networks.com',
################################################################################
# Database Login Configuration #
# #
# Login credentials for the database that was created manually before. #
# Yes, that means that you need to create the database and tables on your own. #
-# Use only one option: Postgresql, SQLite or MySQL #
+# Use only one option: Postgresql, SQLite, MySQL (only tested with Postgresql) #
# #
################################################################################
# Postgresql
- #dblogin => ['dbi:Pg:dbname=databasename', 'user', 'password'],
+ dblogin => ['dbi:Pg:dbname=masterserver', 'user', 'password'],
# SQLite
- #dblogin => ["dbi:SQLite:dbname=$ROOT/data/databasename.db",'',''],
+ #dblogin => ["dbi:SQLite:dbname=$ROOT/data/testdatabase.db",'',''],
# MySQL
- dblogin => ["dbi:mysql:database=databasename;host=localhost;port=3306",'user','password'],
+ #dblogin => ["dbi:mysql:database=database_name;host=localhost;port=3306",'user','password'],
################################################################################
# Logging configuration #
# #
# All messages are printed to the log (and screen) by default. The following #
-# settings determine the file locatioin and which messages are suppressed. #
+# settings determine the file location and which messages are suppressed. #
# #
################################################################################
# log file location (folder name!)
log_dir => "$ROOT/log/",
- #new log for every period of time? options: daily, weekly, monthly, yearly, none
+ # new log for every period of time? options: daily, weekly, monthly, yearly, none
log_rotate => "weekly",
- # print to screen (1=yes, 0=no)
- printlog => 1,
+ # print both to screen and log (1=screen+log, 0=only log)
+ printlog => 0,
# which messages do you NOT want to see in the logs (and screen)?
- suppress => "none", # show all entries
+ # show all entries
+ #suppress => "none",
- # suppress the most annoying messages
- # suppress => "add update delete read tcp udp secure query beacon hostname",
+ # disable most messages, except for important events
+ suppress => "udp add update tcp udp delete uplink stat beacon secure utserver hostname kfstat debug",
# print database errors
db_print => 0,
@@ -65,17 +75,18 @@ our %S = (
################################################################################
# Network settings #
# #
-# Beacon UDP port (beacons) and Browser TCP port (serverlist) #
+# Beacon UDP port (beacons) and Browser TCP port (serverlist) #
# Settings for games that require different data formats #
# #
################################################################################
# port settings
- listen_port => 28900, # default 28900
- beacon_port => 27900, # default 27900
+ listen_port => 28900, #28905, # default 28900
+ beacon_port => 27900, #28906, # default 27900
# these games require a special hex format instead of \ip\ip:port\
- hex_format => "bcommander",
+ # if the current protocol is correct, you don't need to touch this ever.
+ hex_format => "",
################################################################################
# Secure/Validate configuration #
@@ -88,56 +99,61 @@ our %S = (
debug_validate => 0,
# accept only servers that pass the secure/validate challenge, takes longer
- require_secure_beacons => 0,
+ # but prevents malicious servers from sending fake query data
+ require_secure_beacons => 1,
# ignore keys from games that use multiple keys or do not support keys at all
- ignore_beacon_key => "deusex ut",
+ ignore_beacon_key => "deusex ut wot rune",
ignore_browser_key => "deusex",
################################################################################
-# Enable + Timer settings #
+# Enable settings #
# #
-# When does what process start? Format: after [s], interval [s], #
-# maximum cycle time [s] (optional) #
-# Wait 60+ seconds before starting timers for incoming beacons #
+# 0 = disabled #
# #
################################################################################
-
- # Synchronization with other 333networks-based masterservers
- sync_enabled => 1, # 0 = disabled
- sync_time => [60, 900],
# Query UCC-based applets
- master_applet_enabled => 1, # 0 = disabled
- master_applet_time => [90, 900],
+ master_applet_enabled => 1,
+
+ # Synchronization with other 333networks-based masterservers
+ sync_enabled => 1,
# Beacon Checker query all addresses in the database, requesting "basic" and
# "info". Execute at least twice per hour, to avoid time-outs in own data.
# disabling breaks support for certain games [citation needed].
beacon_checker_enabled => 1,
- beacon_checker_time => [120, 0.5, 1800],
+
+ # Collect server information for the 333networks main site. Identical
+ # mechanism as the Beacon Checker. Is used for by 333networks to show
+ # Unreal Tournament information on the site.
+ # NB: with some work it can be adapted to work with any other game. Own risk.
+ utserver_query_enabled => 0,
################################################################################
# Synchronization settings #
# #
# Request the masterlist for selected or all games from other 333networks- #
-# based masterservers. #
+# based masterservers. Also uplinks to these servers in return. #
# #
################################################################################
- # masters to sync with
+ # additional masters to sync with (in addition to db-entries)
sync_masters => [
- { address => "master.333networks.com", port => 28900 }, # default
- { address => "master.noccer.de", port => 28900 },
- { address => "master.oldunreal.com", port => 28900 },
- { address => "master.errorist.tk", port => 28900 },
+ { address => "master.333networks.com", port => 28900, beacon => 27900 }, # default
+ { address => "master.noccer.de", port => 28900, beacon => 27900 },
+ { address => "master.oldunreal.com", port => 28900, beacon => 27900 },
+ { address => "master.errorist.tk", port => 28900, beacon => 27900 },
+# { address => "master.333networks.com", port => 28905, beacon => 28906 }, # if available, devmaster
],
- # sync all or only selected games?
- # 0 = all, 1 + gamenames = selected
- #sync_games => [1, "ut unreal"], # example with only UT/Unreal syncing
+ # sync all or selected games?
+ # [0] = all
sync_games => [0],
-
+
+ # other example: [1 + gamenames] = selected games only
+ #sync_games => [1, "ut unreal deusex"],
+
################################################################################
# Query UCC Applets #
# #
@@ -145,24 +161,33 @@ our %S = (
# equivalent. #
# #
################################################################################
-
- # remote applets to be queried
master_applet => [
{ip => "utmaster.epicgames.com", port => 28900, game => "ut"},
{ip => "master.newbiesplayground.net", port => 28900, game => "unreal"},
- {ip => "master.hlkclan.net", port => 28900, game => "unreal"},
],
-); #end %S config
+################################################################################
+# Killing Floor Statistics #
+# #
+# Read player statistics from the KFstats file in the UT2004 configuration. #
+# Applies to 333networks Killing Floor Server only! #
+################################################################################
+ #kfstats.ini file location
+ kfstats_file => "/home/darkelarious/ut2004/System/KFStats.ini",
+
+ # Collect kfstats info
+ kfstats_enabled => 0,
+
+); #end configuration %S
################################################################################
# #
# Supported Games. #
# #
-# List of games of which 333networks has the authentication ciphers. Note that #
-# adding a game here does not necessarily mean that suddenly the protocol will #
-# be supported. #
+# List of games that are supported by the 333networks masterserver. Note that #
+# adding a game does not necessarily mean that suddenly the protocol will #
+# be supported. It only needs the provided ciphers. #
# #
################################################################################
require "$ROOT/data/supportedgames.pl";
diff --git a/data/database/tables-Pg.sql b/data/sql/tables-Pg.sql
index f5663ff..f5663ff 100755
--- a/data/database/tables-Pg.sql
+++ b/data/sql/tables-Pg.sql
diff --git a/data/database/tables-SQLite.sql b/data/sql/tables-SQLite.sql
index 7d68786..7d68786 100755
--- a/data/database/tables-SQLite.sql
+++ b/data/sql/tables-SQLite.sql
diff --git a/data/database/tables-mysql.sql b/data/sql/tables-mysql.sql
index c460b1b..c460b1b 100755
--- a/data/database/tables-mysql.sql
+++ b/data/sql/tables-mysql.sql
diff --git a/data/supportedgames.pl b/data/supportedgames.pl
index 941e287..18fe83f 100755
--- a/data/supportedgames.pl
+++ b/data/supportedgames.pl
@@ -1,14 +1,20 @@
our %S = (
-%S, # include other config files too if applicable
+%S, # do not overwrite other parts of the %S config hash
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+#
+# last change 24 Oktober 2016
#
-# last change 8 November 2015
+# Changelog 24 Okt 2016: Added/updated description for the 333networks synchronization
+# protocol and uplink setup. Works with MS-Perl 2.1.8 and above.
+#
#
-# Changelog 8 Nov: migrated supportedgames.pl to database; after these are games
-# are loaded, the variables are cleared
+# Changelog 8 Nov 2015: migrated supportedgames.pl to database; after these are games
+# are loaded, the variables are cleared
#
-# ChangeLog 5 Oct: moved "enc_chars" to Core::Secure.pm, in preparation to
-# migrate supportedgames.pl to the database instead.
+# ChangeLog 5 Oct 2015: moved "enc_chars" to Core::Secure.pm, in preparation to
+# migrate supportedgames.pl to the database instead.
#
# Supported Games & Secure/Validate
# All GameSpy protocol games communicate according to a protocol that requires
@@ -28,10 +34,12 @@ our %S = (
# NOTE: DUPLICATES MAY NOT EXIST. IN CASE OF DUPLICATES, ONE OF THE VALUES
# WILL BE PICKED AT RANDOM!
#
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
# Usage:
-#
# game code => {key => "game key", label => "game name label", port => "default port number"}
- game => {
+game => {
+ "333networks" => {key => "", label => "333networks MasterServer (Synchronization Protocol)"},
"12ironds" => {key => "", label => "12Iron (DS)"},
"12irondsam" => {key => "", label => "12Iron Automatch (DS)"},
"2kboxingds" => {key => "", label => "2K Boxing (DS)"},
@@ -3124,15 +3132,6 @@ our %S = (
"zeroGds" => {key => "", label => "ZeroG (DS)"},
"zsteel" => {key => "", label => "Z: Steel Soldiers"},
"ZumaDeluxe" => {key => "", label => "Zuma Deluxe"},
-
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- #
- # 333networks supports syncing between other 333networks masters. The
- # details are furthermore explained in the config file. The secure
- # challenge still applies, but with the gamename "333networks"
- #
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- "333networks" => {key => "", label => "333networks Synchronization Protocol"},
},
);