Folleach / mineginx

A minecraft proxy like nginx
5 stars 1 forks source link

IP ban list? #8

Open ktnk-dev opened 5 months ago

ktnk-dev commented 5 months ago

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 is 1.1.1.1. Another player have 9.9.8.8 ip, but server still see 1.1.1.1.

My example

- listen: "0.0.0.0:25565"
  server_names: 
  - "mc.example.com"
  proxy_pass: "10.0.0.1:7777"
  banned_ips: 
  - "9.9.9.9"
  - "9.9.8.x"
client > [check for server_names] > [check for banned_ips] > server
Folleach commented 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?

ktnk-dev commented 5 months ago

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

Example implementation

Im not rust developer, but i think this can help you to implement new feature

ktnk-dev commented 5 months ago

Anyway i think #3 is very important and needed in this project, so you can develop this first