vpndetection-fastapi 2.0.3__tar.gz → 2.0.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vpndetection-fastapi
3
- Version: 2.0.3
3
+ Version: 2.0.5
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.4
23
+ Requires-Dist: vpndetection<6,>=5.4.2
24
24
  Provides-Extra: dev
25
25
  Requires-Dist: mypy>=1.11; extra == 'dev'
26
26
  Requires-Dist: pytest>=8; extra == 'dev'
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Topic :: Security",
25
25
  "Typing :: Typed",
26
26
  ]
27
- dependencies = ["vpndetection>=5.4,<6", "starlette>=0.37"]
27
+ dependencies = ["vpndetection>=5.4.2,<6", "starlette>=0.37"]
28
28
 
29
29
  [project.urls]
30
30
  Homepage = "https://vpndetection.io"
@@ -39,7 +39,7 @@ __all__ = [
39
39
  "xff_ip_selector",
40
40
  ]
41
41
 
42
- __version__ = "2.0.3"
42
+ __version__ = "2.0.5"
43
43
 
44
44
  _SELECTORS: Selectors[Request] = bind_selectors(
45
45
  lambda request: RequestView(
@@ -6445,6 +6445,72 @@
6445
6445
  5
6446
6446
  ]
6447
6447
  }
6448
+ },
6449
+ {
6450
+ "name": "interval-past-the-deadline-sleeps-only-to-it",
6451
+ "clientId": "vpndetection-cli",
6452
+ "device": {
6453
+ "device_code": "mo_dc_poll",
6454
+ "user_code": "BCDF-GHJK",
6455
+ "verification_uri": "https://app.vpndetection.io/device",
6456
+ "verification_uri_complete": "https://app.vpndetection.io/device?user_code=BCDF-GHJK",
6457
+ "expires_in": 2,
6458
+ "interval": 2147483647
6459
+ },
6460
+ "why": "A sleep that would end past the local deadline ends at it, and the local expiry follows with no request sent: the outcome the full sleep reaches anyway, without asking the runtime for a sleep it may not hold (.NET's Task.Delay throws past ~49.7 days). 2147483647 is the largest interval every SDK's type holds.",
6461
+ "responses": [
6462
+ {
6463
+ "status": 400,
6464
+ "body": {
6465
+ "error": "authorization_pending"
6466
+ }
6467
+ }
6468
+ ],
6469
+ "expect": {
6470
+ "outcome": "expiredToken",
6471
+ "requests": 0,
6472
+ "waits": [
6473
+ 2
6474
+ ],
6475
+ "status": null
6476
+ }
6477
+ },
6478
+ {
6479
+ "name": "slow-down-past-the-deadline-sleeps-only-to-it",
6480
+ "clientId": "vpndetection-cli",
6481
+ "device": {
6482
+ "device_code": "mo_dc_poll",
6483
+ "user_code": "BCDF-GHJK",
6484
+ "verification_uri": "https://app.vpndetection.io/device",
6485
+ "verification_uri_complete": "https://app.vpndetection.io/device?user_code=BCDF-GHJK",
6486
+ "expires_in": 8,
6487
+ "interval": 1
6488
+ },
6489
+ "why": "The cut applies to every sleep, a widened one included: 1, then 6 after the first slow_down, then only the 1 s left of the 8 rather than 11.",
6490
+ "responses": [
6491
+ {
6492
+ "status": 400,
6493
+ "body": {
6494
+ "error": "slow_down"
6495
+ }
6496
+ },
6497
+ {
6498
+ "status": 400,
6499
+ "body": {
6500
+ "error": "slow_down"
6501
+ }
6502
+ }
6503
+ ],
6504
+ "expect": {
6505
+ "outcome": "expiredToken",
6506
+ "requests": 2,
6507
+ "waits": [
6508
+ 1,
6509
+ 6,
6510
+ 1
6511
+ ],
6512
+ "status": null
6513
+ }
6448
6514
  }
6449
6515
  ]
6450
6516
  },