Server im LAN-Reiter des Steam-Serverbrowsers: LAN-Ports, Host-Netz, Teamnamen, CSTV +100
This commit is contained in:
1 parent
4521cdae72
commit
0a40688945
14 files changed
+269
-37
No files matched your search
@@ -160,6 +160,12 @@ export class ServerSettings {
|
||||
throw new HttpError(400, `Ungültige Adresse für ${h.name}`, 'invalid');
|
||||
}
|
||||
if (h.volume && !/^[\w.-]+$/.test(h.volume)) throw new HttpError(400, `Ungültiger Volume-Name für ${h.name}`, 'invalid');
|
||||
const lan = h.lanPorts ?? this.config.docker.lanPorts ?? [];
|
||||
const rangeStart = h.portRangeStart ?? this.config.docker.portRangeStart;
|
||||
const rangeEnd = h.portRangeEnd ?? this.config.docker.portRangeEnd;
|
||||
if (lan.some((p) => p >= rangeStart && p <= rangeEnd)) {
|
||||
throw new HttpError(400, `LAN-Ports von ${h.name} dürfen nicht im normalen Portbereich liegen`, 'invalid');
|
||||
}
|
||||
const start = h.portRangeStart ?? this.config.docker.portRangeStart;
|
||||
const end = h.portRangeEnd ?? this.config.docker.portRangeEnd;
|
||||
if (!Number.isInteger(start) || !Number.isInteger(end) || start < 1024 || end > 65535 || end - start < 1) {
|
||||
|
||||
Reference in new issue
Block a user