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