vpndetection-fastapi 2.0.5__tar.gz → 2.0.7__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.0.5 → vpndetection_fastapi-2.0.7}/.github/workflows/release.yml +27 -0
- vpndetection_fastapi-2.0.7/CHANGELOG.md +21 -0
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/PKG-INFO +5 -5
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/README.md +3 -3
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/pyproject.toml +1 -1
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/src/vpndetection_fastapi/__init__.py +1 -1
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/testdata/testdata.json +46 -2
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/.github/workflows/ci.yml +0 -0
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/.gitignore +0 -0
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/LICENSE +0 -0
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/src/vpndetection_fastapi/py.typed +0 -0
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/testdata/bogons.json +0 -0
- {vpndetection_fastapi-2.0.5 → vpndetection_fastapi-2.0.7}/tests/test_middleware.py +0 -0
|
@@ -34,3 +34,30 @@ jobs:
|
|
|
34
34
|
- run: pytest
|
|
35
35
|
- run: python -m build
|
|
36
36
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
37
|
+
|
|
38
|
+
# This version's section of CHANGELOG.md, as the tag's GitHub Release. It
|
|
39
|
+
# waits for the publish, so no release page names a version the registry
|
|
40
|
+
# cannot serve, and a re-run edits the release rather than failing on it.
|
|
41
|
+
github-release:
|
|
42
|
+
needs: publish
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
permissions:
|
|
45
|
+
contents: write
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v7
|
|
48
|
+
- name: GitHub Release from CHANGELOG.md
|
|
49
|
+
env:
|
|
50
|
+
GH_TOKEN: ${{ github.token }}
|
|
51
|
+
GH_REPO: ${{ github.repository }}
|
|
52
|
+
run: |
|
|
53
|
+
version="${GITHUB_REF_NAME#v}"
|
|
54
|
+
awk -v v="$version" '/^## /{ if (found) exit; found = ($2 == v); next } found' CHANGELOG.md > notes.md
|
|
55
|
+
if ! grep -q '^### ' notes.md ; then
|
|
56
|
+
echo "CHANGELOG.md has no section for ${version}" >&2
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
if gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1 ; then
|
|
60
|
+
gh release edit "$GITHUB_REF_NAME" --notes-file notes.md
|
|
61
|
+
else
|
|
62
|
+
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file notes.md --verify-tag
|
|
63
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## 2.0.7 - 2026-09-28
|
|
6
|
+
|
|
7
|
+
### Fixes
|
|
8
|
+
|
|
9
|
+
- Require vpndetection 5.5.1: IPv4-mapped visitors are looked up, not waved through ([`976dc44`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/976dc44ca5a65d2a13d6ce1d366a4582de24db89))
|
|
10
|
+
|
|
11
|
+
## 2.0.6 - 2026-09-27
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- Require vpndetection 5.5.0: OauthMetadata carries client_id_metadata_document_supported ([`21a3979`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/21a3979ec7ed49fb55e88e0a16a32ccefc0bf61f))
|
|
16
|
+
|
|
17
|
+
## 2.0.5 - 2026-09-25
|
|
18
|
+
|
|
19
|
+
### Fixes
|
|
20
|
+
|
|
21
|
+
- Raise the base floor to vpndetection 5.4.2 ([`fb4525a`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/fb4525a2d8ab530939a3a157675c937fd22cf71a))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vpndetection-fastapi
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
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,14 +20,14 @@ 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.5.1
|
|
24
24
|
Provides-Extra: dev
|
|
25
25
|
Requires-Dist: mypy>=1.11; extra == 'dev'
|
|
26
26
|
Requires-Dist: pytest>=8; extra == 'dev'
|
|
27
27
|
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
|
|
30
|
-
# [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection"
|
|
30
|
+
# [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="28"/>](https://vpndetection.io/) VPNDetection FastAPI Middleware
|
|
31
31
|
|
|
32
32
|
[](https://pypi.org/project/vpndetection-fastapi/)
|
|
33
33
|
[](LICENSE)
|
|
@@ -99,7 +99,7 @@ By default the middleware uses `request.client.host`, which is the socket peer u
|
|
|
99
99
|
For an edge that writes the address into its own header, name the header:
|
|
100
100
|
|
|
101
101
|
```python
|
|
102
|
-
from
|
|
102
|
+
from vpndetection_fastapi import header_ip_selector
|
|
103
103
|
|
|
104
104
|
ip_selector = header_ip_selector("CF-Connecting-IP") # or True-Client-IP, or your own
|
|
105
105
|
```
|
|
@@ -144,7 +144,7 @@ There are official VPNDetection client libraries available for many languages in
|
|
|
144
144
|
|
|
145
145
|
VPN Detection API: Accurate anonymity detection identifying VPNs, residential proxies, hosting servers, Tor nodes, CDNs, relays and more.
|
|
146
146
|
|
|
147
|
-
[<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection"
|
|
147
|
+
[<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="64"/>](https://vpndetection.io/)
|
|
148
148
|
|
|
149
149
|
## License
|
|
150
150
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection"
|
|
1
|
+
# [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="28"/>](https://vpndetection.io/) VPNDetection FastAPI Middleware
|
|
2
2
|
|
|
3
3
|
[](https://pypi.org/project/vpndetection-fastapi/)
|
|
4
4
|
[](LICENSE)
|
|
@@ -70,7 +70,7 @@ By default the middleware uses `request.client.host`, which is the socket peer u
|
|
|
70
70
|
For an edge that writes the address into its own header, name the header:
|
|
71
71
|
|
|
72
72
|
```python
|
|
73
|
-
from
|
|
73
|
+
from vpndetection_fastapi import header_ip_selector
|
|
74
74
|
|
|
75
75
|
ip_selector = header_ip_selector("CF-Connecting-IP") # or True-Client-IP, or your own
|
|
76
76
|
```
|
|
@@ -115,7 +115,7 @@ There are official VPNDetection client libraries available for many languages in
|
|
|
115
115
|
|
|
116
116
|
VPN Detection API: Accurate anonymity detection identifying VPNs, residential proxies, hosting servers, Tor nodes, CDNs, relays and more.
|
|
117
117
|
|
|
118
|
-
[<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection"
|
|
118
|
+
[<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="64"/>](https://vpndetection.io/)
|
|
119
119
|
|
|
120
120
|
## License
|
|
121
121
|
|
|
@@ -231,6 +231,50 @@
|
|
|
231
231
|
"why": "first address past 192.0.2.0/24; a mask one bit too wide claims it"
|
|
232
232
|
}
|
|
233
233
|
],
|
|
234
|
+
"ipv4Mapped": [
|
|
235
|
+
{
|
|
236
|
+
"ip": "::ffff:8.8.8.8",
|
|
237
|
+
"carries": "8.8.8.8",
|
|
238
|
+
"expect": false,
|
|
239
|
+
"why": "a public IPv4 visitor, as a server listening on :: sees every one: judged, sent and cached as 8.8.8.8, never as a bogon in ::ffff:0:0/96"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"ip": "::ffff:10.0.0.1",
|
|
243
|
+
"carries": "10.0.0.1",
|
|
244
|
+
"expect": true,
|
|
245
|
+
"why": "RFC 1918, mapped: a bogon for the same reason 10.0.0.1 is"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"ip": "::ffff:127.0.0.1",
|
|
249
|
+
"carries": "127.0.0.1",
|
|
250
|
+
"expect": true,
|
|
251
|
+
"why": "loopback, mapped: a local client of a server listening on ::"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"ip": "::ffff:808:808",
|
|
255
|
+
"carries": "8.8.8.8",
|
|
256
|
+
"expect": false,
|
|
257
|
+
"why": "the same address with its IPv4 half in hex"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"ip": "0:0:0:0:0:ffff:808:808",
|
|
261
|
+
"carries": "8.8.8.8",
|
|
262
|
+
"expect": false,
|
|
263
|
+
"why": "the same address written in full"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"ip": "::FFFF:8.8.8.8",
|
|
267
|
+
"carries": "8.8.8.8",
|
|
268
|
+
"expect": false,
|
|
269
|
+
"why": "upper-case hex digits"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"ip": "::8.8.8.8",
|
|
273
|
+
"carries": "::8.8.8.8",
|
|
274
|
+
"expect": true,
|
|
275
|
+
"why": "IPv4-compatible, not mapped: stays IPv6 and inside ::/96"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
234
278
|
"bogonResponse": {
|
|
235
279
|
"why": "A bogon is answered locally in the full max shape. Every flag is present and false, every detail object is present and empty, and is_bogon marks it as computed rather than served.",
|
|
236
280
|
"flagsFalse": [
|
|
@@ -5385,7 +5429,7 @@
|
|
|
5385
5429
|
]
|
|
5386
5430
|
},
|
|
5387
5431
|
"oauth": {
|
|
5388
|
-
"why": "The public OAuth accessor
|
|
5432
|
+
"why": "The public OAuth accessor. Arguments use the canonical parameter names; form fields and response members are WIRE names, mapped by each SDK exactly as it maps any other response. mslm:apikey_id and mslm:apikey surface as apikey_id and apikey.",
|
|
5389
5433
|
"endpoints": {
|
|
5390
5434
|
"metadata": {
|
|
5391
5435
|
"method": "GET",
|
|
@@ -6515,7 +6559,7 @@
|
|
|
6515
6559
|
]
|
|
6516
6560
|
},
|
|
6517
6561
|
"deferred": {
|
|
6518
|
-
"why": "Vectors for authorizationUrl, exchangeAuthorizationCode, createPkce and pkceChallenge, which ship only once the server can complete the authorization-code flow
|
|
6562
|
+
"why": "Vectors for authorizationUrl, exchangeAuthorizationCode, createPkce and pkceChallenge, which ship only once the server can complete the authorization-code flow. A device-flow runner never reads this key; nothing outside it names a deferred operation. emit.mjs still verifies these vectors so they are right when the methods ship.",
|
|
6519
6563
|
"pkce": {
|
|
6520
6564
|
"why": "RFC 7636 Appendix B. A generated verifier is 32 CSPRNG bytes as unpadded base64url.",
|
|
6521
6565
|
"verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|