diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index 3d375dfc..8d2711a7 100644 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -1,6 +1,6 @@ //! Connect to remote servers/clients. -use std::fmt::Debug; +use std::fmt::{self, Debug, Display}; use std::io::{self, Cursor}; use std::marker::PhantomData; use std::net::SocketAddr; @@ -274,6 +274,15 @@ impl Proxy { Self { addr, auth } } } +impl Display for Proxy { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "socks5://")?; + if let Some(auth) = &self.auth { + write!(f, "{}@", auth)?; + } + write!(f, "{}", self.addr) + } +} impl Connection { /// Create a new connection to the given address. diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index 57a12608..e78091df 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -705,7 +705,10 @@ impl Swarm { state: S, join_opts: &JoinOpts, ) -> Result { - debug!("add_with_opts called for account {}", account.username); + debug!( + "add_with_opts called for account {} with opts {join_opts:?}", + account.username + ); let address = join_opts .custom_address