x2
modified: frida_client/src/client.rs modified: frida_server/src/server.rs
This commit is contained in:
parent
1b3cc1289a
commit
4db0dedfef
@ -124,6 +124,7 @@ pub mod general {
|
|||||||
Some(h) => {
|
Some(h) => {
|
||||||
match h {
|
match h {
|
||||||
0 => {
|
0 => {
|
||||||
|
// todo: reduce repeated code blocks count
|
||||||
let handshake = UDPVpnHandshake::deserialize(&(buf1[..l].to_vec()));
|
let handshake = UDPVpnHandshake::deserialize(&(buf1[..l].to_vec()));
|
||||||
let mut k = [0u8; 32];
|
let mut k = [0u8; 32];
|
||||||
for (&x, p) in handshake.public_key.iter().zip(k.iter_mut()) {
|
for (&x, p) in handshake.public_key.iter().zip(k.iter_mut()) {
|
||||||
|
@ -207,6 +207,7 @@ pub async fn server_mode(server_config: ServerConfiguration, s_interface: Option
|
|||||||
//info!("Got handshake from {:?}", handshake.request_ip);
|
//info!("Got handshake from {:?}", handshake.request_ip);
|
||||||
let skey = BASE64_STANDARD.encode(&handshake.public_key);
|
let skey = BASE64_STANDARD.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) {
|
||||||
|
// todo: reduce repeated code blocks count
|
||||||
let internal_ip = IpAddr::V4(handshake.request_ip);
|
let internal_ip = IpAddr::V4(handshake.request_ip);
|
||||||
info!("Accepted client from {:?}", handshake.request_ip);
|
info!("Accepted client from {:?}", handshake.request_ip);
|
||||||
let mut k = [0u8; 32];
|
let mut k = [0u8; 32];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user