feat: add connection filters; and config struct;

also move sanitize_addr to mc_server module
This commit is contained in:
Tamipes 2025-12-14 12:56:21 +01:00
parent 3dcf2f03a8
commit 822330ef87
7 changed files with 94 additions and 41 deletions

View file

@ -1,2 +1,6 @@
# Env variables:
- BIND_ADDR(default: 0.0.0.0:25565): the address the server should bind to
- FILTER_CONN(default: '(addr == "10.100.0.1")'): the filter appplied with [evalexpr](https://docs.rs/evalexpr/latest/evalexpr/)
The "context" has the addr variable populated with the address of part of the
handshake packet. Custom filter can be specified, and drop any
connections which match the filter.