Skip to content
egg82 edited this page Aug 8, 2019 · 24 revisions

Sources

Anti-VPN calls its API services "sources". When it checks an IP, it goes out to one of many (or several) websites/services to check the validity of the IP. The website/service processes the request and returns a result. Anti-VPN takes this result, does some calculations (depending on config), and returns it. It then caches this result for some time so a similar request won't need to use up your credits with said service(s). The flow looks like this:

IP request --> Anti-VPN --> Check cache
                                 |
                                 v
                             Is cached?
                             |        |
                             v        v
                           Yes        No
                           |           |
                           v           v
             Get cached result       Fetch from source(s)
                   |                         |
                   v                         v
Return result <-----             Calculate result (if needed)
                   ^                         |
                   |                         v
                   |                    Cache result
                   |                         |
                   |                         v
                   ---------------------------

The "sources" are defined in the config, and so is the method of calculation. You can find more information on the config here.


Anti-VPN is kicking players wrongly / API gives bad results

If you find that Anti-VPN is providing invalid results, then you can check what is going on and why by using /avpn test <ip> and /avpn check <ip>

Running /avpn test <ip> on a "bad" IP will tell you a lot about how the plugin is getting the result. /avpn check <ip> will tell you what the final result actually is.

Remember that in cascade mode (the default mode), the plugin will go through each enabled source one-by-one and select the first valid result it gets. In consensus mode, the plugin will query every source it has available at once and return a final result based on the given responses from each source.

The scenarios are as follows:

  • You are using "cascade" mode and the first result being given to Anti-VPN is "bad" (most likely)
  • You are using "consensus" mode and most sources agree that a particular IP is "bad"

In any case, you can fix the issue by disabling the source or switching to "consensus" mode in the configuration file. You may also whitelist the player by giving them the permission node "avpn.bypass" (recommended) or whitelist the IP by adding it to the "ignore" section of the configuration file (NOT recommended)

tl;dr Most likely you are using "cascade" mode and your primary source is returning bad results. Modify the configuration file and either switch to "consensus" mode or disable any sources giving "bad" results.

You may also whitelist the player by giving them the permission node "avpn.bypass" (recommended) or whitelist the IP by adding it to the "ignore" section of the configuration file (NOT recommended)

Errors

Cascade had no valid/usable sources. or Consensus had no valid/usable sources.

This means one of several things:

  • You've run out of "credits" with each source you have enabled (most likely)
  • You don't have a valid outbound internet connection (DNS/firewall issues, somewhat-likely)
  • All of the sources you've enabled in the config have returned errors (unlikely)

Test your sources with /avpn test <ip> - you will likely see all of them return with the message "Source error"

In order to fix this, check each source you have enabled in the configuration file and see if you've run out of "credits" with each source. In the most likely scenario, you have too many players logging in (your network is too large for the sources you currently have). You will either require more sources to be enabled or API keys with larger limits with sources you currently have enabled. It is recommended that you do both. Then double-check your outbound internet if you can, and re-load the plugin.

tl;dr Modify the config.yml file to enable more sources and/or add API keys with larger limits. Also check your outbound firewall/DNS if you can.

Contents

  • Home
  • Why Anti-VPN?

Setup

Features

  • Plugin Support
    • PLAN
    • PlaceholderAPI
    • LuckPerms/Vault

Developers

Clone this wiki locally