-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathconfig.js.example
234 lines (217 loc) · 7.63 KB
/
config.js.example
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
"use strict"
exports.ConfigSettings = {
servers: [
{
// The port to listen on for this ListenServer.
// You can add as many as you want, as long as they
// are on different ports.
// If you want to load balance one port among many processes
// use something like pm2
listenPort: 7777,
// The list of servers to load-balance between. When someone uses the listenPort
// the server will use the routingServer with the lowest player count and route them
// to it. Domains in the serverIP section are also supported.
// The name of each routingServer must be unique! Even if they are on a different ListenServer.
routingServers: [{
name: "lobby",
serverIP: "127.0.0.1",
serverPort: 7780,
hidden: false,
isVanilla: false,
},
{
name: "lobby-mirror",
serverIP: "127.0.0.1",
serverPort: 7781,
hidden: false,
isVanilla: false,
}]
},
// This server listens on another port, and is not load balanced with the others
// You can switch to it at any time using `/build` or by joining 7778
// Hidden servers will not pop up in server list but players still can access
// using the server name as command.
// Example: `build` will not visible on server list but players can access
// by typing using `/build`
{
listenPort: 7778,
routingServers: [{
name: "build",
serverIP: "127.0.0.1",
serverPort: 7782,
hidden: true,
}]
},
// There's also no need to specify a listenPort.
// A server without a listen port will only be accessible via command-based switching (`/pvp`),
{
routingServers: [{
name: "pvp",
serverIP: "127.0.0.1",
serverPort: 7782,
hidden: false,
isVanilla: false,
}]
}
],
options: {
/* The number of millseconds of inactivity before a client socket is
* destroyed */
socketTimeout: 1000*15,
// Whether or not to disable Nagle's Algorithm (https://en.wikipedia.org/wiki/Nagle's_algorithm)
socketNoDelay: true,
/* You can use this when small patches to Terraria are made
* that do not break compatibility with the server */
fakeVersion: {
enabled: false,
terrariaVersion: 248
},
// Whether or not to enable a "/v2/status"-like http server
restApi: {
enabled: false,
port: 7880,
/* optional */
response: {
/* optional */
name: "",
/* optional */
worldName: "Dimensions Generic",
/* optional */
terrariaServerPort: 7777,
/* optional */
hasServerPassword: false,
/* optional */
maxPlayers: 400,
/* optional */
version: "1.4.3.6",
}
},
/* Whether or not to block invisibility buff.
* This was added here because TShock's version is broken */
blockInvis: false,
// Whether or not to use a blacklist (http service) (for blocking vpn, etc)
blacklist: {
enabled: false,
hostname: "127.0.0.1",
port: 19222,
apiKey: "",
path: "/blacklisted",
errorPolicy: "AllowJoining"
},
// Logging options
log: {
clientTimeouts: false,
clientConnect: false,
clientDisconnect: false,
clientError: false,
checkingClientConnect: false,
checkingClientDisconnect: false,
checkingClientError: false,
checkingClientTimeouts: false,
tServerConnect: false,
tServerDisconnect: false,
tServerError: false,
extensionLoad: true,
outputToConsole: true,
outputToFile: true,
format: {
console: "PlainText",
file: "JSON"
}
},
// Whether to limit connections and what the limit is
connectionLimit: {
enabled: false,
connectionLimitPerIP: 1,
kickReason: "You have exceeded the maximum connection limit of {0}"
},
// Whether to limit creation of connections from
connectionRateLimit: {
enabled: false,
connectionRateLimitPerIP: 10 // num of new connections per second per ip
},
// Whether to use redis for detached reloading
redis: {
enabled: false,
host: "localhost",
port: 6379
},
nameChanges: {
// Prevents a server from changing client's name in dimensions
// modes:
// * "legacy" - Behaviour of v5.9.1 and lower
// 1. Passes through player info packets from client and server even if they have
// a mismatched name.
// * "rewrite" - 1. Never updates a client's name dimensions-side after it has been set,
// unless the packet is from the server and it is excluded from this rule.
// 2. Rewrites packets from the client and the server if they have a name mismatch.
mode: "legacy",
// A list of dimension names that are allowed (only the server itself, not client) to update a client's name
exclusions: [],
},
// Controls which language is used for chat/disconnect messages.
// Options:
// * english
// * en
// * 汉语
// * zn
language: "english",
// Override specific messages from the chosen language
//
// Fields:
// nameAlreadyOnServer
// characterNameLengthOutOfRange
// areYouEvenConnected
// youAreAlreadyInthatDimension
// shiftingToDimension
// youNeedToWaitUntilConnected
// playerCount
// availableDimensions
// youEnteredTheVoid
// dimensionDisconnectedYou
// reason
// dimensionsCommandName
// specifyADimensionToTravel
// dimensionDropped
//
// e.g:
// languageOverrides: {
// playerCount: "We currently have ${total} players on our server."
// }
languageOverrides: {},
// When specified, allows you to override the default settings for debuffing when switching dimensions.
//
// Examples:
// debuffOnSwitch: {
// enabled: false
// }
//
// debuffOnSwitch: {
// enabled: true,
// debuffTimeInSeconds: 5
// }
// debuffOnSwitch: {
// enabled: true,
// buffTypes: [156],
// debuffTimeInSeconds: 5
// }
debuffOnSwitch: {
enabled: true,
},
// Decides what happens when a terraria server kicks a client
//
// Examples:
//
// disconnectOnKick: {
// type: "always",
// }
//
// disconnectOnKick {
// type: "onKickReasonPrefix",
// kickReasonPrefixes: ["Kicked: !disconnect"],
// }
disconnectOnKick: {
type: "never",
}
}
};