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