vpndetection-next 2.2.4 → 2.2.6
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.
- package/README.md +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ 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
|
|
90
|
+
blockCondition: { isBot: true } // a bot, such as a crawler, on a paid plan
|
|
91
91
|
```
|
|
92
92
|
|
|
93
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`) matches when any element does: `{ pubproxy: { protocols: 'socks5' } }` matches a proxy that speaks SOCKS5 among others, and an object term such as `{ web: { port: 443 } }` must match one element in full. 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.
|
|
@@ -110,7 +110,7 @@ export const proxy = createProxy({
|
|
|
110
110
|
});
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
A client claiming to be a crawler from an address its operator does not vouch for reads `spoofed`, so `blockCondition: { userAgent: { verdict: 'spoofed' } }` refuses a forged crawler. Any other agent, or none, is not sent, since its verdict could only be `not_bot`. One address is looked up with at most four crawler agents an hour: past those its lookup sends none, and a request passes as a crawler only where the answer's `bot.verified` is true. It is off by default, and then no agent is sent and the cache keeps one answer per address rather than one per address and agent. A verdict needs a paid plan or the trial: a served answer without one is reported once under `onMissingField`.
|
|
113
|
+
A client claiming to be a crawler from an address its operator does not vouch for reads `spoofed`, so `blockCondition: { userAgent: { verdict: 'spoofed' } }` refuses a forged crawler. Any other agent, or none, is not sent, since its verdict could only be `not_bot`. One address is looked up with at most four crawler agents an hour: past those its lookup sends none, and a request passes as a crawler only where the answer's `bot.verified` is true. It is off by default, and then no agent is sent and the cache keeps one answer per address rather than one per address and agent. A verdict needs a paid plan or the trial: a served answer without one is reported once under `onMissingField`. The verdict is a paid member, so an app with no key gets no bot pass.
|
|
114
114
|
|
|
115
115
|
## Doing other work in the same proxy
|
|
116
116
|
|
|
@@ -186,13 +186,13 @@ Beyond a few million distinct visitors a day, stop calling the API per request:
|
|
|
186
186
|
|
|
187
187
|
## Absent is not false
|
|
188
188
|
|
|
189
|
-
Unlimited, with a key or without one, leaves out `isHosting`, `isCdn`, the four proxy flags, the carrier, satellite and service flags, `bot`, `user_agent`, `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".
|
|
189
|
+
Unlimited, with a key or without one, leaves out `isHosting`, `isCdn`, the four proxy flags, the carrier, satellite and service flags, `is_bot`, `bot`, `user_agent`, `company` and `abuse`, and the AS's `type`, 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".
|
|
190
190
|
|
|
191
191
|
```ts
|
|
192
192
|
lookup.result?.is_hosting ?? false // when you only want the flag
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
-
A `blockCondition` naming a member your plan does not serve can never match, so the proxy warns once instead of failing silently. Set `onMissingField: 'throw'` to make it an error.
|
|
195
|
+
A `blockCondition` naming a member your plan does not serve can never match, so the proxy warns once instead of failing silently. Set `onMissingField: 'throw'` to make it an error. A condition on `isBot` or `asn.type` with no key is one: both are a paid plan's, so it never matches and is reported as missing, `asn.type` by its path.
|
|
196
196
|
|
|
197
197
|
## Other Libraries
|
|
198
198
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpndetection-next",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
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.
|
|
47
|
+
"vpndetection": "^5.23.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"next": ">=15"
|