Add prevent-proxy-connections option to make sending client IP to Mojang toggleable

This commit is contained in:
Mark Vainomaa
2020-05-08 03:03:49 +03:00
parent 5424c55f09
commit 21f03d5d50
3 changed files with 28 additions and 3 deletions

View File

@@ -62,6 +62,15 @@ public interface ProxyConfig {
*/
boolean isOnlineMode();
/**
* If client's ISP/AS sent from this proxy is different from the one from Mojang's
* authentication server, the player is kicked. This disallows some VPN and proxy
* connections but is a weak form of protection.
*
* @return whether to prevent client proxy connections by checking the IP with Mojang servers
*/
boolean shouldPreventClientProxyConnections();
/**
* Get a Map of all servers registered in <code>velocity.toml</code>. This method does
* <strong>not</strong> return all the servers currently in memory, although in most cases it