NeumimTo / Pl3xMap

Pl3xMap is a minimalistic and lightweight world map viewer for Paper servers using the vanilla Minecraft rendering style
MIT License
68 stars 7 forks source link

[Feature Request] Show worlds based on IP Whitelist or Login #15

Open Hellcode48 opened 2 years ago

Hellcode48 commented 2 years ago

I would love it if I can make certain worlds show on map if players IP is whitelisted in config or even better a login/register system with groups

Example of IP Whitelist: `Whitelist:

Example of groups: `Groups: default:

NeumimTo commented 2 years ago

This kind of feature is usually handled in your firewall or apache settings. I have mixed feelings and not sure if i want to do this. Whitelisting ips can be costly on server resources and i would suggest you not to do this in your application such as minecraft server.

Basically what you want to do is

setup apache (or ngnix) reverse proxy

the map works as a simple fileserver, if you check the browser networking while browsing a map you will see bunch of GET requests where the world name is part of the url path

add a new rule in your apache virtual host that allows these gets only for your ips you wish to whitelist

For apache you will want to utilize Require ip directive

Hellcode48 commented 2 years ago

I mainly want to hide specific worlds from map but only show for certain people who "login" to the map depending on their group