-
Notifications
You must be signed in to change notification settings - Fork 186
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
feat(iroh-relay)!: add a QUIC server for QUIC address discovery to the iroh relay. #2965
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2965/docs/iroh/ Last updated: 2024-12-02T04:43:46Z |
ad6423e
to
ec4ddb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't let the extensive commenting put you off, it looks good!
The config plumbing is just painful.
4456bc7
to
2ba32d3
Compare
@flub can you take a look at the config options for the relay server again. I removed the option to generate self-signed certs automatically and added info to the readme about how to pass those in. However, the Is this the worst? I tried to keep it as simple as possible 😂 but could use another set of eyes. |
actually, @flub I'm wondering if instead, So if you want to run QAD locally you would run: enable_quic_addr_discovery = true
[tls]
#tls config goes here That feels cleaner? thoughts? |
Hum, it is awkward that TLS certs are basically becoming mandatory even for a local dev relay server. But it is inevitable and we'll only grow more dependence over a QUIC transport over time. But, the good news is that we don't have to get this right from the start. The level of stability for So I'm fine with both of these options. And yes, the latter one, disable qad by default, is the simpler one so why not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Don't think there's anything blocking but still a few suggestions that are hopefully useful.
4bc2bfd
to
140f47c
Compare
Description
This PR adds a QUIC endpoint to the relay server that can do QUIC address discovery. It also contains structs/functions for properly doing the Client side interaction for this process.
Also, this adjust the
RelayNode
to include configuration on how to speak to the QUIC endpoint on the relay server.QUIC is disabled by default and requires a
TlsConfig
to be configured in order to work.closes #2964
Breaking Changes
iroh_base::relay_map::RelayNode
now has fieldquic
that takes aOption<iroh_base::relay_map::QuicConfig>
iroh::test_utils::run_relay_server_with(stun: Option<StunConfig>)
=>iroh::test_utils::run_relay_server_with(stun: Option<StunConfig>, quic: bool)
quic
istrue
, it will start a quic server for QUIC address discovery, that has self signed tls certs for testing.iroh_relay::server::ServerConfig
has fieldquic
that takes aOption<iroh_relay::server::QuicConfig>
iroh_relay::server::TlsConfig.quic_bind_addr
is a new field that takes aSocketAddr
iroh_relay::server::TlsConfig.server_config
is a new field that takes arustls::ServerConfig
config
has been removed from variantiroh_relay::server::CertConfig::LetsEncrypt
iroh_relay::server::CertConfig::LetsEncrypt
has a new fieldstate
that takes atokio_rustls_acme::AcmeState<EC, EA>
iroh_relay::server::CertConfig::Manual
no longer has fieldprivate_key
Change checklist