Show warning if 127.0.0.1 is IP banned

This commit is contained in:
timvisee 2021-11-17 20:25:40 +01:00
parent 75f7b62b16
commit acf6768b49
No known key found for this signature in database
GPG Key ID: B8DB720BC383E172
2 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@
- Resolve TODOs in code - Resolve TODOs in code
- Don't drop errors, handle everywhere where needed (some were dropped while - Don't drop errors, handle everywhere where needed (some were dropped while
prototyping to speed up development) prototyping to speed up development)
- Spigot/paper plugin to get real player IP from lazymc, reimplement ban-ip
## Nice to have ## Nice to have

View File

@ -46,6 +46,12 @@ pub fn service(config: Arc<Config>, server: Arc<Server>) {
} }
} }
// Show warning if 127.0.0.1 is banned
if server.is_banned_ip_blocking(&("127.0.0.1".parse().unwrap())) {
warn!(target: "lazymc", "Local address 127.0.0.1 IP banned, probably not what you want");
warn!(target: "lazymc", "Use '/pardon-ip 127.0.0.1' on the server to unban");
}
// Keep watching // Keep watching
while watch(&server, &path) {} while watch(&server, &path) {}
} }