diff --git a/server/src/main.rs b/server/src/main.rs index a9d255f..a602f59 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -168,7 +168,7 @@ async fn accept_websocket_connection(stream: TcpStream) -> Result<()> { info!("New WebSocket connection: {}", addr); - let domain = get_random_domain().await; + let domain = get_random_domain().await.to_lowercase(); ws_stream .send(ClientboundControlMessage::DomainAssigned(domain.clone()).into()) @@ -366,7 +366,7 @@ async fn accept_minecraft_connection(mut stream: TcpStream) -> Result<()> { let handshake = Handshake::new(&packet?).await?; info!("Minecraft client {} is connecting to {}", addr, handshake.server_address); let map = ROUTING_MAP.read().await; - if let Some(sender) = map.get(&handshake.server_address).cloned() { + if let Some(sender) = map.get(&handshake.server_address.to_lowercase()).cloned() { drop(map); let mut handle: ChannelHandle = ChannelHandle::new(&sender, addr).await?; let mut buf = vec![];