feat(auth): finish protocol 10 method 2 and 3
This commit is contained in:
parent
8a3f443d85
commit
d18ba43aed
24 changed files with 490 additions and 43 deletions
|
|
@ -12,7 +12,7 @@ use hmac::{Hmac, Mac};
|
|||
use log::{error, trace, warn};
|
||||
use md5::{Md5, Digest};
|
||||
use thiserror::Error;
|
||||
use v_byte_macros::{EnumTryInto, SwapEndian};
|
||||
use v_byte_macros::{SwapEndian};
|
||||
use crate::endianness::{IS_BIG_ENDIAN, ReadExtensions};
|
||||
use crate::prudp::packet::flags::ACK;
|
||||
use crate::prudp::packet::PacketOption::{ConnectionSignature, FragmentId, InitialSequenceId, MaximumSubstreamId, SupportedFunctions};
|
||||
|
|
@ -173,13 +173,6 @@ impl Default for PRUDPHeader{
|
|||
}
|
||||
|
||||
|
||||
#[derive(EnumTryInto)]
|
||||
|
||||
#[repr(u16)]
|
||||
enum PacketSpecificData {
|
||||
E = 0x10
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum PacketOption{
|
||||
SupportedFunctions(u32),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ pub struct ActiveConnectionData {
|
|||
pub reliable_client_counter: u16,
|
||||
pub reliable_server_counter: u16,
|
||||
pub reliable_client_queue: VecDeque<PRUDPPacket>,
|
||||
pub connection_data_channel: Sender<Vec<u8>>,
|
||||
server_encryption: Box<dyn StreamCipher + Send>,
|
||||
client_decryption: Box<dyn StreamCipher + Send>,
|
||||
pub server_session_id: u8,
|
||||
|
|
@ -363,7 +362,7 @@ impl SocketData {
|
|||
self.socket.send_to(&vec, client_address.regular_socket_addr).await.expect("failed to send data back");
|
||||
}
|
||||
}
|
||||
|
||||
3 => {}
|
||||
_ => unimplemented!("unimplemented packet type: {}", packet.header.types_and_flags.get_types())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue