Skip to content

Conversation

@dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Nov 22, 2025

Description

This allows for multiple interfaces to be bound, and be actually used.

You can now use this by passing

let endpoint = Endpoint::builder()
  .bind_addr_v4_default("127.0.0.1", 1234)
  .bind_addr_v4("192.168.1.2/24".parse()?, 1234) // bind to prefix_len of 24
  .bind()
  .await?

The selection of the interface is done internally by first looking at all specific bindings, and then fallbing back to the default version for this family.

Breaking Changes

  • iroh
    • changed
      • Endpoint::bind_addr_v4 to Endpoint::bind_addr_v4_default
      • Endpoint::bind_addr_v6 to Endpoint::bind_addr_v6_default
    • added
      • Endpoint::bind_addr_v4
      • Endpoint::bind_addr_v6
    • endpoint::Ipv4Net
    • endpoint::Ipv6Net

@github-actions
Copy link

github-actions bot commented Nov 22, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3692/docs/iroh/

Last updated: 2025-11-28T12:02:02Z

@github-actions
Copy link

github-actions bot commented Nov 22, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: f773c91

@n0bot n0bot bot added this to iroh Nov 22, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Nov 22, 2025
@dignifiedquire dignifiedquire marked this pull request as ready for review November 22, 2025 13:46
@dignifiedquire dignifiedquire changed the title feat(iroh): allow IP transports to bind to multiple interfaces feat(iroh)!: allow IP transports to bind to multiple interfaces Nov 22, 2025
@dignifiedquire dignifiedquire changed the title feat(iroh)!: allow IP transports to bind to multiple interfaces feat(iroh)!: allow multiple IP transports, including filtering by interface Nov 22, 2025
@dignifiedquire dignifiedquire force-pushed the feat-bind-interfaces branch 2 times, most recently from 6726f3c to 479652f Compare November 25, 2025 10:13
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.

3 participants