Allow configuration for IPv4 binding
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe your problem
Golang by default binds to IPv6, which doesn't work for everybody.
It would be nice if we could specify tcp4 for:
https://github.com/ory/x/blob/6511eb1be9fe8389e93b50955a88121c1b728b22/networkx/listener.go#L30
Describe your ideal solution
Ideally the parent service config can pass down an override for the IPv4 vs IPv6 binding with a default to IPv6.
I can push the PR, but I am not sure if we want to offer another function to avoid a breaking change in the interface.
func MakeListener(network string, address string, socketPermission *configx.UnixPermission) (net.Listener, error)
Workarounds or alternatives
There is none right now.
Version
Kratos 1.1.0
Additional Context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading networkx/listener.go at the referenced listener implementation and inspect the MakeListener entry point. Trace how parent service configuration reaches it and determine how a network override can default to IPv6 without breaking the existing interface. Done means callers can select tcp4 or the default IPv6 behavior, with the relevant listener behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100