Skip to content

Conversation

@zh522130
Copy link

Description

This pull request refactors the IP address collection logic to include IPv4 link-local addresses in the regular addresses list. I'm not sure if this complies with the specifications, but this approach minimizes the required changes to iroh

fix #49.

Breaking Changes

Notes & open questions

Change checklist

  • [ x ] Self-review.
  • [ x ] Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@n0bot n0bot bot added this to iroh Oct 16, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Oct 16, 2025
@dignifiedquire
Copy link
Contributor

I don't think we should use these indiscriminately, in most discovery services, publishing these would be not helpful to problematic.

@zh522130
Copy link
Author

I don't think we should use these indiscriminately, in most discovery services, publishing these would be not helpful to problematic.

You're right, it's indeed unnecessary in most cases. Currently, the scenario I'm encountering involves direct Ethernet cable connections. Since my devices are embedded systems that may not always have network access, such situations can occur.

@zh522130
Copy link
Author

@dignifiedquire What suggestions do you have? Should I close this PR and #49, and implement this feature through iroh later? Or perhaps I need to maintain my own branch tailored to my specific requirements.

@flub
Copy link
Contributor

flub commented Oct 17, 2025

I do think iroh always needs to have information about link-local addresses available. But it needs to be smart about how it uses them. E.g. they're not something to use for holepunching. But if both endpoints have a link-local address (IPv4 or IPv6) that is on the same subnet then the client should attempt to connect to it.

It've not looked at the cascading impact of adding this right now, it might well trigger weird or unnecessary-in-most-scenarios behaviour in iroh if we did this right now. But we should totally do this eventually when we implement use of link-local addresses in iroh.

See also n0-computer/iroh#2491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

Include linklocal4 in LocalAddresses::regular or add LocalAddresses::linklocal4

3 participants