[Add] TCP server to core MTP (HTTP/1.1 & HTTP/2) compatibility
All checks were successful
CI / checks (push) Successful in 5m29s

This commit is contained in:
Alex Emmet 2026-07-21 00:43:00 +02:00
commit 00f0aaeeff
21 changed files with 1627 additions and 677 deletions

View file

@ -133,17 +133,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Box::new(complete_register),
);
let _https = web_server::spawn_https(
std::net::SocketAddr::new(config.ip, config.port),
&config.tls_fullchain,
&config.tls_key,
)
.await?;
let mut host = mtp::webserver::MTPWebServer::new(config, web_server::config()?).await?;
println!(
"Server listening on https://{} (HTTPS + UDP WebTransport)",
host.local_addr()
);
println!("Server listening on https://{}", host.local_addr());
println!("TCP: HTTP/1.1 and HTTP/2");
println!("UDP: HTTP/3 and WebTransport");
while let Some(conn) = host.accept().await? {
let decrypt_keyring = Arc::clone(&decrypt_keyring);