vpndetection-next 2.1.26 → 2.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -87,9 +87,10 @@ blockCondition: { isVpn: true, vpn: { provider: 'nordvpn' } } // one pro
87
87
  blockCondition: { isResproxy: true, resproxy: { hits: { gte: 5 } } } // a numeric threshold
88
88
  blockCondition: { vpn: { confidence: ['high', 'medium'] } } // any of these
89
89
  blockCondition: [{ isTor: true }, { isResproxy: true }] // a list is OR
90
+ blockCondition: { isBot: true } // a bot, such as a crawler, on every plan
90
91
  ```
91
92
 
92
- Values are matched by equality, strings without regard to case. An array means any-of. `{ gte, gt, lte, lt }` compares numbers, and every bound you give must hold, so two of them are a range. Members you set to `false` or `null` are ignored, so a condition states the signals you act on; one that constrains nothing would match every request, and is refused when the proxy is created rather than silently blocking all your traffic.
93
+ Values are matched by equality, strings without regard to case. An array means any-of. `{ gte, gt, lte, lt }` compares numbers, and every bound you give must hold, so two of them are a range. A member the answer holds as a list (`web`, `pubproxy.protocols`, `bittorrent.clients`, `bot.agents`, `bot.categories`) is never matched, so block on its flag alone, such as `isBot`. Members you set to `false` or `null` are ignored, so a condition states the signals you act on; one that constrains nothing would match every request, and is refused when the proxy is created rather than silently blocking all your traffic.
93
94
 
94
95
  Replace the refusal with `onBlocked`. A redirect is usually friendlier than a 403:
95
96
 
@@ -171,7 +172,7 @@ Beyond a few million distinct visitors a day, stop calling the API per request:
171
172
 
172
173
  ## Absent is not false
173
174
 
174
- Unlimited, with a key or without one, leaves out `isHosting`, `isCdn` and the four proxy flags, and of the detail behind each flag it answers only Tor's and relay's. A field your plan does not include is absent, which means "not in your plan" rather than "checked, and no".
175
+ Unlimited, with a key or without one, leaves out `isHosting`, `isCdn`, the four proxy flags, the carrier, satellite and service flags, `bot`, `company` and `abuse`, and of the detail behind each flag it answers only Tor's and relay's. A field your plan does not include is absent, which means "not in your plan" rather than "checked, and no".
175
176
 
176
177
  ```ts
177
178
  lookup.result?.is_hosting ?? false // when you only want the flag
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpndetection-next",
3
- "version": "2.1.26",
3
+ "version": "2.1.28",
4
4
  "description": "Official Next.js proxy/middleware for the VPNDetection API. Detect VPNs, proxies, Tor, hosting and CDN visitors on every request.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "node": ">=22"
45
45
  },
46
46
  "dependencies": {
47
- "vpndetection": "^5.17.1"
47
+ "vpndetection": "^5.19.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "next": ">=15"