mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1326] [CLOSED] [Other] serve: support IPv6 bind addresses #3385
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1326
Author: @purrsec
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:fix/ipv6-listen📝 Commits (3)
87989e1serve: support IPv6 bind addresses3464554Merge remote-tracking branch 'origin/main' into fix/ipv6-listen45b3b18Merge branch 'main' into fix/ipv6-listen📊 Changes
6 files changed (+148 additions, -102 deletions)
View changed files
📝
README.fr.md(+30 -94)📝
README.md(+33 -0)📝
docs/DETAILS.md(+2 -0)📝
serve/server.py(+45 -3)📝
serve/test_security.py(+33 -1)📝
setup.py(+5 -4)📄 Description
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 selectsAF_INET6for IPv6 literals, binds::, serves requests through::1, and formats IPv6 URLs with brackets. IPv4 behavior remains unchanged.Related discussion
https://github.com/Niko1221/Strata/pull/1326#issuecomment-6156754724
Approach
Add an IPv6
Serversubclass 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.pyatfb2f6952on macOS.PYTHONPATH=<temporary requirements target> python3 -m unittest serve.test_security -v: 28 tests passed, including a real::bind and/healthrequest 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 becauseserve/lifeline.pyexpects a mocked process to expose.pidunder Python 3.14. This is unrelated to the IPv6 changes.Not run:
Limits
IPv6 support depends on the host OS having IPv6 enabled. Listening beyond loopback still requires an API key in normal startup.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.