vpndetection-fastapi 2.2.2__tar.gz → 2.2.4__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.
@@ -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.2.4 - 2026-11-26
6
+
7
+ ### Features
8
+
9
+ - Require vpndetection 5.23.0: allowBots sends only a crawler's User-Agent, at most four an address ([`be55736`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/be5573675f8c80ddff18ac8518abb4f6c51528e5))
10
+
11
+ ## 2.2.3 - 2026-11-25
12
+
13
+ ### Fixes
14
+
15
+ - Require vpndetection 5.22.1: doc comments name a paid plan, the entitlement example the Data plan ([`44915d4`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/44915d411f41db3af686d89cf59e2d31defbd6f1))
16
+
5
17
  ## 2.2.2 - 2026-11-24
6
18
 
7
19
  ### Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vpndetection-fastapi
3
- Version: 2.2.2
3
+ Version: 2.2.4
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.22.0
23
+ Requires-Dist: vpndetection<6,>=5.23.0
24
24
  Provides-Extra: dev
25
25
  Requires-Dist: fastapi>=0.115; extra == 'dev'
26
26
  Requires-Dist: mypy>=1.11; extra == 'dev'
@@ -95,7 +95,7 @@ Replace the refusal with `on_blocked`.
95
95
 
96
96
  ### Letting verified crawlers through
97
97
 
98
- `allow_bots=True` sends each request's own `User-Agent` header with its lookup, and a request whose answer verifies that crawler, `lookup(request).result.user_agent.verdict == "verified"`, is never refused, by `block_condition` or by `block_if`; the answer is still attached. A request with no `User-Agent` sends none. It is off by default, which keeps one cached answer per address rather than one per agent.
98
+ `allow_bots=True` sends each request's own `User-Agent` header with its lookup when it names a crawler, and a request whose answer verifies that crawler, `lookup(request).result.user_agent.verdict == "verified"`, is never refused, by `block_condition` or by `block_if`; the answer is still attached. Any other agent, or none, is not sent, since its verdict could only be `not_bot`. One address is looked up with at most four crawler agents an hour: past those its lookup sends none, and a request passes as a crawler only where the answer's `bot.verified` is true. It is off by default, which keeps one cached answer per address rather than one per agent.
99
99
 
100
100
  ```python
101
101
  app.add_middleware(
@@ -106,7 +106,7 @@ app.add_middleware(
106
106
  )
107
107
  ```
108
108
 
109
- With it on, a condition can name the verdict, refusing a forged crawler and a script: `{"user_agent": {"verdict": ["spoofed", "not_bot"]}}`. Only a paid plan's answer carries `user_agent`: a keyless client, or a free key past its trial, never gets a verdict and lets no crawler through, and the middleware warns once when that happens.
109
+ With it on, a condition can name the verdict, refusing a forged crawler: `{"user_agent": {"verdict": "spoofed"}}`. Only a paid plan's answer carries `user_agent`: a keyless client, or a free key past its trial, never gets a verdict and lets no crawler through, and the middleware warns once when that happens.
110
110
 
111
111
  ### Blocking one endpoint
112
112
 
@@ -65,7 +65,7 @@ Replace the refusal with `on_blocked`.
65
65
 
66
66
  ### Letting verified crawlers through
67
67
 
68
- `allow_bots=True` sends each request's own `User-Agent` header with its lookup, and a request whose answer verifies that crawler, `lookup(request).result.user_agent.verdict == "verified"`, is never refused, by `block_condition` or by `block_if`; the answer is still attached. A request with no `User-Agent` sends none. It is off by default, which keeps one cached answer per address rather than one per agent.
68
+ `allow_bots=True` sends each request's own `User-Agent` header with its lookup when it names a crawler, and a request whose answer verifies that crawler, `lookup(request).result.user_agent.verdict == "verified"`, is never refused, by `block_condition` or by `block_if`; the answer is still attached. Any other agent, or none, is not sent, since its verdict could only be `not_bot`. One address is looked up with at most four crawler agents an hour: past those its lookup sends none, and a request passes as a crawler only where the answer's `bot.verified` is true. It is off by default, which keeps one cached answer per address rather than one per agent.
69
69
 
70
70
  ```python
71
71
  app.add_middleware(
@@ -76,7 +76,7 @@ app.add_middleware(
76
76
  )
77
77
  ```
78
78
 
79
- With it on, a condition can name the verdict, refusing a forged crawler and a script: `{"user_agent": {"verdict": ["spoofed", "not_bot"]}}`. Only a paid plan's answer carries `user_agent`: a keyless client, or a free key past its trial, never gets a verdict and lets no crawler through, and the middleware warns once when that happens.
79
+ With it on, a condition can name the verdict, refusing a forged crawler: `{"user_agent": {"verdict": "spoofed"}}`. Only a paid plan's answer carries `user_agent`: a keyless client, or a free key past its trial, never gets a verdict and lets no crawler through, and the middleware warns once when that happens.
80
80
 
81
81
  ### Blocking one endpoint
82
82
 
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Topic :: Security",
25
25
  "Typing :: Typed",
26
26
  ]
27
- dependencies = ["vpndetection>=5.22.0,<6", "starlette>=0.37"]
27
+ dependencies = ["vpndetection>=5.23.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.2.2"
48
+ __version__ = "2.2.4"
49
49
 
50
50
  # Set on a request ``skip`` claimed, so block_if can tell it from one the middleware
51
51
  # never saw.
@@ -11319,5 +11319,168 @@
11319
11319
  "c000::/3",
11320
11320
  "e000::/3"
11321
11321
  ]
11322
+ },
11323
+ "crawlerAgents": {
11324
+ "terms": [
11325
+ "+http",
11326
+ "ahrefssiteaudit",
11327
+ "amzn-user",
11328
+ "anthropic-ai",
11329
+ "barkrowler",
11330
+ "better stack",
11331
+ "betterstack",
11332
+ "bingpreview",
11333
+ "bot",
11334
+ "censysinspect",
11335
+ "chatgpt-user",
11336
+ "claude-user",
11337
+ "claude-web",
11338
+ "cohere-ai",
11339
+ "crawl",
11340
+ "datadogsynthetics",
11341
+ "embedly",
11342
+ "expanse",
11343
+ "facebookcatalog",
11344
+ "facebookexternalhit",
11345
+ "flipboardproxy",
11346
+ "flipboardrss",
11347
+ "github-hookshot/",
11348
+ "google-agent",
11349
+ "google-extended",
11350
+ "google-inspectiontool",
11351
+ "google-read-aloud",
11352
+ "google-site-verification",
11353
+ "googleother",
11354
+ "iframely",
11355
+ "internetmeasurement",
11356
+ "keenable-user",
11357
+ "lumar",
11358
+ "masscan",
11359
+ "mediapartners-google",
11360
+ "meta-externalagent",
11361
+ "meta-externalfetcher",
11362
+ "meta-webindexer",
11363
+ "mistralai-user",
11364
+ "nmap",
11365
+ "notebooklm",
11366
+ "nuclei",
11367
+ "paloaltonetworks.com",
11368
+ "parse.ly",
11369
+ "parsely.com",
11370
+ "perplexity-user",
11371
+ "pingdom",
11372
+ "pinterest",
11373
+ "rssapi/",
11374
+ "screaming frog",
11375
+ "site24x7",
11376
+ "skypeuripreview",
11377
+ "slack-imgproxy",
11378
+ "slurp",
11379
+ "sogou",
11380
+ "spider",
11381
+ "statuscake",
11382
+ "stripe/1.0",
11383
+ "ttd-content",
11384
+ "whatsapp",
11385
+ "yandex",
11386
+ "yeti/",
11387
+ "zgrab"
11388
+ ],
11389
+ "crawlers": [
11390
+ "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
11391
+ "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)",
11392
+ "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)",
11393
+ "Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)",
11394
+ "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)",
11395
+ "Mozilla/5.0 (compatible; SomeNewBot/1.0; +http://example.com)",
11396
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; KeenableBot/1.0; +https://keenable.ai/)",
11397
+ "FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)",
11398
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; trendictionbot0.5.0; trendiction search; http://www.trendiction.de/bot)",
11399
+ "Mozilla/5.0 (compatible; Qwantify/Bleriot/1.1; +https://help.qwant.com/bot)",
11400
+ "BotWitness/1.0 (+https://bot-witness.com/bot; contact: hello@bot-witness.com)",
11401
+ "PubMatic Crawler Bot",
11402
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 Edg/140.0.0.0; 360Spider",
11403
+ "Mozilla/5.0 (compatible; AhrefsSiteAudit/6.1; +http://ahrefs.com/robot/site-audit)",
11404
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.2; +https://openai.com/gptbot",
11405
+ "Mozilla/5.0 (compatible; ClaudeBot/1.0; +claudebot@anthropic.com)",
11406
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ShapBot/0.1.0",
11407
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Claude-User/1.0; +Claude-User@anthropic.com)",
11408
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Claude-SearchBot/1.0; +claudebot@anthropic.com)",
11409
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Perplexity-User/1.0; +https://perplexity.ai/perplexity-user)",
11410
+ "meta-externalfetcher/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)",
11411
+ "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)",
11412
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 (compatible; meta-webindexer/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler))",
11413
+ "Mozilla/5.0 (compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)",
11414
+ "Mozilla/5.0 (compatible; CCBot/2.0; +https://commoncrawl.org/faq/)",
11415
+ "Mozilla/5.0 (Linux; Android 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; Bytespider; spider-feedback@bytedance.com)",
11416
+ "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)",
11417
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Google-Agent; +https://developers.google.com/crawling/docs/crawlers-fetchers/google-agent) Chrome/145.0.0.0 Safari/537.36",
11418
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Amzn-SearchBot/0.1) Chrome/119.0.6045.214 Safari/537.36",
11419
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Amzn-User/0.1) Chrome/119.0.6045.214 Safari/537.36",
11420
+ "Mozilla/5.0 (compatible; Yeti/1.1; +https://naver.me/spd)",
11421
+ "Mozilla/5.0 (compatible; TTD-Content; +https://www.thetradedesk.com/general/ttd-content)",
11422
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0 (FlipboardProxy/1.6; +http://flipboard.com/browserproxy)",
11423
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 DatadogSynthetics",
11424
+ "Better Uptime Bot Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
11425
+ "Stripe/1.0 (+https://stripe.com/docs/webhooks)",
11426
+ "GitHub-Hookshot/7d9a9f6",
11427
+ "Mozilla/5.0 (compatible; Infrawatch/1.0; +https://infrawat.ch/)",
11428
+ "AcmeSync/3.1 (+https://acme.example)",
11429
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/151.0.0.0 Safari/537.36",
11430
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ShapBot/0.1.0",
11431
+ "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Reflectionbot/1.0; +https://reflection.ai/bot) Chrome/151.0.0.0 Safari/537.36"
11432
+ ],
11433
+ "others": [
11434
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
11435
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0",
11436
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 OPR/130.0.0.0",
11437
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Vivaldi/6.5.3206.63",
11438
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 YaBrowser/25.6.0 Safari/537.36",
11439
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15",
11440
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:143.0) Gecko/20100101 Firefox/143.0",
11441
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36",
11442
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0",
11443
+ "Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36",
11444
+ "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko",
11445
+ "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
11446
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Mobile Safari/537.36",
11447
+ "Mozilla/5.0 (Linux; Android 14; SM-S918B) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/27.0 Chrome/145.0.0.0 Mobile Safari/537.36",
11448
+ "Mozilla/5.0 (Linux; Android 13; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36",
11449
+ "Mozilla/5.0 (Linux; Android 12; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36",
11450
+ "Mozilla/5.0 (Android 14; Mobile; rv:143.0) Gecko/143.0 Firefox/143.0",
11451
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Mobile/15E148 Safari/604.1",
11452
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/151.0.0.0 Mobile/15E148 Safari/604.1",
11453
+ "Mozilla/5.0 (iPad; CPU OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
11454
+ "Mozilla/5.0 (Linux; U; Android 13; en-US; V2027 Build/TP1A) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.0.0 UCBrowser/13.4.0.1306 Mobile Safari/537.36",
11455
+ "Opera/9.80 (J2ME/MIDP; Opera Mini/9.80/37.7327; U; en) Presto/2.12.423 Version/12.16",
11456
+ "Mozilla/5.0 (SMART-TV; LINUX; Tizen 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/7.0 Chrome/145.0.0.0 TV Safari/537.36",
11457
+ "Mozilla/5.0 (PlayStation; PlayStation 5/2.26) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15",
11458
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Instagram 340.0.0.28.106",
11459
+ "Mozilla/5.0 (Linux; Android 14; K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/145.0.0.0 Mobile Safari/537.36",
11460
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBAV/470.0.0.35.109]",
11461
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) MicroMessenger/7.0.20",
11462
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/151.0.0.0 Safari/537.36",
11463
+ "Lightpanda/1.0",
11464
+ "curl/8.7.1",
11465
+ "Wget/1.21.4",
11466
+ "python-requests/2.32.3",
11467
+ "Go-http-client/2.0",
11468
+ "okhttp/4.12.0",
11469
+ "PostmanRuntime/7.39.0",
11470
+ "axios/1.7.2",
11471
+ "Java/17.0.11",
11472
+ "GuzzleHttp/7.8.1",
11473
+ "Dart/3.4 (dart:io)",
11474
+ "Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.19041.4291",
11475
+ "Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.22631; en-US) PowerShell/7.4.5",
11476
+ "",
11477
+ "Mozilla/5.0",
11478
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
11479
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Mobile Safari/537.36",
11480
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
11481
+ "python-requests/2.32.3",
11482
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/151.0.0.0 Safari/537.36",
11483
+ "Mozilla/5.0 (Linux; Android 10; K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/157.0.0.0 Mobile Safari/537.36 TwitterAndroid/12.42.0-prod.01"
11484
+ ]
11322
11485
  }
11323
11486
  }