README 6.3 KB

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