summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-19 18:29:59 +0200
committerMichael Vogt <mvo@debian.org>2013-10-22 07:32:57 +0200
commitc08cf1dc784a98a253296a51433f6de7d16d3125 (patch)
tree4bba0e531dd29444e18c669b50ecdf8ece89cba4
parentfa300ed15fc5a1d9e146c85d45f0a88b1d7f96bf (diff)
add Acquire::http::Proxy-Auto-Detect to the apt.conf.5 manpage (closes: 726597)
-rw-r--r--doc/apt-verbatim.ent6
-rw-r--r--doc/apt.conf.5.xml8
-rw-r--r--methods/http.cc6
3 files changed, 19 insertions, 1 deletions
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 @@
</citerefentry>"
>
+<!ENTITY squid-deb-proxy-client "<citerefentry>
+ <refentrytitle><command>squid-deb-proxy-client</command></refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>"
+>
+
<!ENTITY debsign "<citerefentry>
<refentrytitle><command>debsign</command></refentrytitle>
<manvolnum>1</manvolnum>
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";};
<para><literal>Acquire::http::User-Agent</literal> 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.</para>
+
+ <para><literal>Acquire::http::Proxy-Auto-Detect</literal> 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
+ <literal>http://proxy:port/</literal>. See the
+ &squid-deb-proxy-client; package for a example implementation that
+ uses avahi.</para>
+
</listitem>
</varlistentry>
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;