Changes to be committed:
modified: src/server.rs
This commit is contained in:
parent
5edb2d6b57
commit
45ff787cdf
@ -78,8 +78,8 @@ pub async fn server_mode(server_config: ServerConfiguration) {
|
|||||||
0 => {
|
0 => {
|
||||||
// (&buf[1..len]).to_vec()
|
// (&buf[1..len]).to_vec()
|
||||||
let handshake = UDPVpnHandshake::deserialize(&buf);
|
let handshake = UDPVpnHandshake::deserialize(&buf);
|
||||||
info!("Got handshake! ip: {:?}; key: {:?}", handshake.request_ip, 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);
|
let skey = base64::encode(&handshake.public_key);
|
||||||
if plp.iter().any(|c| c.ip == handshake.request_ip && c.public_key == skey) {
|
if plp.iter().any(|c| c.ip == handshake.request_ip && c.public_key == skey) {
|
||||||
let internal_ip = IpAddr::V4(handshake.request_ip);
|
let internal_ip = IpAddr::V4(handshake.request_ip);
|
||||||
info!("Accepted client");
|
info!("Accepted client");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user