diff --git a/src/server.rs b/src/server.rs index b7c90d8..2fb8220 100644 --- a/src/server.rs +++ b/src/server.rs @@ -78,8 +78,8 @@ pub async fn server_mode(server_config: ServerConfiguration) { 0 => { // (&buf[1..len]).to_vec() let handshake = UDPVpnHandshake::deserialize(&buf); - info!("Got handshake! ip: {:?}; key: {:?}", handshake.request_ip, base64::encode(handshake.public_key)); - let skey = base64::encode(handshake.public_key); + info!("Got handshake! ip: {:?}; key: {:?}", handshake.request_ip, base64::encode(&handshake.public_key)); + let skey = base64::encode(&handshake.public_key); if plp.iter().any(|c| c.ip == handshake.request_ip && c.public_key == skey) { let internal_ip = IpAddr::V4(handshake.request_ip); info!("Accepted client");