ban/shadowban/whitelist for IPs#172
Conversation
Basic implementation of kick command
… also do a refresh command, to load things from disk or save it to disk
start implementing duration of the ban
…the whitelist is already applied on socket level
|
|
||
| /// Path to Steel's bans file (`config/ip-bans.toml`). | ||
| pub const STEEL_IP_BANS_PATH: &str = "config/banned-ips.toml"; | ||
| const MINECRAFT_BANNED_IP_PATH: &str = "config/banned-ips.json"; |
There was a problem hiding this comment.
don't know if 4lve prefer no file and if migration it should have, it will be with a tool and not steel but not sure, personally I am fine with that
There was a problem hiding this comment.
I will let this comment open for him
There was a problem hiding this comment.
found out, there is a command names cli params like ./steel convert banned-ip which converts the minecraft to steel format XD thanks for codex to point that out :D
|
This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes. |
# Conflicts: # steel-login/src/tcp_client.rs # steel/src/lib.rs # steel/src/main.rs
|
Conflicts have been resolved! 🎉 |
|
This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes. |
# Conflicts: # steel/src/config.rs # steel/src/main.rs
|
Conflicts have been resolved! 🎉 |
|
This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes. |
|
Conflicts have been resolved! 🎉 |
|
Thanks for the PR. I like the idea with the steel CLI. But after reviewing it I think the PR is trying to solve too many things at once and has some foundation issues we should not merge as-is I’m going to close this PR for now instead of asking for a large rewrite. The work is still useful as a reference! |
|
discussion what is missing: https://discordapp.com/channels/1428487339759370322/1428487341093421139/1519021214050422906 |
Added the commands:
Thanks @HT06 for this work and help here!
it saves in ip-bans.toml.
More information and the documentation about everything can be found in this PR.
Also a converter from minecraft format to steel format is added.
If steel doesn't find at boot the ip-bans.toml it looks if banned-ip.json can be found and load the data from that.
This can be also triggert via CLI with:
./steel convert banned-ipwhich loads the data and saves it to disk. The server will not be started