Commit 80295948 authored by bma4's avatar bma4 Committed by Commit bot

do not send traffic to localhost through proxy for android

The proxy config service for android does not allow
one to configure an exception for localhost be made.
The implementation for Linux did allow this in:
   proxy_config_service_linux.cc
it just seems it was overlooked for android.

Instead of adding in the ability to configure
localhost as an exclusion, it makes more sense
to just force the exception; it seems silly to
send traffic for localhost through a proxy.

This patch addresses the following bug in android:
   https://code.google.com/p/android/issues/detail?id=37031

BUG=

Review URL: https://codereview.chromium.org/796003002

Cr-Commit-Position: refs/heads/master@{#308243}
parent 859e2c60
......@@ -68,6 +68,7 @@ Benjamin Jemlich <pcgod99@gmail.com>
Bernard Cafarelli <voyageur@gentoo.org>
Bhanukrushana Rout <b.rout@samsung.com>
Bobby Powers <bobbypowers@gmail.com>
Branden Archer <bma4@zips.uakron.edu>
Brendan Long <self@brendanlong.com>
Brian G. Merrell <bgmerrell@gmail.com>
Brian Konzman, SJ <b.g.konzman@gmail.com>
......
......@@ -98,6 +98,12 @@ void AddBypassRules(const std::string& scheme,
// by | and that use * as a wildcard. For example, setting the
// http.nonProxyHosts property to *.android.com|*.kernel.org will cause
// requests to http://developer.android.com to be made without a proxy.
// Force localhost to be on the proxy exclusion list;
// otherwise all localhost traffic is routed through
// the proxy which is not desired.
bypass_rules->AddRuleToBypassLocal();
std::string non_proxy_hosts =
get_property.Run(scheme + ".nonProxyHosts");
if (non_proxy_hosts.empty())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment