generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Problem:
Most of the s2n-quic examples in this repository bind their socket to 127.0.0.1:4433. If we instead use 0.0.0.0:<PORT>, the connection seems to either be extremely slow or does not work at all. Using the exact same port with 127.0.0.1 instead will make it work flawlessly.
Reproduction Steps
Running the provided code will fail with "MaxHandshakeDurationExceeded". Changing the server IP from 0.0.0.0 to 127.0.0.1 will immediately make the connection and cleanly terminate.
use std::error::Error;
use std::net::SocketAddr;
use s2n_quic::{ Client, Server };
use s2n_quic::client::Connect;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let server = Server::builder()
.with_tls((CERT, KEY))? // FIXME: add this yourself
.with_io("0.0.0.0:25575")? // WARN: change to `127.0.0.1`
.start()?;
let client = Client::builder()
.with_tls(CERT)? // FIXME: add this yourself
.with_io("0.0.0.0:0")?
.start()?;
let connect = Connect::new("0.0.0.0:25575".parse::<SocketAddr>()?) // WARN: change to `127.0.0.1`
.with_server_name("localhost");
let conn = client.connect(connect).await?;
return Ok(());
}Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested