From: Michael Vogt Date: Sat, 19 Oct 2013 16:29:59 +0000 (+0200) Subject: add Acquire::http::Proxy-Auto-Detect to the apt.conf.5 manpage (closes: 726597) X-Git-Tag: 0.9.13.exp1ubuntu1~2^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c08cf1dc784a98a253296a51433f6de7d16d3125?ds=inline add Acquire::http::Proxy-Auto-Detect to the apt.conf.5 manpage (closes: 726597) --- diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index c9bb06123..0d0d95c7a 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -124,6 +124,12 @@ " > + + squid-deb-proxy-client + 1 + " +> + debsign 1 diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 42119baa5..e8da666c7 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -396,6 +396,14 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; Acquire::http::User-Agent can be used to set a different User-Agent for the http download method as some proxies allow access for clients only if the client uses a known identifier. + + Acquire::http::Proxy-Auto-Detect can be used to + specify a external command to discover the http proxy to use. Apt expects + the command to output the proxy on stdout in the style + http://proxy:port/. See the + &squid-deb-proxy-client; package for a example implementation that + uses avahi. + diff --git a/methods/http.cc b/methods/http.cc index 71a02e53a..b22b61efc 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -798,7 +798,6 @@ bool HttpMethod::Configuration(string Message) PipelineDepth = _config->FindI("Acquire::http::Pipeline-Depth", PipelineDepth); Debug = _config->FindB("Debug::Acquire::http",false); - AutoDetectProxyCmd = _config->Find("Acquire::http::ProxyAutoDetect"); // Get the proxy to use AutoDetectProxy(); @@ -811,6 +810,11 @@ bool HttpMethod::Configuration(string Message) /* */ bool HttpMethod::AutoDetectProxy() { + // option is "Acquire::http::Proxy-Auto-Detect" but we allow the old + // name without the dash ("-") + AutoDetectProxyCmd = _config->Find("Acquire::http::Proxy-Auto-Detect", + _config->Find("Acquire::http::ProxyAutoDetect")); + if (AutoDetectProxyCmd.empty()) return true;