增加服务端加密、完善客户端加密

This commit is contained in:
lubeilin
2023-08-27 11:58:32 +08:00
parent 81764433d8
commit 0472b1590e
42 changed files with 2546 additions and 887 deletions
+4 -1
View File
@@ -1,5 +1,6 @@
use std::net::{Ipv4Addr, SocketAddr};
pub mod handshake_handler;
pub mod heartbeat_handler;
pub mod punch_handler;
pub mod recv_handler;
@@ -26,14 +27,16 @@ pub struct PeerDeviceInfo {
pub virtual_ip: Ipv4Addr,
pub name: String,
pub status: PeerDeviceStatus,
pub client_secret: bool,
}
impl PeerDeviceInfo {
pub fn new(virtual_ip: Ipv4Addr, name: String, status: u8) -> Self {
pub fn new(virtual_ip: Ipv4Addr, name: String, status: u8,client_secret: bool) -> Self {
Self {
virtual_ip,
name,
status: PeerDeviceStatus::from(status),
client_secret
}
}
}