vpndetection-fastify 2.1.6 → 2.1.7
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 +5 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ npm install vpndetection-fastify
|
|
|
15
15
|
|
|
16
16
|
Requires Node.js 22 or newer and Fastify 4 or 5. TypeScript types are included.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Lookups need no API key to try: the free plan answers each address's first lookups of the day without one. A free API key answers your organization's first lookups each day with every field, and the basics with no cap. The Data plan answers every field on every lookup, the hosting, CDN and proxy flags and the provider behind each flag among them: create a key in the [console](https://app.vpndetection.io).
|
|
19
19
|
|
|
20
20
|
```js
|
|
21
21
|
import Fastify from 'fastify';
|
|
@@ -84,7 +84,7 @@ await app.register(vpndetection, {
|
|
|
84
84
|
});
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
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
|
|
87
|
+
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 a free key's full answers: 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.
|
|
88
88
|
|
|
89
89
|
## Where the client address comes from
|
|
90
90
|
|
|
@@ -183,7 +183,9 @@ Beyond a few million distinct visitors a day, stop calling the API per request:
|
|
|
183
183
|
|
|
184
184
|
## Absent is not false
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
The free plan's basics leave out `isHosting`, `isCdn`, the four proxy flags, the carrier, satellite and service flags, `isBot`, `bot`, `userAgent`, `company` and `abuse`, and the AS's `type`, and of the detail behind each flag they answer only Tor's and relay's. A field your plan does not include is `undefined`, which means "not in your plan" rather than "checked, and no".
|
|
187
|
+
|
|
188
|
+
`isVpn` is absent from a free key's answer past your organization's full answers for the day, when `trialExpired` is true. It reads `false` on `result`, and a `false` then means "not in this answer", never "not a VPN": `result.raw` has `is_vpn` only when the API sent it, and a `blockCondition` on `isVpn` against that answer is reported under `onMissingField` and never matches.
|
|
187
189
|
|
|
188
190
|
```js
|
|
189
191
|
request.vpndetection.result.isHosting ?? false // when you only want the flag
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpndetection-fastify",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "Official Fastify plugin for the VPNDetection API. Detect VPNs, proxies, Tor, hosting and CDN visitors on every request.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"fastify-plugin": "^5.0.1",
|
|
48
|
-
"vpndetection": "^5.
|
|
48
|
+
"vpndetection": "^5.24.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"fastify": "4.x || 5.x"
|