IP lookup
Module info | |
---|---|
Configuration | ip-lookup in config.yml |
Manager | IPLookupManager |
Support | 1.8+ |
Free version | ✔ |
Proxy-configurable | ✔ |
ChatPlugin includes an IP lookup module which is based on MaxMind's GeoLite2 services.
If you are using a multiple server setup (proxy) you have to configure the feature only on the proxy, however you have to - just - enable it on every server; requests from instances under the network will be handled by the proxy.
Setup
Before you start, you need to follow these steps:
- sign up for a free account from MaxMind's website and fill the form with your info and data, then agree to their EULA
- confirm your account by clicking the link they sent to your email address, set up a password and login
- find "Manage license keys" in the sidebar and click on "Generate new license key"
- click "No" in the dialogue which asks about GeoIP Update compatibility and click "Confirm"
- copy the new key in a safe place as you will not be able to view it in full again
You will need to insert both the user ID and the key in the configuration shown below.
The following snippet of code represents and explains the IP lookup's configuration.
# ...languages' settings...
ip-lookup:
enabled: false # whether to enable or disable this module
load-on-join: false # whether to lookup IPs of joined players
method: REMOTE # read below
database-folder: '{0}/files' # where to store the database; used by LOCAL method
cache-time: 5m # read below
maxmind-account:
user-id: '' # MaxMind account's user ID
key: '' # MaxMind account's key
max-ips-stored: 10 # IPs stored per player; max = 15
# ...GUIs' settings...
71
72
73
74
75
76
77
78
79
80
81
NOTE
This module is disabled by default.
The plugin currently supports 2 methods specifiable at method
:
LOCAL
: makes local requests handled by the local database; available on premium version onlyREMOTE
: makes remote requests to the MaxMind's website
Feature | LOCAL | REMOTE |
---|---|---|
Average response time | 0 ms | 300-400 ms |
Max requests per day | unlimited | 1000 |
Max requests per second | ~500 | 2/3 |
Free version | ❌ | ✔ |
Anti ban evading system | ✔ | ❌ |
Memory usage | very low | N/A |
Disk usage | ~70 MB | 0 MB |
Data age[1] | depends | real time |
[1]: Data is gathered in real time when using the remote method, while local databases need to be updated to ensure data is always up to date: they are updated automatically once a month as soon as the server is restarted.
As you can see a local setup works better in most cases, but if you don't need extremely fast response times it's okay to use the remote one. Just make sure your server doesn't exceed 1000 requests per day. If you want more than 1K requests per day with the remote mode you can also consider upgrading your MaxMind account to a paid plan.
Load on join option
This module can be configured at load-on-join
to lookup a player's IP when they join the server. Enabling this will grant zero latency when you open the Playerinfo GUI and when you use the /iplookup
command. Note that this option is different for each server and not present on the proxy.
WARNING
This option will make a request every time a player joins your server. Make sure not to exceed 1000 requests per day if you are using the (free) remote lookup method.
Caching
Every IP lookup is cached for a short time to improve performance. You can change the duration at cache-time
. Refer to the Getting started/Syntax/Timestamps page to find out the timestamp specifiable. Cache cannot be disabled entirely on a multi instance setup, but you can set it to very low values (like 5 seconds), although it is not recommended; values from 5 to 15 minutes should be perfect. Note that this option is different for each server. Usually values on server instances should be higher than the one set in the proxy. Online players' IP lookups are kept loaded until they leave the server.
Placeholders
Every player's IP lookup request has a set of placeholders available which are described here.
ChatPlugin - A complete yet lightweight plugin which handles just too many features!
This wiki is currently updated to version 1.9.10.
© 2024 Remigio07
Please report any mistakes and misspellings as described at Home/Reporting issues.