fix skip verif
This commit is contained in:
parent
c19ca3c7d1
commit
7c7414cf93
3 changed files with 6 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ struct OptClient {
|
|||
#[argp(option, short = 'c')]
|
||||
certs: Option<String>,
|
||||
/// Do not verify certificates
|
||||
#[argp(option, short = 's')]
|
||||
#[argp(switch, short = 's')]
|
||||
skip_verif: bool,
|
||||
/// Print debug info
|
||||
#[argp(switch, short = 'd')]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ pub async fn play(
|
|||
use_tls: bool,
|
||||
cert_path: &str,
|
||||
listen_addr: (&str, u16),
|
||||
_debug: bool,
|
||||
debug: bool,
|
||||
) {
|
||||
let mut response_map = HashMap::new();
|
||||
for (conn_id, (_server_name, records)) in records.iter() {
|
||||
|
|
@ -177,7 +177,9 @@ pub async fn play(
|
|||
if let Some((responses, last)) = response_map.get(&(conn_id, req_id)) {
|
||||
//dbg!(id);
|
||||
for (req_id, len) in responses {
|
||||
//println!("[SRV] response for ({}): {} bytes", id, res.len());
|
||||
if debug {
|
||||
println!("[SRV] response for ({req_id}): {len} bytes");
|
||||
}
|
||||
let mut data = dummy_bytes[0..*len as usize].to_vec();
|
||||
data[0..4].copy_from_slice(&(*len as u32).to_be_bytes());
|
||||
data[4..6].copy_from_slice(&(conn_id as u16).to_be_bytes());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue