vpndetection 5.13.2 → 5.14.1
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.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/vpndetection/api/account_wire_api.rb +1 -1
- data/lib/vpndetection/api/api_keys_wire_api.rb +1 -1
- data/lib/vpndetection/api/authorization_wire_api.rb +1 -1
- data/lib/vpndetection/api/database_wire_api.rb +1 -1
- data/lib/vpndetection/api/entitlement_wire_api.rb +1 -1
- data/lib/vpndetection/api/lookup_wire_api.rb +7 -7
- data/lib/vpndetection/api/organization_wire_api.rb +1 -1
- data/lib/vpndetection/api_client.rb +1 -1
- data/lib/vpndetection/api_error.rb +1 -1
- data/lib/vpndetection/api_model_base.rb +1 -1
- data/lib/vpndetection/client.rb +11 -10
- data/lib/vpndetection/configuration.rb +1 -1
- data/lib/vpndetection/models/account_create_apikey_request.rb +1 -1
- data/lib/vpndetection/models/account_created_apikey.rb +1 -1
- data/lib/vpndetection/models/account_org.rb +1 -1
- data/lib/vpndetection/models/account_org_ref.rb +1 -1
- data/lib/vpndetection/models/account_org_wrap.rb +1 -1
- data/lib/vpndetection/models/account_rc.rb +1 -1
- data/lib/vpndetection/models/account_revealed_apikey.rb +1 -1
- data/lib/vpndetection/models/account_user.rb +1 -1
- data/lib/vpndetection/models/apikey_detail.rb +1 -1
- data/lib/vpndetection/models/apikey_list.rb +1 -1
- data/lib/vpndetection/models/asn.rb +1 -1
- data/lib/vpndetection/models/batch_lookup_error.rb +2 -2
- data/lib/vpndetection/models/batch_lookup_request.rb +1 -1
- data/lib/vpndetection/models/batch_lookup_response.rb +1 -1
- data/lib/vpndetection/models/class_detail.rb +1 -1
- data/lib/vpndetection/models/client_registration.rb +1 -1
- data/lib/vpndetection/models/client_registration_request.rb +1 -1
- data/lib/vpndetection/models/database.rb +1 -1
- data/lib/vpndetection/models/database_checksums_response.rb +1 -1
- data/lib/vpndetection/models/database_format.rb +1 -1
- data/lib/vpndetection/models/database_format_size.rb +1 -1
- data/lib/vpndetection/models/database_list.rb +1 -1
- data/lib/vpndetection/models/database_metadata.rb +1 -1
- data/lib/vpndetection/models/database_metadata_column.rb +1 -1
- data/lib/vpndetection/models/database_version.rb +1 -1
- data/lib/vpndetection/models/db_checksums.rb +1 -1
- data/lib/vpndetection/models/device_authorization.rb +1 -1
- data/lib/vpndetection/models/download.rb +1 -1
- data/lib/vpndetection/models/download_list.rb +1 -1
- data/lib/vpndetection/models/entitlement.rb +1 -1
- data/lib/vpndetection/models/entitlement_apikey.rb +1 -1
- data/lib/vpndetection/models/entitlement_error.rb +1 -1
- data/lib/vpndetection/models/entitlement_plan.rb +3 -3
- data/lib/vpndetection/models/entitlement_usage.rb +1 -1
- data/lib/vpndetection/models/error_envelope.rb +1 -1
- data/lib/vpndetection/models/identity.rb +1 -1
- data/lib/vpndetection/models/location.rb +1 -1
- data/lib/vpndetection/models/lookup_error.rb +1 -1
- data/lib/vpndetection/models/lookup_response.rb +22 -12
- data/lib/vpndetection/models/oauth_error.rb +1 -1
- data/lib/vpndetection/models/oauth_metadata.rb +1 -1
- data/lib/vpndetection/models/proxy_detail.rb +1 -1
- data/lib/vpndetection/models/pubproxy_detail.rb +1 -1
- data/lib/vpndetection/models/standing.rb +1 -1
- data/lib/vpndetection/models/token_response.rb +1 -1
- data/lib/vpndetection/models/vpn_detail.rb +1 -1
- data/lib/vpndetection/result.rb +18 -6
- data/lib/vpndetection/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aa942e53419a48689c87aec7d391f184f511d00f2345226f009f55e5a220619
|
|
4
|
+
data.tar.gz: 364888099e627a29db418f32cd3e888a4fdb9648473be5a5d7206fc28cf34e7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8a4ff0ca6c5fe09cce26c920be41385e9bb5f084df10fc83b08541b8d5d5c674dd2922ffbcddf82619450b6997f99ab887bab69d4f2d3e9b2b218d2255a5f51
|
|
7
|
+
data.tar.gz: c8acdffb143c13a8c804a9839af16910e43aa55b5f7a33a60092238bdb6a4bb00560deec9b0b8e134126b026712f61c3423a90156311087c3fd87221dfef9025
|
data/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Requires Ruby 3.3 or newer.
|
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
|
-
**No API key needed to start.**
|
|
26
|
+
**No API key needed to start.** Unlimited, the free plan, answers `ip`, `is_vpn`, Tor and relay detection, `location` and `asn`, with no daily or monthly cap, with a key or without one.
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
29
|
require 'vpndetection'
|
|
@@ -38,14 +38,14 @@ result.asn['name'] # who runs the announcing network
|
|
|
38
38
|
|
|
39
39
|
### With an API key
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Every paid plan answers every field: `is_hosting`, `is_cdn` and the four proxy flags as well, and the provider, confidence and last-seen detail behind each flag. The plans differ only in how many lookups they include, and a free account tries every field, 100 lookups a day. Create a key in the [console](https://app.vpndetection.io), then pass it in:
|
|
42
42
|
|
|
43
43
|
```ruby
|
|
44
44
|
client = VPNDetection::Client.new(api_key: ENV['VPNDETECTION_API_KEY'])
|
|
45
45
|
|
|
46
46
|
result = client.lookup('45.83.91.1')
|
|
47
47
|
result.is_vpn # => true
|
|
48
|
-
result.is_hosting # => true,
|
|
48
|
+
result.is_hosting # => true, on a paid plan
|
|
49
49
|
result.vpn['provider'] # => "nordvpn", on a paid plan
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -67,11 +67,11 @@ acct.usage.requests # => 580
|
|
|
67
67
|
acct.usage.window_end # => when the allowance resets
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Usage counts against the anniversary of your subscription, not the calendar month and not the billing period, and it is the same number a lookup is gated on. `hard_limit` is `nil` on an uncapped plan, which is not the same as zero.
|
|
70
|
+
Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period, and against the UTC day on the free plan; it is the same number a lookup is gated on. `hard_limit` is `nil` on an uncapped plan, which is not the same as zero.
|
|
71
71
|
|
|
72
72
|
### Batch lookup
|
|
73
73
|
|
|
74
|
-
Look up as many addresses as you like at once. Bogons and cached answers are handled locally, and everything else goes to the batch endpoint in chunks of up to 1000 addresses, in parallel. The batch endpoint needs
|
|
74
|
+
Look up as many addresses as you like at once. Bogons and cached answers are handled locally, and everything else goes to the batch endpoint in chunks of up to 1000 addresses, in parallel. The batch endpoint needs a paid plan:
|
|
75
75
|
|
|
76
76
|
```ruby
|
|
77
77
|
results = client.lookup_batch(['45.83.91.1', '8.8.8.8', '1.1.1.1'])
|
|
@@ -241,12 +241,12 @@ Each redirect URI must be https on a public host name, or http on a loopback add
|
|
|
241
241
|
|
|
242
242
|
### Absent is not false
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
Unlimited leaves out `is_hosting`, `is_cdn` and the four proxy flags, and of the detail behind each flag it answers only Tor's and relay's; a free-plan key's answer carries `trial_expired`, true once its daily trial is spent. A field is present when your plan includes it and `nil` when it does not. `nil` means "not in your plan"; `false` means "we checked, and no".
|
|
245
245
|
|
|
246
246
|
```ruby
|
|
247
247
|
result.hosting? # false when absent, for when you only want the flag
|
|
248
|
-
result.included?(:is_hosting) # false
|
|
249
|
-
result.
|
|
248
|
+
result.included?(:is_hosting) # false on Unlimited: not in your plan
|
|
249
|
+
result.trial_expired == true # a free-plan key's daily trial is spent
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
## Other Libraries
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -20,7 +20,7 @@ module VPNDetection
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Batch
|
|
23
|
-
# Answers up to 1000 addresses in one call. Each distinct string in `ips` is one lookup: it costs exactly what `GET /{ip}` costs for that address and comes back with exactly the fields that call would carry for your plan. Exact duplicates collapse to one entry and one lookup. Both maps in the answer are keyed by the string you sent, so nothing has to be lined up by position; the `ip` inside each result is the normalized form. An address that could not be answered sits in `errors` with the status and message the single lookup would have given, and never disturbs the others: a string that is not an address is a `400` there, and an
|
|
23
|
+
# Answers up to 1000 addresses in one call. Each distinct string in `ips` is one lookup: it costs exactly what `GET /{ip}` costs for that address and comes back with exactly the fields that call would carry for your plan. Exact duplicates collapse to one entry and one lookup. Both maps in the answer are keyed by the string you sent, so nothing has to be lined up by position; the `ip` inside each result is the normalized form. An address that could not be answered sits in `errors` with the status and message the single lookup would have given, and never disturbs the others: a string that is not an address is a `400` there, and an overage cap reached part way through leaves the remaining entries as `429`s. The call itself fails only for the reasons below, and a `429` on the call always carries `Retry-After`: the batch is admitted or refused whole by the rate limit, so a per-entry `429` is always the overage cap and never a throttle. A batch needs a paid plan: without a key the call is refused with `401`, and with a key on the free plan with `402`, unless it names one address, which is answered as `GET /{ip}` would answer it. Unlimited looks up one address at a time.
|
|
24
24
|
# @param batch_lookup_request [BatchLookupRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [BatchLookupResponse]
|
|
@@ -30,7 +30,7 @@ module VPNDetection
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Batch
|
|
33
|
-
# Answers up to 1000 addresses in one call. Each distinct string in `ips` is one lookup: it costs exactly what `GET /{ip}` costs for that address and comes back with exactly the fields that call would carry for your plan. Exact duplicates collapse to one entry and one lookup. Both maps in the answer are keyed by the string you sent, so nothing has to be lined up by position; the `ip` inside each result is the normalized form. An address that could not be answered sits in `errors` with the status and message the single lookup would have given, and never disturbs the others: a string that is not an address is a `400` there, and an
|
|
33
|
+
# Answers up to 1000 addresses in one call. Each distinct string in `ips` is one lookup: it costs exactly what `GET /{ip}` costs for that address and comes back with exactly the fields that call would carry for your plan. Exact duplicates collapse to one entry and one lookup. Both maps in the answer are keyed by the string you sent, so nothing has to be lined up by position; the `ip` inside each result is the normalized form. An address that could not be answered sits in `errors` with the status and message the single lookup would have given, and never disturbs the others: a string that is not an address is a `400` there, and an overage cap reached part way through leaves the remaining entries as `429`s. The call itself fails only for the reasons below, and a `429` on the call always carries `Retry-After`: the batch is admitted or refused whole by the rate limit, so a per-entry `429` is always the overage cap and never a throttle. A batch needs a paid plan: without a key the call is refused with `401`, and with a key on the free plan with `402`, unless it names one address, which is answered as `GET /{ip}` would answer it. Unlimited looks up one address at a time.
|
|
34
34
|
# @param batch_lookup_request [BatchLookupRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(BatchLookupResponse, Integer, Hash)>] BatchLookupResponse data, response status code and response headers
|
|
@@ -88,7 +88,7 @@ module VPNDetection
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Lookup
|
|
91
|
-
# Answers what is known about a single IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key,
|
|
91
|
+
# Answers what is known about a single IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key, on Unlimited, the free plan, the answer is `ip`, `is_vpn`, the Tor and relay members, `location` and `asn`.
|
|
92
92
|
# @param ip [String] The IPv4 or IPv6 address to classify.
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @return [LookupResponse]
|
|
@@ -98,7 +98,7 @@ module VPNDetection
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Lookup
|
|
101
|
-
# Answers what is known about a single IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key,
|
|
101
|
+
# Answers what is known about a single IPv4 or IPv6 address. Which fields come back is decided by the presented key; with no key, on Unlimited, the free plan, the answer is `ip`, `is_vpn`, the Tor and relay members, `location` and `asn`.
|
|
102
102
|
# @param ip [String] The IPv4 or IPv6 address to classify.
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @return [Array<(LookupResponse, Integer, Hash)>] LookupResponse data, response status code and response headers
|
|
@@ -151,7 +151,7 @@ module VPNDetection
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# My IP
|
|
154
|
-
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the presented key decides which fields come back, and the request counts against the same
|
|
154
|
+
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the presented key decides which fields come back, and the request counts against the same limits. The address is the one our edge observed, so a request through a proxy or a VPN reports the exit it left through rather than the machine that made it. That is usually the point of asking.
|
|
155
155
|
# @param [Hash] opts the optional parameters
|
|
156
156
|
# @return [LookupResponse]
|
|
157
157
|
def lookup_my_ip(opts = {})
|
|
@@ -160,7 +160,7 @@ module VPNDetection
|
|
|
160
160
|
end
|
|
161
161
|
|
|
162
162
|
# My IP
|
|
163
|
-
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the presented key decides which fields come back, and the request counts against the same
|
|
163
|
+
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the presented key decides which fields come back, and the request counts against the same limits. The address is the one our edge observed, so a request through a proxy or a VPN reports the exit it left through rather than the machine that made it. That is usually the point of asking.
|
|
164
164
|
# @param [Hash] opts the optional parameters
|
|
165
165
|
# @return [Array<(LookupResponse, Integer, Hash)>] LookupResponse data, response status code and response headers
|
|
166
166
|
def lookup_my_ip_with_http_info(opts = {})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
data/lib/vpndetection/client.rb
CHANGED
|
@@ -23,10 +23,9 @@ module VPNDetection
|
|
|
23
23
|
# Signing a person in with OAuth, which needs no API key at all.
|
|
24
24
|
attr_reader :oauth
|
|
25
25
|
|
|
26
|
-
# @param api_key [String, nil]
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# `:unauthorized`. It is trimmed, and a key of blanks alone is no key.
|
|
26
|
+
# @param api_key [String, nil] without one a lookup is on Unlimited, the free
|
|
27
|
+
# plan: `ip`, `is_vpn`, the Tor and relay members, `location` and `asn`, with
|
|
28
|
+
# no daily or monthly cap. A batch needs a key on a paid plan. It is trimmed, and a key of blanks alone is no key.
|
|
30
29
|
# @param cache [Boolean] pass false to disable caching.
|
|
31
30
|
# @param cache_ttl [Numeric] how long an answer stays fresh, in seconds.
|
|
32
31
|
# @param concurrency [Integer] batch requests - chunks of up to 1000 addresses - in flight during a batch, from 1.
|
|
@@ -142,10 +141,11 @@ module VPNDetection
|
|
|
142
141
|
# built without an API key gets an unauthorized error rather than a partial
|
|
143
142
|
# one.
|
|
144
143
|
#
|
|
145
|
-
# Usage counts against the ALLOWANCE WINDOW -
|
|
146
|
-
# subscription, not the calendar month and not the
|
|
147
|
-
#
|
|
148
|
-
#
|
|
144
|
+
# Usage counts against the ALLOWANCE WINDOW - on a paid plan the
|
|
145
|
+
# anniversary of the subscription, not the calendar month and not the
|
|
146
|
+
# billing period, and on the free plan the UTC day - and it is the same
|
|
147
|
+
# number a lookup is gated on. It can lag by a few seconds, because
|
|
148
|
+
# requests are counted in memory and flushed in aggregate.
|
|
149
149
|
#
|
|
150
150
|
# Deliberately NOT cached: the whole point is what has been spent, and a
|
|
151
151
|
# cached answer is a wrong one within seconds of the next request.
|
|
@@ -168,8 +168,9 @@ module VPNDetection
|
|
|
168
168
|
# so one bad entry cannot lose the rest of the answers: the API reports a
|
|
169
169
|
# per-entry failure with the status the single lookup would have answered,
|
|
170
170
|
# and a chunk that fails as a whole marks every address in it. The batch
|
|
171
|
-
# endpoint needs
|
|
172
|
-
#
|
|
171
|
+
# endpoint needs a paid plan: without a key every address sent to it carries
|
|
172
|
+
# an `:unauthorized` error, and a free-plan key's batch of two or more a
|
|
173
|
+
# `:bad_request` (HTTP 402).
|
|
173
174
|
#
|
|
174
175
|
# @param concurrency [Integer, nil] chunks in flight, for THIS batch only.
|
|
175
176
|
# Anything but an Integer from 1 is refused as `:bad_request` before any
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module VPNDetection
|
|
17
17
|
# Why one entry of a batch was not answered, as the single lookup would have reported it.
|
|
18
18
|
class BatchLookupError < ApiModelBase
|
|
19
|
-
# The HTTP status `GET /{ip}` would have answered for this entry: `400` for a string that is not an address, `429` for a
|
|
19
|
+
# The HTTP status `GET /{ip}` would have answered for this entry: `400` for a string that is not an address, `429` for a reached overage cap, `500` when the VPN dataset could not be consulted. A `429` here is never a throttle; the whole call is refused instead.
|
|
20
20
|
attr_accessor :status
|
|
21
21
|
|
|
22
22
|
# The same message the single lookup carries for that status.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#VPNDetection API
|
|
3
3
|
|
|
4
|
-
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: the
|
|
4
|
+
#The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|