diff --git a/README.md b/README.md index 1e9abde0..2d3e9937 100644 --- a/README.md +++ b/README.md @@ -41,17 +41,12 @@ Failure ```Bash > quicreach '*' --stats - SERVER RTT TIME_I TIME_H SEND:RECV C1 S1 FAM VER - quic.aiortc.org 108.957 ms 114.643 ms 232.626 ms 3:5 2480:4899 (2.0x) 276 4546 IPv6 v1 * - ietf.akaquic.com - quic.ogre.com - quic.rocks - mew.org 196.969 ms 198.060 ms 395.859 ms 3:6 2480:6650 (2.7x) 268 4539 IPv6 v2 * - http3-test.litespeedtech.com - msquic.net 85.338 ms 87.281 ms 93.002 ms 1:4 1260:3660 (2.9x) 271 3460 IPv4 v1 - nghttp2.org - cloudflare-quic.com 12.880 ms 15.742 ms 22.834 ms 1:7 1240:5128 (4.1x) 280 2666 IPv6 v1 ! - pandora.cm.in.tum.de + SERVER RTT TIME_I TIME_H SEND:RECV C1 S1 VER IP + google.com 2.409 ms 2.936 ms 5.461 ms 3:7 2520:8370 (3.3x) 287 6901 v1 172.253.62.102:443 * + facebook.com 1.845 ms 4.250 ms 4.722 ms 1:4 1260:4512 (3.6x) 289 3245 v1 31.13.66.35:443 ! + youtube.com 2.702 ms 3.020 ms 6.491 ms 3:7 2520:8361 (3.3x) 288 6893 v1 142.251.163.93:443 * + twitter.com + instagram.com 0.944 ms 3.259 ms 3.717 ms 1:4 1260:4464 (3.5x) 290 3197 v1 31.13.66.174:443 ! ``` ### Full Help @@ -63,12 +58,14 @@ usage: quicreach [options...] -b, --built-in-val Use built-in TLS validation logic -c, --csv Writes CSV results to the given file -h, --help Prints this help text + -i, --ip
The IP address to use -l, --parallel The numer of parallel hosts to test at once (def=1) -m, --mtu The initial (IPv6) MTU to use (def=1288) -p, --port The UDP port to use (def=443) -r, --req-all Require all hostnames to succeed -s, --stats Print connection statistics -u, --unsecure Allows unsecure connections + -v, --version Prints out the version ``` # Contributing diff --git a/src/domains.hpp b/src/domains.hpp index 53bc1c7e..84a181ab 100644 --- a/src/domains.hpp +++ b/src/domains.hpp @@ -7,28 +7,6 @@ const char* TopDomains[] = { - // Known interop servers - "quic.aiortc.org", - "ietf.akaquic.com", - "quic.ogre.com", - "quic.rocks", - "mew.org", - "http3-test.litespeedtech.com", - "msquic.net", - "nghttp2.org", - "cloudflare-quic.com", - "pandora.cm.in.tum.de", - "test.privateoctopus.com", - "quant.eggert.org", - "h3.stammw.eu", - "quic.seemann.io", - "quic.tech", - "quicker.edm.uhasselt.be", - "quic.examp1e.net", - "h2o.examp1e.net", - "www.haproxy.org", - "outlook-evergreen.office.com", - "outlook.office.com", // Top-level domains - found on https://majestic.com/reports/majestic-million?s=0 // data are processed such that root domains appear only once "google.com", @@ -100,6 +78,7 @@ const char* TopDomains[] = "youtube-nocookie.com", "oracle.com", "office.com", + "outlook.office.com", // Extra variant known to support HTTP/3 "bloomberg.com", "harvard.edu", "imdb.com", diff --git a/src/installer.wxs b/src/installer.wxs index 92ff9bd9..852d331a 100644 --- a/src/installer.wxs +++ b/src/installer.wxs @@ -5,7 +5,7 @@ Manufacturer="Microsoft" Name="quicreach" UpgradeCode="8395c163-ac9f-4a89-82fc-689fe25f0777" - Version="1.2.0.0"> + Version="1.3.0.0"> diff --git a/src/quicreach.cpp b/src/quicreach.cpp index 0307bc54..c212ddce 100644 --- a/src/quicreach.cpp +++ b/src/quicreach.cpp @@ -39,6 +39,7 @@ struct ReachConfig { bool PrintStatistics {false}; bool RequireAll {false}; std::vector HostNames; + QuicAddr Address; uint32_t Parallel {1}; uint16_t Port {443}; MsQuicAlpn Alpn {"h3"}; @@ -124,6 +125,7 @@ bool ParseConfig(int argc, char **argv) { " -b, --built-in-val Use built-in TLS validation logic\n" " -c, --csv Writes CSV results to the given file\n" " -h, --help Prints this help text\n" + " -i, --ip
The IP address to use\n" " -l, --parallel The numer of parallel hosts to test at once (def=1)\n" " -m, --mtu The initial (IPv6) MTU to use (def=1288)\n" " -p, --port The UDP port to use (def=443)\n" @@ -154,14 +156,20 @@ bool ParseConfig(int argc, char **argv) { if (++i >= argc) { printf("Missing MTU value\n"); return false; } Config.Settings.SetMinimumMtu((uint16_t)atoi(argv[i])); - } else if (!strcmp(argv[i], "--port") || !strcmp(argv[i], "-p")) { - if (++i >= argc) { printf("Missing port number\n"); return false; } - Config.Port = (uint16_t)atoi(argv[i]); + } else if (!strcmp(argv[i], "--ip") || !strcmp(argv[i], "-i")) { + if (++i >= argc) { printf("Missing IP address\n"); return false; } + if (!QuicAddrFromString(argv[i], 0, &Config.Address.SockAddr)) { + printf("Invalid address arg passed in\n"); return false; + } } else if (!strcmp(argv[i], "--parallel") || !strcmp(argv[i], "-l")) { if (++i >= argc) { printf("Missing parallel number\n"); return false; } Config.Parallel = (uint32_t)atoi(argv[i]); + } else if (!strcmp(argv[i], "--port") || !strcmp(argv[i], "-p")) { + if (++i >= argc) { printf("Missing port number\n"); return false; } + Config.Port = (uint16_t)atoi(argv[i]); + } else if (!strcmp(argv[i], "--stats") || !strcmp(argv[i], "-s")) { Config.PrintStatistics = true; @@ -190,6 +198,9 @@ struct ReachConnection : public MsQuicConnection { ) : MsQuicConnection(Registration, CleanUpAutoDelete, Callback), HostName(HostName) { IncStat(Results.TotalCount); Results.IncActive(); + if (IsValid() && Config.Address.GetFamily() != QUIC_ADDRESS_FAMILY_UNSPEC) { + InitStatus = SetRemoteAddr(Config.Address); + } if (IsValid()) { InitStatus = Start(Configuration, HostName, Config.Port); } @@ -249,8 +260,10 @@ struct ReachConnection : public MsQuicConnection { TooMuch ? '!' : (MultiRtt ? '*' : ' '), Retry ? 'R' : ' ', '\0'}; + QUIC_ADDR_STR AddrStr; + QuicAddrToString(&RemoteAddr.SockAddr, &AddrStr); unique_lock lock(Results.Mutex); - printf("%30s %3u.%03u ms %3u.%03u ms %3u.%03u ms %u:%u %u:%u (%2.1fx) %4u %4u %s %s %s\n", + printf("%30s %3u.%03u ms %3u.%03u ms %3u.%03u ms %u:%u %u:%u (%2.1fx) %4u %4u %s %20s %s\n", HostName, Stats.Rtt / 1000, Stats.Rtt % 1000, InitialTime / 1000, InitialTime % 1000, @@ -262,8 +275,8 @@ struct ReachConnection : public MsQuicConnection { Amplification, Stats.HandshakeClientFlight1Bytes, Stats.HandshakeServerFlight1Bytes, - RemoteAddr.GetFamily() == QUIC_ADDRESS_FAMILY_INET6 ? "IPv6" : "IPv4", Version == QUIC_VERSION_1 ? "v1" : "v2", + AddrStr.Address, HandshakeTags); } } @@ -308,7 +321,7 @@ bool TestReachability() { Configuration.SetVersionNegotiationExtEnabled(); if (Config.PrintStatistics) - printf("%30s RTT TIME_I TIME_H SEND:RECV C1 S1 FAM VER\n", "SERVER"); + printf("%30s RTT TIME_I TIME_H SEND:RECV C1 S1 VER IP\n", "SERVER"); for (auto HostName : Config.HostNames) { new ReachConnection(Registration, Configuration, HostName); diff --git a/src/quicreach.ver b/src/quicreach.ver index bef686c5..379bd799 100644 --- a/src/quicreach.ver +++ b/src/quicreach.ver @@ -8,7 +8,7 @@ #endif #ifndef VER_MINOR -#define VER_MINOR 2 +#define VER_MINOR 3 #endif #ifndef VER_PATCH