Feature description: This is a tracking bug for shill portal detection improvements owner: matthewmwang@chromium.org Incomplete design doc: go/cros_portal_notes
+rkc,tbarzic,snanda CLs for anyone interested: https://chromium-review.googlesource.com/q/hashtag:%22captive-portal-improvements%22+(status:open%20OR%20status:merged)
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb commit 96febfd0be9b51299d9f5c4d0353c21b5f0f68cb Author: Matthew Wang <matthewmwang@chromium.org> Date: Fri Dec 14 00:12:40 2018 shill: add HTTPS probe and logging for HTTPS probe The next step in improving captive portal detection is to add an HTTPS probe. This change adds the probe but does not use the results to make any portal diagnoses. We do this to ensure that the probe does not cause any regressions, and to collect some metrics to track improvements. BUG=chromium:903645 TEST=shill unittests Change-Id: I304c9815624384544adc2b07bfb69f1d738853f6 Reviewed-on: https://chromium-review.googlesource.com/1341226 Commit-Ready: Matthew Wang <matthewmwang@chromium.org> Tested-by: Matthew Wang <matthewmwang@chromium.org> Reviewed-by: Hugo Benichi <hugobenichi@google.com> Reviewed-by: Ben Chan <benchan@chromium.org> [modify] https://crrev.com/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb/shill/portal_detector.cc [modify] https://crrev.com/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb/shill/mock_http_request.h [modify] https://crrev.com/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb/shill/http_request.cc [modify] https://crrev.com/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb/shill/portal_detector.h [modify] https://crrev.com/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb/shill/http_request_test.cc [modify] https://crrev.com/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb/shill/http_request.h [modify] https://crrev.com/96febfd0be9b51299d9f5c4d0353c21b5f0f68cb/shill/portal_detector_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8 commit d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8 Author: Matthew Wang <matthewmwang@chromium.org> Date: Fri Dec 14 00:12:39 2018 libbrillo: Add ResolveHostToIp function for shill's use We are planning to add an HTTPS probe into our captive portal detection scheme. curl can only do HTTPS requests to a custom IP and port if it resolves an HTTPS URL to that IP and port. This AppendHost function will use the CURLOPT_RESOLVE option to force curl to do this DNS resolution by adding this mapping to the DNS cache. BUG=chromium:903645 TEST=`FEATURES=test emerge-caroline libbrillo` Change-Id: I9b0c5d614beaf025483f907f5614abd82c61f5f3 Reviewed-on: https://chromium-review.googlesource.com/1356359 Commit-Ready: Matthew Wang <matthewmwang@chromium.org> Tested-by: Matthew Wang <matthewmwang@chromium.org> Reviewed-by: Matthew Wang <matthewmwang@chromium.org> [modify] https://crrev.com/d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8/libbrillo/brillo/http/http_transport.h [modify] https://crrev.com/d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8/libbrillo/brillo/http/mock_transport.h [modify] https://crrev.com/d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8/libbrillo/brillo/http/http_transport_curl.cc [modify] https://crrev.com/d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8/libbrillo/brillo/http/http_transport_curl.h [modify] https://crrev.com/d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8/libbrillo/brillo/http/http_transport_fake.h [modify] https://crrev.com/d988ff9dbf8b0344d04f5b966e482dadd5f5f7a8/libbrillo/brillo/http/http_transport_curl_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/45d9f495dcd418fe79a1f9695acd1ac3d75df119 commit 45d9f495dcd418fe79a1f9695acd1ac3d75df119 Author: Matthew Wang <matthewmwang@chromium.org> Date: Fri Dec 14 00:12:40 2018 shill: only complete portal detection trial when both probes finish Currently, the HTTPS probe will be cut off if the HTTP probe results come in first. This change has PortalDetector wait for both probes to report a result before completing the trial. BUG=chromium:903645 TEST=1) shill unittests 2) deploy to caroline and look for log statements Change-Id: I6540d747c596afa6eb595b4e743aa971c2a70942 Reviewed-on: https://chromium-review.googlesource.com/1366385 Commit-Ready: Matthew Wang <matthewmwang@chromium.org> Tested-by: Matthew Wang <matthewmwang@chromium.org> Reviewed-by: Matthew Wang <matthewmwang@chromium.org> [modify] https://crrev.com/45d9f495dcd418fe79a1f9695acd1ac3d75df119/shill/portal_detector.h [modify] https://crrev.com/45d9f495dcd418fe79a1f9695acd1ac3d75df119/shill/portal_detector.cc [modify] https://crrev.com/45d9f495dcd418fe79a1f9695acd1ac3d75df119/shill/portal_detector_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/70fd330cddf2b536152637f5f01345e662895bf9 commit 70fd330cddf2b536152637f5f01345e662895bf9 Author: Matthew Wang <matthewmwang@chromium.org> Date: Wed Dec 19 07:36:51 2018 Creating histograms for portal detection results Creating histograms for portal detection results of both the HTTP and HTTPS probes. This is a success metric to show portal detection improvements with the introduction of the HTTPS probe. Bug: 903645 Change-Id: I1c44283117c446d782523b04a06316441677fb4c Reviewed-on: https://chromium-review.googlesource.com/c/1368999 Commit-Queue: Matthew Wang <matthewmwang@chromium.org> Reviewed-by: Alexei Svitkine <asvitkine@chromium.org> Cr-Commit-Position: refs/heads/master@{#617757} [modify] https://crrev.com/70fd330cddf2b536152637f5f01345e662895bf9/tools/metrics/histograms/enums.xml [modify] https://crrev.com/70fd330cddf2b536152637f5f01345e662895bf9/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/74f20c807ebf1d922d818c7cc277e9ea531fdff2 commit 74f20c807ebf1d922d818c7cc277e9ea531fdff2 Author: Matthew Wang <matthewmwang@chromium.org> Date: Wed Dec 19 09:12:50 2018 shill: Log UMA metrics for portal detection results With the addition of the new HTTPS probe, we'd like to see how the HTTPS probe improves our portal detection accuracy. Log these results to UMA. BUG=chromium:903645 TEST=1) shill unittests 2) deploy to caroline, connect to a network, look at chrome://histgrams Change-Id: I3fcfc1be4d75b2052ddb2c75f0ab83274e63b01a Reviewed-on: https://chromium-review.googlesource.com/1366386 Commit-Ready: Matthew Wang <matthewmwang@chromium.org> Tested-by: Matthew Wang <matthewmwang@chromium.org> Reviewed-by: Matthew Wang <matthewmwang@chromium.org> [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/metrics_test.cc [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/metrics.cc [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/portal_detector.h [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/mock_metrics.h [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/device.cc [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/connection_diagnostics.cc [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/metrics.h [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/mock_portal_detector.cc [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/portal_detector_test.cc [modify] https://crrev.com/74f20c807ebf1d922d818c7cc277e9ea531fdff2/shill/portal_detector.cc
Comment 1 by matthewmwang@chromium.org
, Nov 9