Document configuration file

master
HimbeerserverDE 2021-08-28 13:02:27 +02:00
parent 8742f5794c
commit 309938eab9
No known key found for this signature in database
GPG Key ID: 1A651504791E6A8B
2 changed files with 125 additions and 5 deletions

View File

@ -31,11 +31,11 @@ type Config struct {
}
CSMRF struct {
NoCSMs bool
NoChatMsgs bool
NoItemDefs bool
NoNodeDefs bool
LimitMapRange bool
NoPlayerList bool
ChatMsgs bool
ItemDefs bool
NodeDefs bool
NoLimitMapRange bool
PlayerList bool
}
MapRange uint32
}

120
doc/config.md Normal file
View File

@ -0,0 +1,120 @@
# Configuration file
## Location
The configuration file is automatically created in the working directory.
The file name is `config.json`.
## Format
The configuration file contains JSON data. The fields are as follows.
> `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: sqlite3
Values: sqlite3
Description: The authentication backend to use. Only SQLite3 is available at the moment.
```
> `BindAddr`
```
Type: string
Default: ":40000"
Description: The proxy will listen for new clients on this address.
```
> `Servers`
```
Type: []Server
Default: []Server{}
Description: The list of internal servers served by this proxy.
```
> `Server.Name`
```
Type: string
Default: ""
Values: Any non-zero string
Description: The unique name an internal server is known as.
```
> `Server.Addr`
```
Type: string
Default: ""
Description: The network address and port of an internal server.
```
> `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.
```