vpndetection 5.11.4 → 5.13.0
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 +18 -10
- 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 +13 -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/database_api.rb +15 -10
- data/lib/vpndetection/errors.rb +5 -4
- 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 +6 -6
- data/lib/vpndetection/models/pubproxy_detail.rb +4 -4
- 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
data/lib/vpndetection/result.rb
CHANGED
|
@@ -24,8 +24,9 @@ module VPNDetection
|
|
|
24
24
|
|
|
25
25
|
DETAILS = %w[vpn hosting relay tor cdn resproxy dcproxy mobproxy pubproxy].freeze
|
|
26
26
|
|
|
27
|
-
# Where the address is, and the AS announcing it: every
|
|
28
|
-
#
|
|
27
|
+
# Where the address is, and the AS announcing it: every answer carries both,
|
|
28
|
+
# with or without a key, each member present, an empty string or AS 0 where
|
|
29
|
+
# nothing is known.
|
|
29
30
|
LOCATION = %w[
|
|
30
31
|
continent continent_name country country_name timezone currency_code currency_name currency_symbol
|
|
31
32
|
flag_emoji flag_unicode
|
|
@@ -75,7 +76,7 @@ module VPNDetection
|
|
|
75
76
|
end
|
|
76
77
|
|
|
77
78
|
# Whether the address belongs to a hosting or cloud provider, or nil when
|
|
78
|
-
# your plan does not include it.
|
|
79
|
+
# your plan does not include it. With any key, a free one included.
|
|
79
80
|
def is_hosting
|
|
80
81
|
@raw['is_hosting']
|
|
81
82
|
end
|
|
@@ -86,7 +87,7 @@ module VPNDetection
|
|
|
86
87
|
end
|
|
87
88
|
|
|
88
89
|
# Whether the address is a privacy relay egress, or nil when your plan does
|
|
89
|
-
# not include it.
|
|
90
|
+
# not include it. Every answer, with or without a key.
|
|
90
91
|
def is_relay
|
|
91
92
|
@raw['is_relay']
|
|
92
93
|
end
|
|
@@ -97,7 +98,7 @@ module VPNDetection
|
|
|
97
98
|
end
|
|
98
99
|
|
|
99
100
|
# Whether the address is a Tor node, or nil when your plan does not include
|
|
100
|
-
# it.
|
|
101
|
+
# it. Every answer, with or without a key.
|
|
101
102
|
def is_tor
|
|
102
103
|
@raw['is_tor']
|
|
103
104
|
end
|
|
@@ -108,7 +109,7 @@ module VPNDetection
|
|
|
108
109
|
end
|
|
109
110
|
|
|
110
111
|
# Whether the address belongs to a CDN, or nil when your plan does not
|
|
111
|
-
# include it.
|
|
112
|
+
# include it. With any key, a free one included.
|
|
112
113
|
def is_cdn
|
|
113
114
|
@raw['is_cdn']
|
|
114
115
|
end
|
|
@@ -119,7 +120,7 @@ module VPNDetection
|
|
|
119
120
|
end
|
|
120
121
|
|
|
121
122
|
# Whether the address was seen in a residential proxy pool, or nil when your
|
|
122
|
-
# plan does not include it.
|
|
123
|
+
# plan does not include it. With any key, a free one included.
|
|
123
124
|
def is_resproxy
|
|
124
125
|
@raw['is_resproxy']
|
|
125
126
|
end
|
|
@@ -129,8 +130,9 @@ module VPNDetection
|
|
|
129
130
|
@raw['is_resproxy'] == true
|
|
130
131
|
end
|
|
131
132
|
|
|
132
|
-
# Whether the address
|
|
133
|
-
#
|
|
133
|
+
# Whether the address is one a datacenter proxy service sells or runs on, a
|
|
134
|
+
# proxy company's own ranges included, or nil when your plan does not
|
|
135
|
+
# include it. With any key, a free one included.
|
|
134
136
|
def is_dcproxy
|
|
135
137
|
@raw['is_dcproxy']
|
|
136
138
|
end
|
|
@@ -141,7 +143,7 @@ module VPNDetection
|
|
|
141
143
|
end
|
|
142
144
|
|
|
143
145
|
# Whether the address was seen in a mobile proxy pool, or nil when your plan
|
|
144
|
-
# does not include it.
|
|
146
|
+
# does not include it. With any key, a free one included.
|
|
145
147
|
def is_mobproxy
|
|
146
148
|
@raw['is_mobproxy']
|
|
147
149
|
end
|
|
@@ -153,7 +155,7 @@ module VPNDetection
|
|
|
153
155
|
|
|
154
156
|
# Whether a public proxy, one anyone can connect through, listens on the
|
|
155
157
|
# address or sends its traffic out from it, or nil when your plan does not
|
|
156
|
-
# include it.
|
|
158
|
+
# include it. With any key, a free one included.
|
|
157
159
|
def is_pubproxy
|
|
158
160
|
@raw['is_pubproxy']
|
|
159
161
|
end
|
|
@@ -174,12 +176,12 @@ module VPNDetection
|
|
|
174
176
|
@raw['hosting']
|
|
175
177
|
end
|
|
176
178
|
|
|
177
|
-
# Detail for `is_relay`.
|
|
179
|
+
# Detail for `is_relay`. Every answer, with or without a key.
|
|
178
180
|
def relay
|
|
179
181
|
@raw['relay']
|
|
180
182
|
end
|
|
181
183
|
|
|
182
|
-
# Detail for `is_tor`.
|
|
184
|
+
# Detail for `is_tor`. Every answer, with or without a key.
|
|
183
185
|
def tor
|
|
184
186
|
@raw['tor']
|
|
185
187
|
end
|
|
@@ -214,15 +216,15 @@ module VPNDetection
|
|
|
214
216
|
end
|
|
215
217
|
|
|
216
218
|
# Where the address is: continent, country, timezone, the country's
|
|
217
|
-
# currency and flag, as a wire hash (`result.location['country']`).
|
|
218
|
-
#
|
|
219
|
+
# currency and flag, as a wire hash (`result.location['country']`). Every
|
|
220
|
+
# answer, with or without a key.
|
|
219
221
|
def location
|
|
220
222
|
@raw['location']
|
|
221
223
|
end
|
|
222
224
|
|
|
223
225
|
# The AS announcing the address: asn, name, domain, type and prefix, as a
|
|
224
|
-
# wire hash (`result.asn['name']`), with asn 0 where none does.
|
|
225
|
-
#
|
|
226
|
+
# wire hash (`result.asn['name']`), with asn 0 where none does. Every
|
|
227
|
+
# answer, with or without a key.
|
|
226
228
|
def asn
|
|
227
229
|
@raw['asn']
|
|
228
230
|
end
|
data/lib/vpndetection/version.rb
CHANGED