ory / ory/x

Allow configuration for IPv4 binding

Open
#769 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat
Dominant language
Go
Stars
111
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Preflight checklist
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.