diff options
| author | mat <git@matdoes.dev> | 2024-12-23 07:31:51 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-23 07:31:51 +0000 |
| commit | fa132b61fcd23974a1a34bc05fc4c309d304b3d1 (patch) | |
| tree | 6bcf795eb2f66e4314e81ad3a2f1518e75aac65e /azalea-protocol | |
| parent | 2c37ade959c45e7db93ce4581f49902acbbb86b0 (diff) | |
| download | azalea-drasl-fa132b61fcd23974a1a34bc05fc4c309d304b3d1.tar.xz | |
add a bit more logging to handshake_proxy
Diffstat (limited to 'azalea-protocol')
| -rw-r--r-- | azalea-protocol/examples/handshake_proxy.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/azalea-protocol/examples/handshake_proxy.rs b/azalea-protocol/examples/handshake_proxy.rs index 7ff7eaae..f50300d0 100644 --- a/azalea-protocol/examples/handshake_proxy.rs +++ b/azalea-protocol/examples/handshake_proxy.rs @@ -55,6 +55,9 @@ async fn main() -> anyhow::Result<()> { // Bind to an address and port let listener = TcpListener::bind(LISTEN_ADDR).await?; + + info!("Listening on {LISTEN_ADDR}, proxying to {PROXY_ADDR}"); + loop { // When a connection is made, pass it off to another thread let (stream, _) = listener.accept().await?; @@ -75,8 +78,10 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { Ok(packet) => match packet { ServerboundHandshakePacket::Intention(packet) => { info!( - "New connection: {0}, Version {1}, {2:?}", + "New connection from {}, hostname {:?}:{}, version {}, {:?}", ip.ip(), + packet.hostname, + packet.port, packet.protocol_version, packet.intention ); |
