This is a port of Spigot’s IPWhitelist, a plugin that allows you to whitelist connection coming from only certain IP Addresses. This is mostly useful for servers running behind BungeeCord that can’t, for one reason or another, use a proper firewall.
#How to use
Install IPWhitelist on every SPONGE server in your network. This plugin is NOT installed on BungeeCord.
Configure the plugin to whitelist BungeeCord
???
Profit
(Note : I did not port the setup mode code yet. When I have some free time, I will)
(Note2 : I have not tested this with SpongePI’s IP Forwarding. It’s probably borked).
#Commands
/ipwl addip - Adds the IP to the whitelist
/ipwl remip - Removes the IP of the whitelist
/ipwl list - Lists all whitelisted IPs
/ipwl reload - Reloads the whitelist config.
/ipwl debug - Enables debug mode, which prints the bungee IP of all connecting users
/ipwl setup - Enables setup mode. For this to work, you need to have no whitelist IP addresses.
As I mentioned in the description, I didn’t test SpongePI. Whenever you get IP Forwarding to work, it will probably break IPWhitelist. I need to figure out how to get the real address from Sponge. It might not be possible right now though, I need to check how Sponge does the IP Forwarding bit.
There is also IP Forwarding plugin for Modded Servers - something I wrote to enable IP forwarding. You can try adding that to BungeeCord instead of SpongePls.
Alternatively, try using Waterfall, which is a fork of BungeeCord which has my patch to support Sponge servers built in.
probably won’t work either. The problem is, if you spoof the IP (which is what IP Forwarding does), when I try to get the connection’s IP, I’ll get the user’s real IP instead of bungeecord’s. So the whitelisting won’t work. Spigot has a getRealAddress() that recovers the original address before spoofing. Sponge doesn’t seem to have that.
I just need to do some testing and poking. If I can get my hands on the Socket through reflection or whatever, I can then get the real address. That should work, just need to figure out how to get there.
i was never able to even connect to the bungee with that plugin on the bungee. it just disconnected every time i tried to connect. also having some issues with your nucleus plugin and creating worlds.