blob: f517623c6c8d78b3002988e35cf6e9e198f3a7f2 (
plain) (
blame)
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
|
# Configuration file
## Location
The configuration file is automatically created in the working directory.
The file name is `config.json`.
## Example
This is an example configuration file with two servers. Remember to install
[the chat command plugin](https://github.com/HimbeerserverDE/mt-multiserver-chatcommands)
if you need it and to configure the permissions.
```json
{
"Servers": {
"ServerName1": {
"Addr": "minetest.local:30000"
},
"ServerName2": {
"Addr": "minetest.local:30001"
}
}
}
```
## Format
The configuration file contains JSON data. The fields are as follows.
> `NoPlugins`
```
Type: bool
Default: false
Description: Plugins are not loaded if this is true.
```
> `NoAutoPlugins`
```
Type: bool
Default: false
Description: Plugin subdirectories are not built automatically if this is true.
```
> `CmdPrefix`
```
Type: string
Default: ">"
Description: A chat message is handled as a chat command
if it is prefixed by this.
```
> `RequirePasswd`
```
Type: bool
Default: false
Description: Empty passwords are rejected if this is true.
```
> `SendInterval`
```
Type: float32
Default: 0.09
Description: The recommended send interval for clients.
The proxy itself doesn't have a fixed send interval.
```
> `UserLimit`
```
Type: int
Default: 10
Description: The maximum number of players that can be connected to the proxy
at the same time.
```
> `AuthBackend`
```
Type: string
Default: "files"
Values: "files", "mtsqlite3", "mtpostgresql"
Description: The authentication backend to use.
Consider converting your existing database instead of loading it directly.
```
> `AuthPostgresConn`
```
Type: string
Default: ""
Description: The postgres connection string for the authentication database.
Used in conjunction with the mtpostgresql authentication backend.
```
> `BindAddr`
```
Type: string
Default: ":40000"
Description: The proxy will listen for new clients on this address.
```
> `DefaultSrv`
```
Type: string
Default: ""
Description: The default server to connect new clients to. May be a group.
```
> `Servers`
```
Type: map[string]Server
Default: map[string]Server{}
Description: The list of internal servers served by this proxy.
The first server is the default server new clients are connected to.
```
> `Server.Addr`
```
Type: string
Default: ""
Description: The network address and port of an internal server.
```
> `Server.MediaPool`
```
Type: string
Default: Server name (map key)
Description: The media pool this server is part of.
See [media_pools.md](https://github.com/HimbeerserverDE/mt-multiserver-proxy/blob/main/doc/media_pools.md)
for more information.
```
> `Server.Groups`
```
Type: []string
Default: []string{}
Description: The server groups this server is in. Group hopping and default server
selection accept server groups on top of regular server names,
randomly choosing one of its servers. If a server name and a group name
are in conflict, the server name is preferred.
This feature can be used to implement simple load balancing.
See [server_groups.md](https://github.com/HimbeerserverDE/mt-multiserver-proxy/blob/main/doc/server_groups.md)
for more information.
```
> `Server.Fallbacks`
```
Type: []string
Default: []string{}
Description: The names of the servers a client should fall back to
if this server shuts down or crashes gracefully. Connection attempts
are made in the order in which the servers are given. As soon as
a connection is successful the other fallback servers in this list
will be ignored.
```
> `ForceDefaultSrv`
```
Type: bool
Default: false
Description: Players are connected to the default server instead of
the server they were playing on if this is true.
```
> `KickOnNewPool`
```
Type: bool
Default: false
Description: Players are kicked if a new media pool is added
by reloading the config if this is true.
```
> `CSMRF`
```
Type: CSMRF
Default: CSMRF{}
Description: The CSM Restriction Flags to send to clients.
Don't rely on this since it can trivially be bypassed.
```
> `CSMRF.NoCSMs`
```
Type: bool
Default: false
Description: Loading CSMs is disabled if this is true.
```
> `CSMRF.ChatMsgs`
```
Type: bool
Default: false
Description: CSMs can send chat messages if this is true.
```
> `CSMRF.ItemDefs`
```
Type: bool
Default: false
Description: CSMs can read item definitions.
```
> `CSMRF.NodeDefs`
```
Type: bool
Default: false
Description: CSMs can read node definitions.
```
> `CSMRF.NoLimitMapRange`
```
Type: bool
Default: false
Description: CSMs can look nodes up no matter how far away they are.
```
> `CSMRF.PlayerList`
```
Type: bool
Default: false
Description: CSMs can access the player list.
```
> `MapRange`
```
Type: uint32
Default: 0
Description: The maximum distance from which CSMs can read the map.
```
> `FallbackServers`
```
Type: []string
Default: []string{}
Description: Names of general fallback servers to connect to
if a connection attempt fails or an existing connection
to a game server is lost.
```
> `DropCSMRF`
```
Type: bool
Default: false
Description: Servers cannot override CSM Restriction Flags if this is true.
```
> `Groups`
```
Type: map[string][]string
Default: map[string][]string{}
Description: The list of permission groups.
```
> `Groups[k]`
```
Type: []string
Default: []string{}
Description: The list of permissions the group has.
Trailing wildcards are supported: Permissions with an asterisk at the end
match any permission requirement that starts with the string preceeding it.
Asterisks in other places are treated as regular characters.
```
> `UserGroups`
```
Type: map[string]string
Default: map[string]string{}
Description: This sets the group of a user.
```
> `UserGroups[k]`
```
Type: string
Default: "default"
Description: The group of the user.
```
> `List`
```
Type: List
Default: List{}
Description: This contains information on how to announce to the server list.
```
> `List.Enable`
```
Type: bool
Default: false
Description: If this is set to true server list announcements are sent.
```
> `List.Addr`
```
Type: string
Default: ""
Description: The base URL of the list server.
```
> `List.Interval`
```
Type: int
Default: 300
Description: The interval between server list announcements.
```
> `List.Name`
```
Type: string
Default: ""
Values: Any non-zero string
Description: The name to be displayed on the server list.
```
> `List.Desc`
```
Type: string
Default: ""
Description: The description for the server list.
```
> `List.URL`
```
Type: string
Default: ""
Description: The website for this server.
```
> `List.Creative`
```
Type: bool
Default: false
Description: The creative server list flag.
```
> `List.Dmg`
```
Type: bool
Default: false
Description: The damage server list flag.
```
> `List.PvP`
```
Type: bool
Default: false
Description: The PvP server list flag.
```
> `List.Game`
```
Type: string
Default: ""
Description: The subgame displayed on the server list.
```
> `List.FarNames`
```
Type: bool
Default: false
Description: The server list flag that shows whether far players are visible.
```
> `List.Mods`
```
Type: []string
Default: []string{}
Description: The list of mods to be displayed on the server list.
```
|