Documentation

CrystalAntiVPN — VPN & Proxy Detection

VPN, proxy, Tor and datacenter detection for Paper servers and Velocity proxies with cached, quota-safe lookups.

This is a preserved product reference. Check the current listing for release-specific dependencies and support. Ask for help.

Reference information

Guide version: current release Supported platforms: Paper 1.21.x and forks · Velocity 3.4+ Guide updated: November 2026

Overview

CrystalAntiVPN checks every connecting player for VPNs, proxies, Tor exit nodes and datacenter or hosting addresses before they join. The same JAR contains a Paper adapter and a Velocity adapter, and each platform loads only its own. Detection, configuration, commands and messages are shared. • Categories: VPN, PROXY, SOCKS_PROXY, HTTP_PROXY, RESIDENTIAL_PROXY, TOR and DATACENTER • Actions per category: ALLOW, NOTIFY (let in and alert staff) or KICK • AUTOMATIC enforcement, or STAFF_REVIEW mode where nobody is kicked automatically • Providers: the official Tor exit list (local), proxycheck.io and ip-api.com • Result cache in memory and on disk, rate limits, daily caps and circuit breakers to protect your quota • IP and CIDR allowlists, player exemptions and per-category bypass permissions • Masked or hashed IPs in console and history logs Players are never banned by CrystalAntiVPN. Privacy While a remote provider is enabled, the address of every connecting player that is not cached, allowlisted or exempt is sent to that provider. CrystalAntiVPN never sends anything to Crystal Developments.
RequirementSupported value
Java21 or newer
PaperPaper 1.21.x and forks such as Purpur and Pufferfish (built against Paper API 1.21.11)
VelocityVelocity 3.4 or newer
OptionalLuckPerms on Paper, to resolve bypass permissions before join
NetworkOutbound HTTPS to the enabled providers

Installation

Single Paper server 1. Stop the server and put the CrystalAntiVPN JAR in plugins/. 2. Start the server; plugins/CrystalAntiVPN/ is created. 3. Optionally add a free proxycheck.io API key in providers.yml (100 queries per day without a key, 1,000 with a free key). 4. Review the actions in config.yml and run /cavpn reload. Velocity network (recommended) 1. Install the JAR on Velocity; its files are created in plugins/crystalantivpn/. 2. Keep velocity.enforce-at: LOGIN so exemptions and bypass permissions work. 3. If you also install it on backends, set paper.when-behind-proxy: SKIP there. Behind BungeeCord legacy forwarding, forwarded addresses are not verified: firewall the backend port so only the proxy can connect. The forwarding mode is detected once at startup, so restart after changing forwarding settings. The plugin only reads paper-global.yml and spigot.yml and never changes them.
plugins/CrystalAntiVPN/
├── config.yml        actions, enforcement, cache, allowlist, exemptions, logging
├── providers.yml     provider order, API keys and limits
├── messages.yml      all texts
├── data/cache.tsv            persisted result cache
├── data/tor-exit-list.txt    last downloaded Tor exit list
└── logs/history-YYYY-MM-DD.log

Detection & Actions

When an address matches several categories, the strictest action wins. UNKNOWN is the provider failure policy, used when no provider could answer because of an outage, timeout or quota; it is never treated as CLEAN. A login waits at most detection.login-timeout-ms (default 4000 ms) for a result. After that it is handled as UNKNOWN, while the lookup finishes in the background and is cached for the next attempt. With enforcement: STAFF_REVIEW, KICK actions are not applied automatically; staff with crystalantivpn.notify receive a review alert and decide themselves.
enforcement: AUTOMATIC   # or STAFF_REVIEW
actions:
  VPN: KICK
  TOR: KICK
  PROXY: KICK
  SOCKS_PROXY: KICK
  HTTP_PROXY: KICK
  RESIDENTIAL_PROXY: NOTIFY
  DATACENTER: NOTIFY
  CLEAN: ALLOW
  UNKNOWN: ALLOW

Providers

Local providers are always asked first; if the Tor list already detects something, remote providers are not asked. In mode: FALLBACK (default) remote providers are asked in order and the chain stops at the first full answer. mode: ALL asks every enabled remote provider and merges the detections, using more quota. Each provider has its own timeout, retries with backoff, requests-per-minute limit, daily cap and circuit breaker. API keys are never written to logs.
ProviderDefaultReportsSends player IPs
tor-exit-listEnabledTOR, from the official list refreshed every 60 minutesNo
proxycheckEnabledVPN, PROXY, RESIDENTIAL_PROXY, TOR and DATACENTER, plus risk, ASN, organisation and countryYes (HTTPS)
ip-apiDisabledPROXY and DATACENTERYes; the free endpoint is plain HTTP and needs allow-insecure-http: true, a Pro key uses HTTPS

Trusted Connections

Trusted connections are allowed without a lookup, so they never use quota. They are checked in this order: non-public address, allowlist, player exemption, bypass permission. • allowlist.ips: single IPv4 or IPv6 literals; host names are never resolved. • allowlist.cidrs: ranges such as 198.51.100.0/24; /0 ranges are rejected. Every entry is validated individually, so one typo can never disable detection. • exemptions.players: UUIDs or names. They apply once the player is identified (always on Paper, at LOGIN on Velocity). Prefer UUIDs on offline-mode servers. • Bypass permissions: on Paper they need LuckPerms with paper.luckperms-bypass: true; on Velocity they work with enforce-at: LOGIN. A per-category bypass ignores only that category.
allowlist:
  ips: ["203.0.113.7"]
  cidrs: ["198.51.100.0/24", "2001:db8::/48"]
exemptions:
  players: ["069a79f4-44e9-4726-a5be-fca90e38aaf5"]

# Let staff use a VPN (LuckPerms)
/lp group staff permission set crystalantivpn.bypass.vpn true

Commands

Main command /cavpn, alias /crystalantivpn. Lookups started by players share a budget of 20 per minute, so commands cannot drain the quota used by logins. Full IPs are only shown to the console and to holders of crystalantivpn.admin.
CommandPermissionPurpose
/cavpn helpNoneList the commands you can use
/cavpn statuscrystalantivpn.statusPlatform, enforcement, providers, cache, allowlist and configuration problems
/cavpn check <player>crystalantivpn.checkLook up an online player and preview the decision
/cavpn lookup <ip>crystalantivpn.lookupLook up any public IP address
/cavpn statscrystalantivpn.statsConnections, decisions, detections, cache hits and provider requests
/cavpn cache clearcrystalantivpn.adminClear the result cache
/cavpn reloadcrystalantivpn.reloadReload all files
/cavpn versionNonePlugin, platform and Java version

Permissions

All bypass permissions default to false, and crystalantivpn.admin does not include them.
PermissionDefaultPurpose
crystalantivpn.adminOperatorFull /cavpn access, alerts and full IPs
crystalantivpn.reload · status · check · lookup · statsOperatorIndividual /cavpn subcommands
crystalantivpn.notifyOperatorReceive detection, kick and review alerts
crystalantivpn.bypassFalseNever checked
crystalantivpn.bypass.<category>FalseIgnore one category: vpn, proxy, socks-proxy, http-proxy, residential-proxy, tor or datacenter

Configuration

Apply changes with /cavpn reload. Changing the number of provider threads requires a restart.
PathDefaultPurpose
enabledtrueMaster switch
enforcementAUTOMATICAUTOMATIC or STAFF_REVIEW
detection.login-timeout-ms4000Longest wait for a result (500 to 20000)
cache.max-entries10000Addresses kept in memory
cache.clean-ttl-minutes60Reuse time for clean results
cache.detected-ttl-minutes15Reuse time for detections
cache.unknown-ttl-seconds30Short cache for failed lookups
cache.persisttrueKeep the cache in data/cache.tsv
alerts.notify-on-kicktrueAlert staff when somebody is kicked
logging.consoleDETECTIONSNONE, DETECTIONS or ALL
logging.ip-formatMASKEDMASKED, HASHED or FULL
history.retention-days14Days to keep history logs
paper.when-behind-proxyCHECKCHECK or SKIP behind Velocity modern forwarding
paper.legacy-forwardingCHECKCHECK or SKIP behind BungeeCord forwarding
velocity.enforce-atLOGINLOGIN, or PRE_LOGIN where only the allowlist applies
providers.yml modeFALLBACKFALLBACK or ALL
providers.yml threads4Lookup worker threads (restart required)

FAQ & Troubleshooting

Every player appears with the same IP. The server is behind a proxy without forwarding. Enable Velocity modern forwarding or BungeeCord forwarding, or run CrystalAntiVPN on the proxy instead. Players with a VPN are not kicked. Check enforcement (STAFF_REVIEW never kicks), the action for that category, bypass permissions and the allowlist. Use /cavpn check <player> to see the detections and the decision. The status shows provider failures. Run /cavpn status. Access denied means a wrong API key; query denied usually means the daily quota is used up. Repeated failures pause a provider through its circuit breaker, and logins then use the UNKNOWN action. Bypass permissions do nothing on Paper. Install LuckPerms and keep paper.luckperms-bypass: true, or use exemptions.players. Does it ban players? No. It only allows, notifies or kicks.

Support

For help, join the official Crystal Developments Discord: https://discord.gg/j6rHpCSKeJ. Include the output of /cavpn version and /cavpn status, your platform and forwarding setup, relevant console lines and your configuration with API keys removed.