Просмотр исходного кода

add Acquire::http::Proxy-Auto-Detect to the apt.conf.5 manpage (closes: 726597)

Michael Vogt лет назад: 12
Родитель
Сommit
c08cf1dc78
3 измененных файлов с 19 добавлено и 1 удалено
  1. 6 0
      doc/apt-verbatim.ent
  2. 8 0
      doc/apt.conf.5.xml
  3. 5 1
      methods/http.cc

+ 6 - 0
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>

+ 8 - 0
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>
 

+ 5 - 1
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;