vpndetection-fastapi 2.1.17__tar.gz → 2.1.18__tar.gz
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.
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/CHANGELOG.md +6 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/PKG-INFO +4 -4
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/README.md +2 -2
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/pyproject.toml +1 -1
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/src/vpndetection_fastapi/__init__.py +1 -1
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/testdata/testdata.json +102 -14
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/.github/workflows/ci.yml +0 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/.github/workflows/release.yml +0 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/.gitignore +0 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/LICENSE +0 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/SECURITY.md +0 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/src/vpndetection_fastapi/py.typed +0 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/testdata/bogons.json +0 -0
- {vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/tests/test_middleware.py +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
What each release changed for you, newest first. Each line is a commit's summary, linked to its full description and diff. Releases before 2.0.5 are described by their release commits.
|
|
4
4
|
|
|
5
|
+
## 2.1.18 - 2026-11-11
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- Require vpndetection 5.14.0: a lookup without a key answers more ([`3161128`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/3161128e6758efdb9ba3ccc546b8f328db8c73a3))
|
|
10
|
+
|
|
5
11
|
## 2.1.17 - 2026-11-11
|
|
6
12
|
|
|
7
13
|
### Fixes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vpndetection-fastapi
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.18
|
|
4
4
|
Summary: Official FastAPI and Starlette middleware for the VPNDetection API. Detect VPNs, proxies, Tor, hosting and CDN visitors on every request.
|
|
5
5
|
Project-URL: Homepage, https://vpndetection.io
|
|
6
6
|
Project-URL: Source, https://github.com/vpndetection-io/sdk-python-fastapi
|
|
@@ -20,7 +20,7 @@ Classifier: Topic :: Security
|
|
|
20
20
|
Classifier: Typing :: Typed
|
|
21
21
|
Requires-Python: >=3.11
|
|
22
22
|
Requires-Dist: starlette>=0.37
|
|
23
|
-
Requires-Dist: vpndetection<6,>=5.
|
|
23
|
+
Requires-Dist: vpndetection<6,>=5.14.0
|
|
24
24
|
Provides-Extra: dev
|
|
25
25
|
Requires-Dist: fastapi>=0.115; extra == 'dev'
|
|
26
26
|
Requires-Dist: mypy>=1.11; extra == 'dev'
|
|
@@ -45,7 +45,7 @@ pip install vpndetection-fastapi
|
|
|
45
45
|
|
|
46
46
|
Requires Python 3.11 or newer.
|
|
47
47
|
|
|
48
|
-
You need an API key. Create one in the [console](https://app.vpndetection.io); without one
|
|
48
|
+
You need an API key. Create one in the [console](https://app.vpndetection.io); without one, lookups are limited to 60 a minute from each source address, and a server is a single source address, so a key is what makes this usable in production rather than optional.
|
|
49
49
|
|
|
50
50
|
```python
|
|
51
51
|
from fastapi import FastAPI
|
|
@@ -146,7 +146,7 @@ Beyond a few million distinct visitors a day, stop calling the API per request:
|
|
|
146
146
|
|
|
147
147
|
## Absent is not false
|
|
148
148
|
|
|
149
|
-
Without a key
|
|
149
|
+
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 your plan does not include is `None`, which means "not in your plan" rather than "checked, and no".
|
|
150
150
|
|
|
151
151
|
```python
|
|
152
152
|
lookup(request).result.is_hosting # None when your plan does not include it
|
|
@@ -15,7 +15,7 @@ pip install vpndetection-fastapi
|
|
|
15
15
|
|
|
16
16
|
Requires Python 3.11 or newer.
|
|
17
17
|
|
|
18
|
-
You need an API key. Create one in the [console](https://app.vpndetection.io); without one
|
|
18
|
+
You need an API key. Create one in the [console](https://app.vpndetection.io); without one, lookups are limited to 60 a minute from each source address, and a server is a single source address, so a key is what makes this usable in production rather than optional.
|
|
19
19
|
|
|
20
20
|
```python
|
|
21
21
|
from fastapi import FastAPI
|
|
@@ -116,7 +116,7 @@ Beyond a few million distinct visitors a day, stop calling the API per request:
|
|
|
116
116
|
|
|
117
117
|
## Absent is not false
|
|
118
118
|
|
|
119
|
-
Without a key
|
|
119
|
+
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 your plan does not include is `None`, which means "not in your plan" rather than "checked, and no".
|
|
120
120
|
|
|
121
121
|
```python
|
|
122
122
|
lookup(request).result.is_hosting # None when your plan does not include it
|
|
@@ -341,8 +341,8 @@
|
|
|
341
341
|
},
|
|
342
342
|
"lookup": [
|
|
343
343
|
{
|
|
344
|
-
"name": "
|
|
345
|
-
"why": "
|
|
344
|
+
"name": "required-only-not-vpn",
|
|
345
|
+
"why": "Only the two members every answer must carry. Every other member is absent, which means not in this answer and must not read as false.",
|
|
346
346
|
"status": 200,
|
|
347
347
|
"body": {
|
|
348
348
|
"ip": "1.1.1.1",
|
|
@@ -639,8 +639,8 @@
|
|
|
639
639
|
}
|
|
640
640
|
},
|
|
641
641
|
{
|
|
642
|
-
"name": "
|
|
643
|
-
"why": "
|
|
642
|
+
"name": "keyless-location-asn",
|
|
643
|
+
"why": "The answer without a key since 2026-11-11: Tor and relay beside the VPN flag, and where the address is and which AS announces it. location and asn carry every key whenever present, so each maps whole.",
|
|
644
644
|
"status": 200,
|
|
645
645
|
"body": {
|
|
646
646
|
"ip": "146.70.116.130",
|
|
@@ -716,6 +716,91 @@
|
|
|
716
716
|
"prefix": "146.70.116.0/24"
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"name": "free-flags-without-detail",
|
|
722
|
+
"why": "A free key's answer since 2026-11-11: every flag, but no detail object behind the six it adds to the keyless answer and no vpn object. Each flag maps on its own, and the detail it lacks stays absent rather than empty.",
|
|
723
|
+
"status": 200,
|
|
724
|
+
"body": {
|
|
725
|
+
"ip": "146.70.116.130",
|
|
726
|
+
"is_vpn": true,
|
|
727
|
+
"is_hosting": true,
|
|
728
|
+
"is_relay": false,
|
|
729
|
+
"is_tor": false,
|
|
730
|
+
"is_cdn": false,
|
|
731
|
+
"is_resproxy": false,
|
|
732
|
+
"is_dcproxy": false,
|
|
733
|
+
"is_mobproxy": false,
|
|
734
|
+
"is_pubproxy": false,
|
|
735
|
+
"relay": {},
|
|
736
|
+
"tor": {},
|
|
737
|
+
"location": {
|
|
738
|
+
"continent": "EU",
|
|
739
|
+
"continent_name": "Europe",
|
|
740
|
+
"country": "AT",
|
|
741
|
+
"country_name": "Austria",
|
|
742
|
+
"timezone": "Europe/Vienna",
|
|
743
|
+
"currency_code": "EUR",
|
|
744
|
+
"currency_name": "Euro",
|
|
745
|
+
"currency_symbol": "€",
|
|
746
|
+
"flag_emoji": "🇦🇹",
|
|
747
|
+
"flag_unicode": "U+1F1E6 U+1F1F9"
|
|
748
|
+
},
|
|
749
|
+
"asn": {
|
|
750
|
+
"asn": 9009,
|
|
751
|
+
"name": "M247 Europe SRL",
|
|
752
|
+
"domain": "m247global.com",
|
|
753
|
+
"type": "hosting",
|
|
754
|
+
"prefix": "146.70.116.0/24"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
"expect": {
|
|
758
|
+
"ip": "146.70.116.130",
|
|
759
|
+
"isBogon": false,
|
|
760
|
+
"present": {
|
|
761
|
+
"is_vpn": true,
|
|
762
|
+
"is_hosting": true,
|
|
763
|
+
"is_relay": false,
|
|
764
|
+
"is_tor": false,
|
|
765
|
+
"is_cdn": false,
|
|
766
|
+
"is_resproxy": false,
|
|
767
|
+
"is_dcproxy": false,
|
|
768
|
+
"is_mobproxy": false,
|
|
769
|
+
"is_pubproxy": false
|
|
770
|
+
},
|
|
771
|
+
"absent": [
|
|
772
|
+
"vpn",
|
|
773
|
+
"hosting",
|
|
774
|
+
"cdn",
|
|
775
|
+
"resproxy",
|
|
776
|
+
"dcproxy",
|
|
777
|
+
"mobproxy",
|
|
778
|
+
"pubproxy"
|
|
779
|
+
],
|
|
780
|
+
"emptyPresent": [
|
|
781
|
+
"relay",
|
|
782
|
+
"tor"
|
|
783
|
+
],
|
|
784
|
+
"location": {
|
|
785
|
+
"continent": "EU",
|
|
786
|
+
"continent_name": "Europe",
|
|
787
|
+
"country": "AT",
|
|
788
|
+
"country_name": "Austria",
|
|
789
|
+
"timezone": "Europe/Vienna",
|
|
790
|
+
"currency_code": "EUR",
|
|
791
|
+
"currency_name": "Euro",
|
|
792
|
+
"currency_symbol": "€",
|
|
793
|
+
"flag_emoji": "🇦🇹",
|
|
794
|
+
"flag_unicode": "U+1F1E6 U+1F1F9"
|
|
795
|
+
},
|
|
796
|
+
"asn": {
|
|
797
|
+
"asn": 9009,
|
|
798
|
+
"name": "M247 Europe SRL",
|
|
799
|
+
"domain": "m247global.com",
|
|
800
|
+
"type": "hosting",
|
|
801
|
+
"prefix": "146.70.116.0/24"
|
|
802
|
+
}
|
|
803
|
+
}
|
|
719
804
|
}
|
|
720
805
|
],
|
|
721
806
|
"errors": [
|
|
@@ -800,16 +885,19 @@
|
|
|
800
885
|
}
|
|
801
886
|
},
|
|
802
887
|
{
|
|
803
|
-
"name": "keyless-
|
|
804
|
-
"why": "
|
|
888
|
+
"name": "keyless-per-minute-limit-is-retryable",
|
|
889
|
+
"why": "Retry-After present. A caller with no API key is past 60 requests a minute from its address, which is a rate limit, so retrying after the wait WILL succeed.",
|
|
805
890
|
"status": 429,
|
|
806
|
-
"headers": {
|
|
891
|
+
"headers": {
|
|
892
|
+
"Retry-After": "1"
|
|
893
|
+
},
|
|
807
894
|
"body": {
|
|
808
|
-
"error": "
|
|
895
|
+
"error": "per-minute limit for requests without an API key exceeded; retry shortly or use an API key"
|
|
809
896
|
},
|
|
810
897
|
"expect": {
|
|
811
|
-
"kind": "
|
|
812
|
-
"retryable":
|
|
898
|
+
"kind": "rate_limited",
|
|
899
|
+
"retryable": true,
|
|
900
|
+
"retryAfterSeconds": 1
|
|
813
901
|
}
|
|
814
902
|
},
|
|
815
903
|
{
|
|
@@ -5698,7 +5786,7 @@
|
|
|
5698
5786
|
},
|
|
5699
5787
|
{
|
|
5700
5788
|
"name": "location-country-matches",
|
|
5701
|
-
"why": "location is a member like any other: a country term matches the served country, without regard to case, on the
|
|
5789
|
+
"why": "location is a member like any other: a country term matches the served country, without regard to case, on the answer a lookup gets without a key.",
|
|
5702
5790
|
"body": {
|
|
5703
5791
|
"ip": "146.70.116.130",
|
|
5704
5792
|
"is_vpn": true,
|
|
@@ -5821,7 +5909,7 @@
|
|
|
5821
5909
|
},
|
|
5822
5910
|
{
|
|
5823
5911
|
"name": "asn-type-matches",
|
|
5824
|
-
"why": "asn is a member like any other: a
|
|
5912
|
+
"why": "asn is a member like any other: even an answer without a key says which kind of network announces the address.",
|
|
5825
5913
|
"body": {
|
|
5826
5914
|
"ip": "146.70.116.130",
|
|
5827
5915
|
"is_vpn": true,
|
|
@@ -5900,8 +5988,8 @@
|
|
|
5900
5988
|
}
|
|
5901
5989
|
},
|
|
5902
5990
|
{
|
|
5903
|
-
"name": "location-and-asn-absent-
|
|
5904
|
-
"why": "
|
|
5991
|
+
"name": "location-and-asn-absent-are-reported",
|
|
5992
|
+
"why": "An answer carrying ip and is_vpn alone has no location or asn, so terms on them can never match and both are reported.",
|
|
5905
5993
|
"body": {
|
|
5906
5994
|
"ip": "146.70.116.130",
|
|
5907
5995
|
"is_vpn": true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vpndetection_fastapi-2.1.17 → vpndetection_fastapi-2.1.18}/src/vpndetection_fastapi/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|