Changes to be committed:

modified:   src/server.rs
This commit is contained in:
Michael Wain 2024-08-19 17:13:26 +03:00
parent 5edb2d6b57
commit 45ff787cdf

View File

@ -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");