| Summary | Detect and block VPN and proxy traffic during user registration, login, and/or globally using the ProxyTracer API. | |
| Repository Link | https://github.com/ProxyTracer/discourse-proxytracer | |
| Install Guide | How to install plugins in Discourse |
This plugin uses the ProxyTracer API to detect and block VPN and proxy traffic in Discourse.
Features
- It gives you fine control over blocking VPN and Proxy users during new user registrations, existing user authentication, or globally for all site visitors. If you’re fine with VPN and Proxy users having read access to your forum then you can save on API requests and only enable it for user registration and authentication.
- It uses caching to store recent IP address evaluations thus saving requests to the API and lowering latency. You can control how long to remember an IP address evaluation in the settings.
- In the event of an API timeout or network failure, the plugin prioritizes user access to prevent wide-scale lockouts. This behavior can be changed through the options.
- Built-in support for exact IP and CIDR subnet whitelisting.
Configuration
- Procure a standard API key from the ProxyTracer Dashboard.
- Navigate to your Discourse administration panel: Admin → Plugins → ProxyTracer to find ProxyTracer’s settings.
- Input your API key into the
ProxyTracer API Keyfield. - Enable the protection parameters by toggling
Enabled during Signup,Enabled during Loginand/orEnabled for All Visitors. - Add any trusted IPs or CIDR ranges to the
Whitelisted IPslist. - (Optional) Adjust the API timeout and Redis cache duration limits to suit your server’s specific traffic requirements.
- (Optional) Customize the Block Message that appears to blocked users. For instance, you can add instructions for contacting the administration of the site in case they believe that the block isn’t warranted and that they’re not accessing the site through a proxy or VPN.
Settings
Include a table of settings and setting descriptions
| Name | Description |
|---|---|
| API Timeout (ms) | How long to wait for the API to respond before timing out. |
| Cache Duration (hours) | How long to remember an IP address before checking the API again. |
| Fail Open on Error | If the API crashes or times out, allow the user to register/login anyway to prevent locking everyone out. |
| Enabled during Signup | Block proxies and VPNs when a new user attempts to register. |
| Enabled during Login | Block proxies and VPNs when an existing user attempts to log in. |
| Enabled for All Visitors | Block proxies and VPNs from accessing or viewing any page on the forum. (Warning: This checks every visitor and heavily utilizes your API quota). |
| Block Message | The exact error message shown to the user when they are blocked. |
| Whitelisted IPs | IP addresses or CIDR ranges (e.g., 192.168.1.0/24) that are strictly allowed to bypass the blocking. |
Network Configuration: Cloudflare & Reverse Proxies
For ProxyTracer to function effectively, the Discourse application must receive the true client IP address.
To ensure correct IP address forwarding you can follow these detailed instructions.
Emergency Access
If you locked yourself out you can regain access by following these simple steps.
If you want to test things then you can signup to ProxyTracer and get some free API credits for testing.
