mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
add a bit more logging to handshake_proxy
This commit is contained in:
parent
2c37ade959
commit
fa132b61fc
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue