aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/examples
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-23 07:31:51 +0000
committermat <git@matdoes.dev>2024-12-23 07:31:51 +0000
commitfa132b61fcd23974a1a34bc05fc4c309d304b3d1 (patch)
tree6bcf795eb2f66e4314e81ad3a2f1518e75aac65e /azalea-protocol/examples
parent2c37ade959c45e7db93ce4581f49902acbbb86b0 (diff)
downloadazalea-drasl-fa132b61fcd23974a1a34bc05fc4c309d304b3d1.tar.xz
add a bit more logging to handshake_proxy
Diffstat (limited to 'azalea-protocol/examples')
-rw-r--r--azalea-protocol/examples/handshake_proxy.rs7
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
);