1masterserver v0.4.1 2------------------- 3 41. Introduction 52. Goals 63. Installation 74. Misc 8 9 101. Introduction 11--------------- 12 13masterserver is an attempt at writing a generic master server for game servers. 14masterserver is easily extendable via plugins written in C. 15Currently, there are plugins for Quake2/3 and Heretic2. I've tested 16masterserver on: 17Linux 2.4.29 with glibc 2.3.2 (with linuxthreads) and gcc 3.3.5 18FreeBSD 5.3-STABLE with gcc 3.4.2 19SunOS 5.8 with gcc 3.4.1 20 21The name might change, any suggestions are welcome. 22 23Beware!: This is alpha quality. So it might crash 'n' burn. 24Contributions and suggestions are very welcome. 25 26 272. Goals 28-------- 29 30- generic master server 31- easy to extend via plugins 32- document the network protocols of the supported games 33- admin interface via console and tcp/ip 34- ... 35 36 373. Installation 38--------------- 39 40Note: 41 masterserver currently compiles only on Linux systems. I'm trying to make 42 it run on other unices, too, but that will take some time because of my 43 lack of experience. 44 45Note on Q3 plugin: 46 The new Q3 plugin understands and processes motd packets. The default motd 47 is "Insert MOTD here.". If you want to change the motd then you have to 48 edit "plugins/libq3.c". At the beginning of the file there's a line which 49 reads: #define Q3M_MOTD "Insert MOTD here." 50 Just replace "Insert MOTD here." with your own motd, recompile the Q3 51 plugin and enjoy. 52 Beware! The Q3 Master's ports partially collide with the EF Master's ports. 53 So you can't run both a EF and Q3 Master on the same IP address. By 54 default, both plugins will be installed. So you'll have to delete one of 55 them. 56 If you want to serve lists for both games you have to start 2 masterservers 57 which use 2 different plugin directories and are bound to different IPs. 58 59Note on Q2/H2 plugins: 60 They're very similar because Heretic2 is based on the Q2 engine. Both 61 plugins haven't had much testing. So far I made sure that they write 62 servers into their server list and correctly send it out when requested. 63 64Note on D3 plugin: 65 This is a barebones implementation. Only processes "heartbeat" and 66 "getServers" packets. Other packets are ignored. 67 68Note on EF plugin: 69 Again a barebones implementation. Only "getservers", "getmotd", "heartbeat" 70 and "heartstop" packets are processed. Other packets are ignored. 71 The default motd is "Insert MOTD here.". If you want to change it then you 72 have to edit "plugins/libef.c". Near the beginning of the file there's a 73 line which reads: #define EFM_MOTD "Insert MOTD here." 74 Just replace "Insert MOTD here." with your own motd, recompile the EF 75 plugin and enjoy. 76 Beware! The EF Master's ports partially collide with the Q3 Master's ports. 77 So you can't run both a EF and Q3 Master on the same IP address. By 78 default, both plugins will be installed. So you'll have to delete one of 79 them. 80 If you want to serve lists for both games you have to start 2 masterservers 81 which use 2 different plugin directories and are bound to different IPs. 82 83The usual "make; make install". 84 85# make 86# make install (as root) 87 88Now, you're ready to go. 89 90By default the plugins are installed in "/usr/lib/lasange/masterserver" and the 91binary is installed in "/usr/bin". If that isn't to your liking you can change 92the destinations in the Makefile. 93 94masterserver can be started as any user. (preferably as a non privileged user) 95It also has the ability to bind to specific interfaces. (Attention: This is a 96Linux-only feature) If you want to do that masterserver needs to be root. After 97masterserver has created and bound the sockets to the interface(s) it drops the 98root privileges to the user and group specified on the command line, using the 99"-u" and "-g" options. 100 101In the Makefile there are 2 other targets, named "masterserver" and "plugins", to either 102compile only the masterserver or only the plugins. 103 104There is no configuration file. 105By default masterserver reads all files in the MASTERSERVER_LIB_DIR, 106which is defined in masterserver.h and opens all files as shared objects. 107Or you can specify a different directory via the "-p" command line 108switch. MASTERSERVER_LIB_DIR defaults to "/usr/lib/lasange/masterserver". 109 110Btw, to uninstall masterserver, run "make uninstall". (as root) 111 112 113Note for masterserver usage on LAN parties: 114------------------------------------------- 115You should setup the following DNS names to point to the IP on which 116masterserver will run. 117 118libq3/Quake3 119 Q3 master DNS name: master.quake3arena.com 120 Q3 MOTD DNS name: update.quake3arena.com 121 Q3 auth DNS name: authorize.quake3arena.com 122 123 server command line options: 124 +set sv_master1 10.0.0.1 +set sv_master2 masterserver.exhale.de 125 126 You can specify up to 5 masters. 127 128 129libq2/Quake2 130 server command line options: 131 +set public 1 +setmaster 10.0.0.1 masterserver.exhale.de 132 133 You can specify up to 7 masters. 134 135 136libh2/Heretic2 137 H2 master DNS name: master.ravensoft.com 138 139 server command line options: 140 +set public 1 +setmaster 10.0.0.1 masterserver.exhale.de 141 142 You can specify up to 7 masters. 143 144 145libqw/QuakeWorld 146 server command line options: 147 +setmaster 10.0.0.1 10.0.0.2 148 149 You can specify up to 8 masters. 150 151 152libd3/Doom3 153 Doom3 master DNS name: idnet.ua-corp.com 154 155 Doom3 server command line options: 156 +set net_master0 10.0.0.1 +set net_master1 masterserver.exhale.de 157 158 You can specify up to 5 masters. 159 160 161libef/Star Trek Voyager: Elite Force 162 EF master DNS name: master.stef1.ravensoft.com 163 EF MOTD DNS name: motd.stef1.ravensoft.com 164 EF auth DNS name: authenticate.stef1.ravensoft.com 165 166 server command line options: 167 +set sv_master1 10.0.0.1 +set sv_master2 masterserver.exhale.de 168 169 You can specify up to 5 masters. 170 1714. Misc 172------- 173 174Thanks to: 175---------- 176iptables team for their source code from which I've learned how to use 177shared objects. <http://www.netfilter.org> 178 179Ingo Rohlfs <irohlfs@irohlfs.de> for suggestions on the thread system and the 180nightly debugging sessions. 181 182Viktor Vasilev aka shr1k3 <shr1k3@gmx.at> 183 Suggestions and code auditing 184 Logging code 185 FreeBSD support 186 letting me test the code on his machine 187 188qstat team for their source code <http://www.qstat.org> 189 190fatty <fatty@gmx.ch> 191 packet dumps which helped fix a small bug in libq2 192 suggestions 193 194QuakeForge <http://www.quakeforge.net> 195 QW protocol 196 197<XL*g0b> <g0b@arcor.de> 198 capturing Doom3 packets 199 200ID Software <http://www.idsoftware.com> 201 releasing their old engines under the GPL 202 203Last modified: 2005-05-28 by Andre' Schulz 204 205