From d364ebaef0e2292ed0b252d45a9f16a3db494856 Mon Sep 17 00:00:00 2001 From: Nick Banks Date: Sun, 7 Jul 2024 17:10:42 -0400 Subject: [PATCH] Add More Features (#237) * Add More Features * fixes * Fixes * Unnecessary header --- src/quicreach.cpp | 55 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/src/quicreach.cpp b/src/quicreach.cpp index aa8d450..8080341 100644 --- a/src/quicreach.cpp +++ b/src/quicreach.cpp @@ -40,15 +40,19 @@ struct ReachConfig { bool RequireAll {false}; std::vector HostNames; QuicAddr Address; + QuicAddr SourceAddress; uint32_t Parallel {1}; + uint32_t Repeat {0}; + uint32_t Timeout {1000}; uint16_t Port {443}; MsQuicAlpn Alpn {"h3"}; MsQuicSettings Settings; QUIC_CREDENTIAL_FLAGS CredFlags {QUIC_CREDENTIAL_FLAG_CLIENT}; const char* OutCsvFile {nullptr}; - ReachConfig() { - Settings.SetDisconnectTimeoutMs(1000); - Settings.SetHandshakeIdleTimeoutMs(1000); + ReachConfig() { } + void Set() { + Settings.SetDisconnectTimeoutMs(Timeout); + Settings.SetHandshakeIdleTimeoutMs(Timeout); Settings.SetPeerUnidiStreamCount(3); Settings.SetMinimumMtu(1288); /* We use a slightly larger than default MTU: 1240 (QUIC) + 40 (IPv6) + 8 (UDP) */ @@ -130,7 +134,10 @@ bool ParseConfig(int argc, char **argv) { " -m, --mtu The initial (IPv6) MTU to use (def=1288)\n" " -p, --port The UDP port to use (def=443)\n" " -r, --req-all Require all hostnames to succeed\n" + " -R, --repeat