vpndetection-fastapi 2.1.23__tar.gz → 2.1.25__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.
@@ -10,7 +10,7 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  strategy:
12
12
  matrix:
13
- python: ['3.11', '3.12', '3.13']
13
+ python: ['3.11', '3.12', '3.13', '3.14']
14
14
  steps:
15
15
  - uses: actions/checkout@v7
16
16
  - uses: actions/setup-python@v7
@@ -2,6 +2,18 @@
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.25 - 2026-11-17
6
+
7
+ ### Fixes
8
+
9
+ - Require vpndetection 5.17.0: a vocabulary value it was not built with comes back as served, and the plan's name ([`2ff2529`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/2ff25290b808f244558e63abb21367f0320d6a56))
10
+
11
+ ## 2.1.24 - 2026-11-14
12
+
13
+ ### Fixes
14
+
15
+ - Require vpndetection 5.16.0: is_bogon on every answer, and provider_name beside each provider ([`ab65ea3`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/ab65ea35cc70d2e6659b8bf9dae125d90a3c8442))
16
+
5
17
  ## 2.1.23 - 2026-11-11
6
18
 
7
19
  ### Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vpndetection-fastapi
3
- Version: 2.1.23
3
+ Version: 2.1.25
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.15.2
23
+ Requires-Dist: vpndetection<6,>=5.17.0
24
24
  Provides-Extra: dev
25
25
  Requires-Dist: fastapi>=0.115; extra == 'dev'
26
26
  Requires-Dist: mypy>=1.11; extra == 'dev'
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Topic :: Security",
25
25
  "Typing :: Typed",
26
26
  ]
27
- dependencies = ["vpndetection>=5.15.2,<6", "starlette>=0.37"]
27
+ dependencies = ["vpndetection>=5.17.0,<6", "starlette>=0.37"]
28
28
 
29
29
  [project.urls]
30
30
  Homepage = "https://vpndetection.io"
@@ -45,7 +45,7 @@ __all__ = [
45
45
  "xff_ip_selector",
46
46
  ]
47
47
 
48
- __version__ = "2.1.23"
48
+ __version__ = "2.1.25"
49
49
 
50
50
  # Set on a request ``skip`` claimed, so block_if can tell it from one the middleware
51
51
  # never saw.
@@ -296,7 +296,7 @@
296
296
  }
297
297
  ],
298
298
  "bogonResponse": {
299
- "why": "A bogon is answered locally in the full shape. Every flag is present and false, every detail object is present and empty, location and asn carry every key empty as the API answers a bogon (asn 0, strings empty), and is_bogon marks it as computed rather than served.",
299
+ "why": "A bogon is answered locally in the full shape. Every flag is present and false, every detail object is present and empty, location and asn carry every key empty as the API answers a bogon (asn 0, strings empty), and is_bogon is true, as the API answers reserved space; the SDK computes it rather than asking.",
300
300
  "flagsFalse": [
301
301
  "is_vpn",
302
302
  "is_hosting",
@@ -474,10 +474,11 @@
474
474
  },
475
475
  {
476
476
  "name": "max-full-shape",
477
- "why": "Max adds confidence and method on vpn, plus the three proxy families and the public proxy detail.",
477
+ "why": "Max adds confidence and method on vpn, plus the three proxy families and the public proxy detail. A served answer carries is_bogon, and a detail with a provider carries provider_name, the catalog's name beside its ID.",
478
478
  "status": 200,
479
479
  "body": {
480
480
  "ip": "45.83.91.1",
481
+ "is_bogon": false,
481
482
  "is_vpn": true,
482
483
  "is_hosting": true,
483
484
  "is_relay": false,
@@ -489,12 +490,14 @@
489
490
  "is_pubproxy": true,
490
491
  "vpn": {
491
492
  "provider": "mullvad",
493
+ "provider_name": "Mullvad",
492
494
  "last_seen": "2026-09-02",
493
495
  "confidence": "high",
494
496
  "method": "scan"
495
497
  },
496
498
  "hosting": {
497
499
  "provider": "m247",
500
+ "provider_name": "M247",
498
501
  "confidence": "high",
499
502
  "last_seen": "2026-09-02"
500
503
  },
@@ -504,6 +507,7 @@
504
507
  "resproxy": {},
505
508
  "dcproxy": {
506
509
  "provider": "brightdata",
510
+ "provider_name": "Bright Data",
507
511
  "first_seen": "2026-06-14",
508
512
  "last_seen": "2026-09-02",
509
513
  "hits": 42,
@@ -536,12 +540,20 @@
536
540
  "absent": [],
537
541
  "vpn": {
538
542
  "provider": "mullvad",
543
+ "provider_name": "Mullvad",
539
544
  "last_seen": "2026-09-02",
540
545
  "confidence": "high",
541
546
  "method": "scan"
542
547
  },
548
+ "hosting": {
549
+ "provider": "m247",
550
+ "provider_name": "M247",
551
+ "confidence": "high",
552
+ "last_seen": "2026-09-02"
553
+ },
543
554
  "dcproxy": {
544
555
  "provider": "brightdata",
556
+ "provider_name": "Bright Data",
545
557
  "first_seen": "2026-06-14",
546
558
  "last_seen": "2026-09-02",
547
559
  "hits": 42,
@@ -564,13 +576,14 @@
564
576
  },
565
577
  {
566
578
  "name": "unattributed-range-keeps-empty-provider",
567
- "why": "A populated object always carries every key. An unattributed range has an empty provider string, never a missing one.",
579
+ "why": "A populated object always carries every key. An unattributed range has an empty provider string, never a missing one, and an empty provider_name with it.",
568
580
  "status": 200,
569
581
  "body": {
570
582
  "ip": "185.199.1.1",
571
583
  "is_vpn": true,
572
584
  "vpn": {
573
585
  "provider": "",
586
+ "provider_name": "",
574
587
  "last_seen": "2026-08-30"
575
588
  }
576
589
  },
@@ -582,6 +595,7 @@
582
595
  },
583
596
  "vpn": {
584
597
  "provider": "",
598
+ "provider_name": "",
585
599
  "last_seen": "2026-08-30"
586
600
  }
587
601
  }
@@ -5698,6 +5712,48 @@
5698
5712
  ]
5699
5713
  }
5700
5714
  },
5715
+ {
5716
+ "name": "numeric-upper-bound-on-absent-member",
5717
+ "why": "lt on a member this plan does not serve matches nothing and is reported. A binding that reads the missing member as zero matches lt: 5 and blocks a visitor on data it never saw, which the gte case above cannot show.",
5718
+ "body": {
5719
+ "ip": "45.83.91.1",
5720
+ "is_vpn": true
5721
+ },
5722
+ "condition": {
5723
+ "resproxy": {
5724
+ "hits": {
5725
+ "lt": 5
5726
+ }
5727
+ }
5728
+ },
5729
+ "expect": {
5730
+ "blocked": false,
5731
+ "missing": [
5732
+ "resproxy"
5733
+ ]
5734
+ }
5735
+ },
5736
+ {
5737
+ "name": "numeric-inclusive-upper-bound-on-absent-member",
5738
+ "why": "lte, the mirror of the case above: zero is inside lte: 5 too.",
5739
+ "body": {
5740
+ "ip": "45.83.91.1",
5741
+ "is_vpn": true
5742
+ },
5743
+ "condition": {
5744
+ "resproxy": {
5745
+ "hits": {
5746
+ "lte": 5
5747
+ }
5748
+ }
5749
+ },
5750
+ "expect": {
5751
+ "blocked": false,
5752
+ "missing": [
5753
+ "resproxy"
5754
+ ]
5755
+ }
5756
+ },
5701
5757
  {
5702
5758
  "name": "false-entry-is-ignored",
5703
5759
  "why": "A false entry states nothing, so the remaining term decides. There is deliberately no way to write block-when-false, which would read as blocking everybody.",
@@ -7941,6 +7997,221 @@
7941
7997
  ]
7942
7998
  }
7943
7999
  },
8000
+ "vocabulary": {
8001
+ "why": "A closed vocabulary in an ANSWER (a plan's tier, a database's standing and license type, a format, a download's outcome) is the API's to extend. Each case serves a well-formed answer carrying a value no published list holds, and the call must hand that value back as served, a raw string or an unknown case that carries it, and never fail: a binding that refuses it breaks every installed copy of itself the day the API adds a value, and a release cannot reach the copies already installed. A wrong TYPE (a number, a null where the member is required) is still refused, and refusing an unpublished value in a REQUEST before the network is unchanged. Each `expect` key is a path through the answer's wire names, a number indexing a list; each suite reads it through its own typed result.",
8002
+ "cases": [
8003
+ {
8004
+ "name": "entitlement-plan-name",
8005
+ "why": "The plan's name is what a client shows, and key is what it compares: the free plan's key is free and its name Unlimited. A binding that drops name leaves a client building one from the key, which a renamed plan then gets wrong.",
8006
+ "call": "myEntitlement",
8007
+ "answer": {
8008
+ "org_id": "85bb51e4-2eb6-4a31-8e4d-02ba8b98fe61",
8009
+ "apikey": {
8010
+ "id": "0ab424cc-7619-4dad-b027-afacdc2cedb0",
8011
+ "expires": null,
8012
+ "allowed_cidrs": []
8013
+ },
8014
+ "plan": {
8015
+ "key": "free",
8016
+ "name": "Unlimited",
8017
+ "tier": "free"
8018
+ },
8019
+ "usage": {
8020
+ "requests": 580,
8021
+ "quota": 5000000,
8022
+ "hard_limit": null,
8023
+ "window_start": "2026-11-01T00:00:00Z",
8024
+ "window_end": "2026-12-01T00:00:00Z"
8025
+ }
8026
+ },
8027
+ "expect": {
8028
+ "plan.key": "free",
8029
+ "plan.name": "Unlimited",
8030
+ "plan.tier": "free"
8031
+ }
8032
+ },
8033
+ {
8034
+ "name": "entitlement-tier-unknown",
8035
+ "why": "A plan whose tier no published list holds: the answer reads, and the tier comes back as served.",
8036
+ "call": "myEntitlement",
8037
+ "answer": {
8038
+ "org_id": "85bb51e4-2eb6-4a31-8e4d-02ba8b98fe61",
8039
+ "apikey": {
8040
+ "id": "0ab424cc-7619-4dad-b027-afacdc2cedb0",
8041
+ "expires": null,
8042
+ "allowed_cidrs": []
8043
+ },
8044
+ "plan": {
8045
+ "key": "data",
8046
+ "name": "Data",
8047
+ "tier": "data"
8048
+ },
8049
+ "usage": {
8050
+ "requests": 580,
8051
+ "quota": 5000000,
8052
+ "hard_limit": null,
8053
+ "window_start": "2026-11-01T00:00:00Z",
8054
+ "window_end": "2026-12-01T00:00:00Z"
8055
+ }
8056
+ },
8057
+ "expect": {
8058
+ "plan.key": "data",
8059
+ "plan.name": "Data",
8060
+ "plan.tier": "data"
8061
+ }
8062
+ },
8063
+ {
8064
+ "name": "database-standing-unknown",
8065
+ "why": "A database whose standing no published list holds: the catalog reads, and the standing comes back as served.",
8066
+ "call": "listDatabases",
8067
+ "answer": {
8068
+ "databases": [
8069
+ {
8070
+ "base": "vpn_ip_extended",
8071
+ "name": "VPN IP Extended",
8072
+ "summary": "Every VPN exit address, with its provider.",
8073
+ "license_type": "standard",
8074
+ "starts": "2026-01-01T00:00:00Z",
8075
+ "expires": null,
8076
+ "renews_at": null,
8077
+ "notice_due_at": null,
8078
+ "in_term": true,
8079
+ "standing": "suspended",
8080
+ "open": false,
8081
+ "versions": [
8082
+ {
8083
+ "id": "vpn_ip_extended_v1",
8084
+ "version": 1,
8085
+ "formats": [
8086
+ {
8087
+ "format": "csvgz",
8088
+ "bytes": 1024
8089
+ }
8090
+ ],
8091
+ "sample_formats": [
8092
+ "csvgz"
8093
+ ]
8094
+ }
8095
+ ]
8096
+ }
8097
+ ]
8098
+ },
8099
+ "expect": {
8100
+ "databases.0.base": "vpn_ip_extended",
8101
+ "databases.0.standing": "suspended"
8102
+ }
8103
+ },
8104
+ {
8105
+ "name": "database-license-type-unknown",
8106
+ "why": "A license type no published list holds: the catalog reads, and the license type comes back as served, never as no license at all.",
8107
+ "call": "listDatabases",
8108
+ "answer": {
8109
+ "databases": [
8110
+ {
8111
+ "base": "vpn_ip_extended",
8112
+ "name": "VPN IP Extended",
8113
+ "summary": "Every VPN exit address, with its provider.",
8114
+ "license_type": "oem",
8115
+ "starts": "2026-01-01T00:00:00Z",
8116
+ "expires": null,
8117
+ "renews_at": null,
8118
+ "notice_due_at": null,
8119
+ "in_term": true,
8120
+ "standing": "licensed",
8121
+ "open": false,
8122
+ "versions": [
8123
+ {
8124
+ "id": "vpn_ip_extended_v1",
8125
+ "version": 1,
8126
+ "formats": [
8127
+ {
8128
+ "format": "csvgz",
8129
+ "bytes": 1024
8130
+ }
8131
+ ],
8132
+ "sample_formats": [
8133
+ "csvgz"
8134
+ ]
8135
+ }
8136
+ ]
8137
+ }
8138
+ ]
8139
+ },
8140
+ "expect": {
8141
+ "databases.0.base": "vpn_ip_extended",
8142
+ "databases.0.license_type": "oem"
8143
+ }
8144
+ },
8145
+ {
8146
+ "name": "database-format-unknown",
8147
+ "why": "A format no published list holds, in a version's formats and its sample formats: the catalog reads, and each comes back as served. Refusing it in a download REQUEST before the network stays as it is.",
8148
+ "call": "listDatabases",
8149
+ "answer": {
8150
+ "databases": [
8151
+ {
8152
+ "base": "vpn_ip_extended",
8153
+ "name": "VPN IP Extended",
8154
+ "summary": "Every VPN exit address, with its provider.",
8155
+ "license_type": "standard",
8156
+ "starts": "2026-01-01T00:00:00Z",
8157
+ "expires": null,
8158
+ "renews_at": null,
8159
+ "notice_due_at": null,
8160
+ "in_term": true,
8161
+ "standing": "licensed",
8162
+ "open": false,
8163
+ "versions": [
8164
+ {
8165
+ "id": "vpn_ip_extended_v1",
8166
+ "version": 1,
8167
+ "formats": [
8168
+ {
8169
+ "format": "parquet",
8170
+ "bytes": 2048
8171
+ }
8172
+ ],
8173
+ "sample_formats": [
8174
+ "parquet"
8175
+ ]
8176
+ }
8177
+ ]
8178
+ }
8179
+ ]
8180
+ },
8181
+ "expect": {
8182
+ "databases.0.versions.0.formats.0.format": "parquet",
8183
+ "databases.0.versions.0.formats.0.bytes": 2048,
8184
+ "databases.0.versions.0.sample_formats.0": "parquet"
8185
+ }
8186
+ },
8187
+ {
8188
+ "name": "download-outcome-unknown",
8189
+ "why": "A download outcome no published list holds: the history reads, and the outcome comes back as served.",
8190
+ "call": "listDownloads",
8191
+ "answer": {
8192
+ "downloads": [
8193
+ {
8194
+ "dataset_id": "vpn_ip_extended_v1",
8195
+ "format": "csvgz",
8196
+ "outcome": "throttled",
8197
+ "sample": false,
8198
+ "open": false,
8199
+ "bytes": 1024,
8200
+ "http_status": 302,
8201
+ "apikey_id": "0ab424cc-7619-4dad-b027-afacdc2cedb0",
8202
+ "client_ip": "8.8.8.8",
8203
+ "user_agent": "curl/8.14.1",
8204
+ "created": "2026-11-15T07:00:00Z"
8205
+ }
8206
+ ]
8207
+ },
8208
+ "expect": {
8209
+ "downloads.0.dataset_id": "vpn_ip_extended_v1",
8210
+ "downloads.0.outcome": "throttled"
8211
+ }
8212
+ }
8213
+ ]
8214
+ },
7944
8215
  "bogons": {
7945
8216
  "v4": [
7946
8217
  "0.0.0.0/8",