fix: this was actually quite a big footgun
This commit is contained in:
parent
75931e5e88
commit
9177e44adb
1 changed files with 2 additions and 2 deletions
|
@ -168,7 +168,7 @@ async fn accept_websocket_connection(stream: TcpStream) -> Result<()> {
|
||||||
|
|
||||||
info!("New WebSocket connection: {}", addr);
|
info!("New WebSocket connection: {}", addr);
|
||||||
|
|
||||||
let domain = get_random_domain().await;
|
let domain = get_random_domain().await.to_lowercase();
|
||||||
|
|
||||||
ws_stream
|
ws_stream
|
||||||
.send(ClientboundControlMessage::DomainAssigned(domain.clone()).into())
|
.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?;
|
let handshake = Handshake::new(&packet?).await?;
|
||||||
info!("Minecraft client {} is connecting to {}", addr, handshake.server_address);
|
info!("Minecraft client {} is connecting to {}", addr, handshake.server_address);
|
||||||
let map = ROUTING_MAP.read().await;
|
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);
|
drop(map);
|
||||||
let mut handle: ChannelHandle = ChannelHandle::new(&sender, addr).await?;
|
let mut handle: ChannelHandle = ChannelHandle::new(&sender, addr).await?;
|
||||||
let mut buf = vec![];
|
let mut buf = vec![];
|
||||||
|
|
Loading…
Reference in a new issue