vpndetection 5.12.0 → 5.13.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 +10 -9
- data/lib/vpndetection/api/account_wire_api.rb +3 -3
- data/lib/vpndetection/api/api_keys_wire_api.rb +7 -7
- data/lib/vpndetection/api/authorization_wire_api.rb +5 -5
- data/lib/vpndetection/api/database_wire_api.rb +5 -5
- 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 +5 -5
- 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 +7 -4
- 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 +2 -2
- data/lib/vpndetection/models/batch_lookup_error.rb +1 -1
- 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 +1 -1
- 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 +2 -2
- data/lib/vpndetection/models/lookup_error.rb +1 -1
- data/lib/vpndetection/models/lookup_response.rb +12 -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 +19 -17
- 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: 19f67b3d99978bf48bc57ce35856bb63f9fb694c84cefcf6a5fafb6d0947cbce
|
|
4
|
+
data.tar.gz: 5edf4e4d3097810bf3d01ca9d4e7c50da761f7796bc10d7d5983f73262e90a36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 854befe2839b82a145d776e357f85ea819470f2474b7e1431141722fec1c64a85cc438b6b6957c9f32edd0fbcd26a3f6aa23e00305e18486f7d62c40c0acfda3
|
|
7
|
+
data.tar.gz: b2bdccc3fb59c98eb863db25e167b17cd6076f5bdd9f98da13eecb38bcd48d5fa9deb5432c43184c2e5093959096046c6036a23a31c6ac363c96eae6c96f49b1
|
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.** Without a key
|
|
26
|
+
**No API key needed to start.** Without a key a lookup answers `ip`, `is_vpn`, Tor and relay detection, `location` and `asn`, unlimited, with no daily or monthly cap.
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
29
|
require 'vpndetection'
|
|
@@ -31,22 +31,22 @@ require 'vpndetection'
|
|
|
31
31
|
client = VPNDetection::Client.new
|
|
32
32
|
|
|
33
33
|
result = client.lookup('45.83.91.1')
|
|
34
|
-
result.is_vpn
|
|
34
|
+
result.is_vpn # => true
|
|
35
|
+
result.location['country'] # the ISO 3166 country code
|
|
36
|
+
result.asn['name'] # who runs the announcing network
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
### With an API key
|
|
38
40
|
|
|
39
|
-
A free key adds
|
|
41
|
+
A free key adds every other flag, `is_hosting`, `is_cdn` and the four proxy flags, at 50,000 lookups a month, and every paid plan answers every field, the provider, confidence and last-seen detail behind each flag included. The paid plans differ only in how many lookups they include. Batch lookups need a key. Create one in the [console](https://app.vpndetection.io), then pass it in:
|
|
40
42
|
|
|
41
43
|
```ruby
|
|
42
44
|
client = VPNDetection::Client.new(api_key: ENV['VPNDETECTION_API_KEY'])
|
|
43
45
|
|
|
44
46
|
result = client.lookup('45.83.91.1')
|
|
45
47
|
result.is_vpn # => true
|
|
46
|
-
result.
|
|
47
|
-
result.asn['name'] # who runs the announcing network
|
|
48
|
+
result.is_hosting # => true, with any key, a free one included
|
|
48
49
|
result.vpn['provider'] # => "nordvpn", on a paid plan
|
|
49
|
-
result.is_hosting # => true, on a paid plan
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### Your own address
|
|
@@ -71,7 +71,7 @@ Usage counts against the anniversary of your subscription, not the calendar mont
|
|
|
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:
|
|
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 an API key, a free one included:
|
|
75
75
|
|
|
76
76
|
```ruby
|
|
77
77
|
results = client.lookup_batch(['45.83.91.1', '8.8.8.8', '1.1.1.1'])
|
|
@@ -241,11 +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
|
-
Without a key
|
|
244
|
+
Without a key a lookup leaves out `is_hosting`, `is_cdn` and the four proxy flags, and a free key leaves out `vpn` and the detail behind each flag. 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) #
|
|
248
|
+
result.included?(:is_hosting) # false without a key: not in your plan
|
|
249
|
+
result.included?(:vpn) # false on a free key: not in your plan
|
|
249
250
|
```
|
|
250
251
|
|
|
251
252
|
## Other Libraries
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -20,7 +20,7 @@ module VPNDetection
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Identity
|
|
23
|
-
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and
|
|
23
|
+
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field. `scopes` is what the credential may do now, so a client can check before it calls.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [Identity]
|
|
26
26
|
def account_identity(opts = {})
|
|
@@ -29,7 +29,7 @@ module VPNDetection
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Identity
|
|
32
|
-
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and
|
|
32
|
+
# The identity behind this credential: what it is, the organization it is scoped to, and the scopes it currently holds. `user` is present for an OAuth token and absent for an API key, which has an organization but no person behind it. `credential.kind` says which you are holding, so a client can branch without guessing from a missing field. `scopes` is what the credential may do now, so a client can check before it calls.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
|
|
35
35
|
def account_identity_with_http_info(opts = {})
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -20,7 +20,7 @@ module VPNDetection
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create
|
|
23
|
-
# Creates a key and returns its secret.
|
|
23
|
+
# Creates a key and returns its secret. Store the secret now. Reading it back later takes `reveal` and the `apikeys.reveal` scope.
|
|
24
24
|
# @param account_create_apikey_request [AccountCreateApikeyRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [AccountCreatedApikey]
|
|
@@ -30,7 +30,7 @@ module VPNDetection
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create
|
|
33
|
-
# Creates a key and returns its secret.
|
|
33
|
+
# Creates a key and returns its secret. Store the secret now. Reading it back later takes `reveal` and the `apikeys.reveal` scope.
|
|
34
34
|
# @param account_create_apikey_request [AccountCreateApikeyRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(AccountCreatedApikey, Integer, Hash)>] AccountCreatedApikey data, response status code and response headers
|
|
@@ -88,7 +88,7 @@ module VPNDetection
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# List
|
|
91
|
-
#
|
|
91
|
+
# Each key's metadata. A list never carries a secret, here or in the console: `reveal` reads one. `retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read.
|
|
92
92
|
# @param [Hash] opts the optional parameters
|
|
93
93
|
# @return [ApikeyList]
|
|
94
94
|
def account_list_apikeys(opts = {})
|
|
@@ -97,7 +97,7 @@ module VPNDetection
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
# List
|
|
100
|
-
#
|
|
100
|
+
# Each key's metadata. A list never carries a secret, here or in the console: `reveal` reads one. `retrievable` says whether the secret could still be read back at all. A key issued before this product stored secrets recoverably was never kept, so `reveal` will refuse it permanently; rotating produces one that can be read.
|
|
101
101
|
# @param [Hash] opts the optional parameters
|
|
102
102
|
# @return [Array<(ApikeyList, Integer, Hash)>] ApikeyList data, response status code and response headers
|
|
103
103
|
def account_list_apikeys_with_http_info(opts = {})
|
|
@@ -145,7 +145,7 @@ module VPNDetection
|
|
|
145
145
|
end
|
|
146
146
|
|
|
147
147
|
# Reveal
|
|
148
|
-
# Returns an existing key's secret.
|
|
148
|
+
# Returns an existing key's secret. It needs the `apikeys.reveal` scope, which `apikeys.manage` doesn't include. Refused with `NOT_RETRIEVABLE` for a key issued before we kept secrets. Rotate that key instead.
|
|
149
149
|
# @param id [String] The key's ID, as returned by the list endpoint. Never the key itself.
|
|
150
150
|
# @param [Hash] opts the optional parameters
|
|
151
151
|
# @return [AccountRevealedApikey]
|
|
@@ -155,7 +155,7 @@ module VPNDetection
|
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
# Reveal
|
|
158
|
-
# Returns an existing key's secret.
|
|
158
|
+
# Returns an existing key's secret. It needs the `apikeys.reveal` scope, which `apikeys.manage` doesn't include. Refused with `NOT_RETRIEVABLE` for a key issued before we kept secrets. Rotate that key instead.
|
|
159
159
|
# @param id [String] The key's ID, as returned by the list endpoint. Never the key itself.
|
|
160
160
|
# @param [Hash] opts the optional parameters
|
|
161
161
|
# @return [Array<(AccountRevealedApikey, Integer, Hash)>] AccountRevealedApikey data, response status code and response headers
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -331,7 +331,7 @@ module VPNDetection
|
|
|
331
331
|
end
|
|
332
332
|
|
|
333
333
|
# Revoke
|
|
334
|
-
# RFC 7009. Always answers 200,
|
|
334
|
+
# RFC 7009. Always answers 200, even for a token that was never valid, so it can't be used to test whether a token is live. Revoking a refresh token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.
|
|
335
335
|
# @param token [String] An access token or a refresh token.
|
|
336
336
|
# @param [Hash] opts the optional parameters
|
|
337
337
|
# @option opts [String] :client_id Accepted and not checked.
|
|
@@ -342,7 +342,7 @@ module VPNDetection
|
|
|
342
342
|
end
|
|
343
343
|
|
|
344
344
|
# Revoke
|
|
345
|
-
# RFC 7009. Always answers 200,
|
|
345
|
+
# RFC 7009. Always answers 200, even for a token that was never valid, so it can't be used to test whether a token is live. Revoking a refresh token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.
|
|
346
346
|
# @param token [String] An access token or a refresh token.
|
|
347
347
|
# @param [Hash] opts the optional parameters
|
|
348
348
|
# @option opts [String] :client_id Accepted and not checked.
|
|
@@ -403,7 +403,7 @@ module VPNDetection
|
|
|
403
403
|
end
|
|
404
404
|
|
|
405
405
|
# Token
|
|
406
|
-
#
|
|
406
|
+
# Issues tokens for three grant types: a device code, an authorization code and a refresh token. `urn:ietf:params:oauth:grant-type:device_code` polls a device authorization. Until the person approves it answers `authorization_pending`; poll faster than `interval` and it answers `slow_down`, which means widen your interval and keep it widened. `authorization_code` exchanges a code from `/oauth/authorize`, with the `code_verifier` matching the challenge you sent and the same `redirect_uri`. A code works once: presenting it again also revokes what the first exchange issued. `refresh_token` exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it. Presenting a consumed refresh token again ends the whole authorization, since it means the token was copied.
|
|
407
407
|
# @param grant_type [String] `urn:ietf:params:oauth:grant-type:device_code`, `authorization_code` or `refresh_token`.
|
|
408
408
|
# @param client_id [String]
|
|
409
409
|
# @param [Hash] opts the optional parameters
|
|
@@ -420,7 +420,7 @@ module VPNDetection
|
|
|
420
420
|
end
|
|
421
421
|
|
|
422
422
|
# Token
|
|
423
|
-
#
|
|
423
|
+
# Issues tokens for three grant types: a device code, an authorization code and a refresh token. `urn:ietf:params:oauth:grant-type:device_code` polls a device authorization. Until the person approves it answers `authorization_pending`; poll faster than `interval` and it answers `slow_down`, which means widen your interval and keep it widened. `authorization_code` exchanges a code from `/oauth/authorize`, with the `code_verifier` matching the challenge you sent and the same `redirect_uri`. A code works once: presenting it again also revokes what the first exchange issued. `refresh_token` exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it. Presenting a consumed refresh token again ends the whole authorization, since it means the token was copied.
|
|
424
424
|
# @param grant_type [String] `urn:ietf:params:oauth:grant-type:device_code`, `authorization_code` or `refresh_token`.
|
|
425
425
|
# @param client_id [String]
|
|
426
426
|
# @param [Hash] opts the optional parameters
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -155,7 +155,7 @@ module VPNDetection
|
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
# Download
|
|
158
|
-
#
|
|
158
|
+
# Redirects (`302`) to a time-limited link to the database file. The link only has to be valid when the download starts, so a long one isn't cut off when it expires.
|
|
159
159
|
# @param id [String] Dataset ID, e.g. vpn_ip_extended_v1
|
|
160
160
|
# @param format [DatabaseFormat] Not every database is built in every format. The `_provider` catalogs are keyed by provider ID rather than by IP range, so no MMDB exists for them.
|
|
161
161
|
# @param [Hash] opts the optional parameters
|
|
@@ -167,7 +167,7 @@ module VPNDetection
|
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
# Download
|
|
170
|
-
#
|
|
170
|
+
# Redirects (`302`) to a time-limited link to the database file. The link only has to be valid when the download starts, so a long one isn't cut off when it expires.
|
|
171
171
|
# @param id [String] Dataset ID, e.g. vpn_ip_extended_v1
|
|
172
172
|
# @param format [DatabaseFormat] Not every database is built in every format. The `_provider` catalogs are keyed by provider ID rather than by IP range, so no MMDB exists for them.
|
|
173
173
|
# @param [Hash] opts the optional parameters
|
|
@@ -234,7 +234,7 @@ module VPNDetection
|
|
|
234
234
|
end
|
|
235
235
|
|
|
236
236
|
# List
|
|
237
|
-
# Every database this organization
|
|
237
|
+
# Every database this organization can see, licensed or not. `standing` says where its license stands: `licensed`, `expired`, or `unlicensed` for one never bought.
|
|
238
238
|
# @param [Hash] opts the optional parameters
|
|
239
239
|
# @return [DatabaseList]
|
|
240
240
|
def list_databases(opts = {})
|
|
@@ -243,7 +243,7 @@ module VPNDetection
|
|
|
243
243
|
end
|
|
244
244
|
|
|
245
245
|
# List
|
|
246
|
-
# Every database this organization
|
|
246
|
+
# Every database this organization can see, licensed or not. `standing` says where its license stands: `licensed`, `expired`, or `unlicensed` for one never bought.
|
|
247
247
|
# @param [Hash] opts the optional parameters
|
|
248
248
|
# @return [Array<(DatabaseList, Integer, Hash)>] DatabaseList data, response status code and response headers
|
|
249
249
|
def list_databases_with_http_info(opts = {})
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -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 allowance that runs out 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 a spent allowance and never a throttle.
|
|
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 allowance that runs out 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 a spent allowance and never a throttle. A batch needs an API key, a free one included: without one the call is refused with `401`. Keyless lookups are 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 allowance that runs out 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 a spent allowance and never a throttle.
|
|
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 allowance that runs out 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 a spent allowance and never a throttle. A batch needs an API key, a free one included: without one the call is refused with `401`. Keyless lookups are 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 the answer is `ip` and `
|
|
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 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 the answer is `ip` and `
|
|
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 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 allowance. 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.
|
|
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 limit or allowance. 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 allowance. 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.
|
|
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 limit or allowance. 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 = {})
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -20,7 +20,7 @@ module VPNDetection
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Organization
|
|
23
|
-
# The organization this credential is scoped to.
|
|
23
|
+
# The organization this credential is scoped to. A credential belongs to one organization, so this takes no ID.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [AccountOrgWrap]
|
|
26
26
|
def account_org(opts = {})
|
|
@@ -29,7 +29,7 @@ module VPNDetection
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Organization
|
|
32
|
-
# The organization this credential is scoped to.
|
|
32
|
+
# The organization this credential is scoped to. A credential belongs to one organization, so this takes no ID.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(AccountOrgWrap, Integer, Hash)>] AccountOrgWrap data, response status code and response headers
|
|
35
35
|
def account_org_with_http_info(opts = {})
|
|
@@ -77,7 +77,7 @@ module VPNDetection
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
# Members
|
|
80
|
-
#
|
|
80
|
+
# The members of the organization this credential is scoped to. Read-only. Members are invited by email from the console.
|
|
81
81
|
# @param [Hash] opts the optional parameters
|
|
82
82
|
# @return [AccountRc]
|
|
83
83
|
def account_org_members(opts = {})
|
|
@@ -86,7 +86,7 @@ module VPNDetection
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
# Members
|
|
89
|
-
#
|
|
89
|
+
# The members of the organization this credential is scoped to. Read-only. Members are invited by email from the console.
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
91
|
# @return [Array<(AccountRc, Integer, Hash)>] AccountRc data, response status code and response headers
|
|
92
92
|
def account_org_members_with_http_info(opts = {})
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
data/lib/vpndetection/client.rb
CHANGED
|
@@ -23,9 +23,10 @@ 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] omit it
|
|
27
|
-
# answers `ip
|
|
28
|
-
#
|
|
26
|
+
# @param api_key [String, nil] omit it to look up without one: a lookup then
|
|
27
|
+
# answers `ip`, `is_vpn`, the Tor and relay members, `location` and `asn`,
|
|
28
|
+
# with no daily or monthly cap, and a batch is refused as
|
|
29
|
+
# `:unauthorized`. It is trimmed, and a key of blanks alone is no key.
|
|
29
30
|
# @param cache [Boolean] pass false to disable caching.
|
|
30
31
|
# @param cache_ttl [Numeric] how long an answer stays fresh, in seconds.
|
|
31
32
|
# @param concurrency [Integer] batch requests - chunks of up to 1000 addresses - in flight during a batch, from 1.
|
|
@@ -166,7 +167,9 @@ module VPNDetection
|
|
|
166
167
|
# to line two lists up. An address that fails carries its error as its value,
|
|
167
168
|
# so one bad entry cannot lose the rest of the answers: the API reports a
|
|
168
169
|
# per-entry failure with the status the single lookup would have answered,
|
|
169
|
-
# and a chunk that fails as a whole marks every address in it.
|
|
170
|
+
# and a chunk that fails as a whole marks every address in it. The batch
|
|
171
|
+
# endpoint needs an API key, a free one included: without one, every address
|
|
172
|
+
# sent to it carries an `:unauthorized` error.
|
|
170
173
|
#
|
|
171
174
|
# @param concurrency [Integer, nil] chunks in flight, for THIS batch only.
|
|
172
175
|
# Anything but an Integer from 1 is refused as `:bad_request` before any
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
# The autonomous system that announces the address.
|
|
17
|
+
# The autonomous system that announces the address. Every answer, with or without a key. Each field is present whenever the object is: `asn` is 0 and the rest empty where no announcement covers the address.
|
|
18
18
|
class Asn < ApiModelBase
|
|
19
19
|
# The AS number, 0 when no announcement covers the address.
|
|
20
20
|
attr_accessor :asn
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The VPNDetection API: classify any IP address, and download the databases behind the answers. See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.11.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.11
|
|
7
7
|
Contact: support@vpndetection.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|