Skip to content

feat(iroh): Allow connecting with "fallback" ALPNs #3282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 30, 2025

Conversation

matheus23
Copy link
Member

Description

Allows connecting with multiple ALPNs so you can actually take advantage of ALPN also on the connecting side to support connections with older accept sides.

Notes & open questions

This only implements this via the ConnectOptions, which I think is fair? I generally like the pattern of connect -> connect_with_opts, and I don't think this is worth changing connect for.

Closes #2949

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.

@matheus23 matheus23 self-assigned this Apr 29, 2025
Copy link

github-actions bot commented Apr 29, 2025

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

Last updated: 2025-04-30T08:43:20Z

Copy link

github-actions bot commented Apr 29, 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: 1a894a7

@n0bot n0bot bot added this to iroh Apr 29, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Apr 29, 2025
@@ -1279,6 +1281,28 @@ impl ConnectOptions {
self.transport_config = Some(transport_config);
self
}

/// Sets more [ALPN] identifiers that should be signaled as supported on connection.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Sets more [ALPN] identifiers that should be signaled as supported on connection.
/// Sets multiple [ALPN] identifiers to negotiate with the server.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like your suggestion, but it also made me dislike the current wording.
I have some ideas for something better ✌️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed something that I think is an improvement.

@matheus23 matheus23 added this pull request to the merge queue Apr 30, 2025
Merged via the queue into main with commit 839bfaa Apr 30, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Apr 30, 2025
@matheus23 matheus23 deleted the matheus23/conn-mult-alpns branch April 30, 2025 12:18
@matheus23 matheus23 added this to the 0.35.0 milestone Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Allow specifying multiple ALPNs in Endoint::connect
2 participants