From ee016ea0b68e85bcc06c01c687fc2254ba1ae3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 11 Apr 2022 01:08:40 +0200 Subject: [PATCH 1/3] http protocol: AnnounceRequest: always ask for compact responses --- aquatic_http_protocol/src/request.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aquatic_http_protocol/src/request.rs b/aquatic_http_protocol/src/request.rs index 22fe7ed..4abb318 100644 --- a/aquatic_http_protocol/src/request.rs +++ b/aquatic_http_protocol/src/request.rs @@ -59,6 +59,9 @@ impl AnnounceRequest { output.write_all(::urlencoding::encode(key.as_str()).as_bytes())?; } + // Always ask for compact responses to ease load testing of non-aquatic trackers + output.write_all(b"&compact=1")?; + output.write_all(b" HTTP/1.1\r\nHost: localhost\r\n\r\n")?; Ok(()) From db79adc13bbce08f101b7eb7a76967b5deceeab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 11 Apr 2022 01:15:26 +0200 Subject: [PATCH 2/3] http load test: exclusively use TLS 1.3 --- aquatic_http_load_test/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aquatic_http_load_test/Cargo.toml b/aquatic_http_load_test/Cargo.toml index 861505c..30df0a6 100644 --- a/aquatic_http_load_test/Cargo.toml +++ b/aquatic_http_load_test/Cargo.toml @@ -26,7 +26,7 @@ log = "0.4" mimalloc = { version = "0.1", default-features = false } rand = { version = "0.8", features = ["small_rng"] } rand_distr = "0.4" -rustls = { version = "0.20", features = ["dangerous_configuration"] } +rustls = { version = "0.20", default-features = false, features = ["logging", "dangerous_configuration"] } # TLS 1.2 disabled serde = { version = "1", features = ["derive"] } [dev-dependencies] From 7553a29416c554ec7b0305b2cd2ae0384ef7f975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 11 Apr 2022 01:19:22 +0200 Subject: [PATCH 3/3] http load test: use log crate for logging deserialization errors --- aquatic_http_load_test/src/network.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aquatic_http_load_test/src/network.rs b/aquatic_http_load_test/src/network.rs index 75f5131..480d422 100644 --- a/aquatic_http_load_test/src/network.rs +++ b/aquatic_http_load_test/src/network.rs @@ -233,7 +233,7 @@ impl Connection { break; } Err(err) => { - eprintln!( + ::log::warn!( "deserialize response error with {} bytes read: {:?}, text: {}", buffer_position, err,