Debian Codegraph @

server/README

raw
1 [[ Frozen-Bubble server ]]
2
3
4 Copyright (c) 2004, 2010 Guillaume Cottenceau.
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 version 2, as published by the Free Software Foundation.
9
10
11 The Frozen-Bubble server is a standalone program acting as a
12 bridge between Frozen-Bubble clients (where the players are). It
13 uses the IP protocol thus players need Internet connectivity
14 (though it's possible to play LAN games on a LAN with IP support
15 but no Internet connectivity). It has some logic to control
16 creating and joining a game, and then becomes a pure relay for
17 in-game information communicated between players.
18
19
20 ]] Suitability to clients
21
22 Because all clients connect to the server, the problems arising
23 to clients/gamers behind NAT private networks and firewalls are
24 suppressed. A central repository (triply redundant) provides the
25 list of active servers, which are then presented to the player
26 sorted best pings first. Thus Frozen-Bubble network gaming should
27 be available to most people.
28
29
30 ]] Suitability for hosting
31
32 Because of its bridging nature, the Frozen-Bubble server does not
33 need the Perl game engine and the data. It is written in C
34 language in the hope to be as portable as possible and imposing
35 the lowest dependancy constraints on servers hosting it. It tries
36 to behave as a good citizen by daemonizing and sending log
37 messages to syslog. It is typically distributed as source code or
38 statically linked binary (to prevent a dependancy on a precise
39 libc version and on the glib).
40
41 Check the contents and README of directory 'init' for init tools.
42
43
44 ]] Security
45
46 C programs are ideal targets for crackers, essentially via format
47 attacks. This is why the Frozen-Bubble server has undergone a
48 couple of verifications to ensure it is quite secure and won't
49 compromise your server:
50
51 - it doesn't use arbitrary formats (the format string is always
52 a constant in the program)
53
54 - valgrind has been used to spot and fix any reported memory
55 allocation/manipulation problems, to prevent from exploits and
56 leaks hosing the other services of the server
57
58 - random data has been fed to it ("fuzz testing"), under which a
59 complete remaining stability has been witnessed; then
60 additional or substituted random data has been fed at different
61 places of the protocol with the same goal; this should
62 hopefully reduce exposure to buffer overflows
63
64 - strcpy/strcat/strncpy/strncat are never used; a similar
65 function to OpenBSD's strlcat is used when strcat functionality
66 is needed
67
68 - flawfinder has been used and each spotted item checked/fixed
69
70 - it doesn't need root permission to operate
71
72 Please notice that no serious security guy has audited the code,
73 thus the above described tasks are a mere attempt of the author
74 to do his best, while remaining problems are possible.
75
76 Consider also -fstack-protector for compiling the server if
77 you're using a recent enough gcc.
78
79 Because the security of your server is crucial, our advice is to
80 create and use a special user to run it, in order to prevent from
81 any damage on your personal files if anything bad would happen.
82 You might also want to run it in rbash or with specially crafted
83 ulimits.
84
85
86 ]] Scalability
87
88 The Frozen-Bubble server is not scalable. It is not multi-
89 threaded nor will fork to better handle a lot of parallel
90 requests (though it will handle network messages from players in
91 game before messages from players in lounge, to provide the best
92 gaming experience possible). Additionally, it is limited to 255
93 simultaneous players.
94
95 Due to its rather low upload and CPU consumption, administrators
96 can host more than one logical server (multiple Frozen-Bubble
97 server processes on a single machine), provided they use
98 different TCP ports. The initscript proposed in directory 'init'
99 supports multiple Frozen-Bubble servers out of the box.
100
101
102 ]] Server resource limits
103
104 A built-in upload counter allows to set a limit after which no
105 new players can connect to the server. It is useful for
106 administrators who can't spare more than a defined limited of
107 bandwidth from their hosting solution. It is believed to be
108 better than using kernel shaping or an external tool such as
109 trickle, because reaching the bandwidth limit wouldn't impair
110 existing players.
111
112 Note that server upload bandwidth use is typically between a
113 couple of tens and 1000 bytes/second per connected player (the
114 more players in one game, the more bandwidth is needed per
115 player).
116
117 CPU use is not measurable (always stays at 0% on my p4 machine
118 even when serving 100 simulated players producing high traffic).