Open ktnk-dev opened 5 months ago
Thank for request! I think it is useful too.
But, how long would you want to wait for this feature? Your suggestion is good, but in a good way it requires of #3. Because now, to change the settings, we need to stop the application and, accordingly, terminate all tcp sessions. It's painful for the players, my goal is to make "unstoppable" servers.
I also want to make unconstrained interfaces, editing a config file is good, but it will be beautiful if the ip ban command in Minecraft is pair with mineginx. To do this, we need to implement a control channel between mineginx and the local server.
So, we have a three way to implement this feature:
What way will you choose?
But, how long would you want to wait for this feature?
As long as it need to develop and implement this. There is no specific deadline, even if this feature will require a few month of developing :)
in a good way it requires of #3
Not exactly, you can create 2 config files (mineginx.yaml
, banlist.txt
). You can read banlist.txt
when player connected and match player ip with banned list
What way will you choose?
It doesnt matter how this feature will be implemented, so its your choice, but i still dont understand why #3 will be painful for server admins
Im not rust developer, but i think this can help you to implement new feature
edit /src/main.rs:24 > HandshakePacket
struct HandshakePacket {
pub protocol_version: i32,
pub domain: String,
// not a minecraft packet fields
pub already_read: usize,
pub raw: Vec<u8>,
pub ip: String }
edit /src/main.rs:105 > read_handshake_packet()
Ok(HandshakePacket {
domain,
protocol_version,
already_read,
raw: handshake,
ip: client.peer_addr().unwrap() })
new function /src/minecraft/serialization.rs > in_ban_list()
pub fn in_ban_list(ip: &String) {
let banlist = std::fs::read_to_string("banlist.txt").unwrap();
return banlist.contains(ip);
}
import function /src/main.rs
use minecraft::serialization::in_ban_list;
edit /src/main.rs:139 > handle_client()
...
if in_ban_list(&handshake.ip) { return; }
...
Anyway i think #3 is very important and needed in this project, so you can develop this first
Feature request
Add IP ban list to mineginx
Problem
By default all connections via mineginx are routing in "local" network, so you cant ban player by ip. Player's ip is
9.9.9.9
for example, but minecraft server think that it is1.1.1.1
. Another player have9.9.8.8
ip, but server still see1.1.1.1
.My example