Pull requests / #3212
#3212 [Other] serve: support IPv6 bind addresses
open · @purrsec · 0 comentarios · En GitHub
Setup & installServer & APIAMD / HIPNVIDIA / CUDASecurity
Descripción
## Problem and result Starting Strata with an IPv6 bind address such as `--host ::` failed before model loading because the HTTP server always used an IPv4 socket. The server now selects `AF_INET6` for IPv6 literals, binds `::`, serves requests through `::1`, and formats IPv6 URLs with brackets. IPv4 behavior remains unchanged. ## Related discussion Supersedes closed PR #1326: https://github.com/Niko1221/Strata/pull/1326 ## Approach Add an IPv6 `Server` subclass and select it for IPv6 literals in both the startup preflight and the running server. Advertise the loopback URL as `[::1]` for `--host ::`, and document the IPv6 option. No default or authentication behavior changes; an API key remains recommended when listening beyond loopback. ## Validation **Passed:** - `python3 -m py_compile serve/server.py serve/test_security.py setup.py` at `fb2f6952` on macOS. - `PYTHONPATH=<temporary requirements target> python3 -m unittest serve.test_security -v`: 28 tests passed, including a real `::` bind and `/health` request through `::1`. - `git diff --check origin/main...HEAD`: passed. **Failed:** - `PYTHONPATH=<temporary requirements target> python3 -m unittest serve.test_server -q`: 341 tests ran; one existing vision test failed because `serve/lifeline.py` expects a mocked process to expose `.pid` under Python 3.14. This is unrelated to the IPv6 changes. **Not run:** - CUDA, HIP, SYCL and Metal builds; this change only touches the Python server, setup help, tests and documentation. ## Limits IPv6 support depends on the host OS having IPv6 enabled. Listening beyond loopback still requires an API key in normal startup.
En el sitio
Enlaces a install, modelos, releases.