You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

139 lines
6.8 KiB

  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
  5. <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
  6. <!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
  7. ]>
  8. <refentry>
  9. <refentryinfo>
  10. &apt-author.team;
  11. &apt-email;
  12. &apt-product;
  13. <!-- The last update date -->
  14. <date>2019-04-04T00:00:00Z</date>
  15. </refentryinfo>
  16. <refmeta>
  17. <refentrytitle>apt-transport-http</refentrytitle>
  18. <manvolnum>1</manvolnum>
  19. <refmiscinfo class="manual">APT</refmiscinfo>
  20. </refmeta>
  21. <!-- Man page title -->
  22. <refnamediv>
  23. <refname>apt-transport-http</refname>
  24. <refpurpose>APT transport for downloading via the Hypertext Transfer Protocol (HTTP)</refpurpose>
  25. </refnamediv>
  26. <refsect1><title>Description</title>
  27. <para>This APT transport allows the use of repositories accessed via the
  28. Hypertext Transfer Protocol (HTTP). It is available by default and probably the
  29. most used of all transports. Note that a transport is never called directly by
  30. a user but used by APT tools based on user configuration.</para>
  31. <para>HTTP is an unencrypted transport protocol meaning that the
  32. whole communication with the remote server (or proxy) can be observed by a
  33. sufficiently capable attacker commonly referred to as a "man in the middle" (MITM).
  34. However, such an attacker can <emphasis>not</emphasis> modify the communication to compromise
  35. the security of your system, as APT's data security model is independent of the
  36. chosen transport method. This is explained in detail in &apt-secure;. An overview of
  37. available transport methods is given in &sources-list;.</para>
  38. </refsect1>
  39. <refsect1><title>Options</title>
  40. <para>Various options can be set in an &apt-conf; file to modify its behavior,
  41. ranging from proxy configuration to workarounds for specific
  42. server limitations.</para>
  43. <refsect2><title>Proxy Configuration</title>
  44. <para>The environment variable <envar>http_proxy</envar> is supported for system wide configuration.
  45. Proxies specific to APT can be configured via the option <literal>Acquire::http::Proxy</literal>.
  46. Proxies which should be used only for certain hosts can be specified via
  47. <literal>Acquire::http::Proxy::<replaceable>host</replaceable></literal>. Even more fine-grained control
  48. can be achieved via proxy autodetection, detailed further below.
  49. All these options use the URI format <literal><replaceable>scheme</replaceable>://[[<replaceable>user</replaceable>][:<replaceable>pass</replaceable>]@]<replaceable>host</replaceable>[:<replaceable>port</replaceable>]/</literal>.
  50. Supported URI schemes are <literal>socks5h</literal> (SOCKS5 with remote DNS resolution), <literal>http</literal> and <literal>https</literal>.
  51. Authentication details can be supplied via &apt-authconf; instead of including it in the URI directly.</para>
  52. <para>The various APT configuration options support the special value <literal>DIRECT</literal> meaning that
  53. no proxy should be used. The environment variable <envar>no_proxy</envar> is also supported for the same purpose.</para>
  54. <para>Furthermore, there are three settings provided for cache control with HTTP/1.1 compliant proxy caches:
  55. <literal>Acquire::http::No-Cache</literal> tells the proxy not to use its
  56. cached response under any circumstances.
  57. <literal>Acquire::http::Max-Age</literal> sets the allowed maximum age (in
  58. seconds) of an index file in the cache of the proxy.
  59. <literal>Acquire::http::No-Store</literal> specifies that the proxy should not
  60. store the requested archive files in its cache, which can be used to prevent
  61. the proxy from polluting its cache with (big) .deb files.</para>
  62. </refsect2>
  63. <refsect2><title>Automatic Proxy Configuration</title>
  64. <para><literal>Acquire::http::Proxy-Auto-Detect</literal> can be used to
  65. specify an external command to discover the HTTP proxy to use. The first
  66. and only parameter is a URI denoting the host to be contacted, to allow
  67. for host-specific configuration. APT expects the command to output the
  68. proxy on stdout as a single line in the previously specified URI format
  69. or the word <literal>DIRECT</literal> if no proxy should be used. No output
  70. indicates that the generic proxy settings should be used.</para>
  71. <para>Note that auto-detection will not be used for a host if a host-specific proxy
  72. configuration is already set via <literal>Acquire::http::Proxy::<replaceable>host</replaceable></literal>.</para>
  73. <para>See the &squid-deb-proxy-client; and &auto-apt-proxy; packages for example implementations.</para>
  74. <para>This option takes precedence over the legacy option name <literal>Acquire::http::ProxyAutoDetect</literal>.</para>
  75. </refsect2>
  76. <refsect2><title>Connection Configuration</title>
  77. <para>The option <literal>Acquire::http::Timeout</literal> sets the timeout timer used by the method;
  78. this value applies to the connection as well as the data timeout.</para>
  79. <para>The used bandwidth can be limited with
  80. <literal>Acquire::http::Dl-Limit</literal> which accepts integer values in
  81. kilobytes per second. The default value is 0 which deactivates the limit and
  82. tries to use all available bandwidth. Note that this option implicitly
  83. disables downloading from multiple servers at the same time.</para>
  84. <para>The setting <literal>Acquire::http::Pipeline-Depth</literal> can be used to
  85. enable HTTP pipelining (RFC 2616 section 8.1.2.2) which can be beneficial e.g. on
  86. high-latency connections. It specifies how many requests are sent in a pipeline.
  87. APT tries to detect and work around misbehaving webservers and proxies at runtime, but
  88. if you know that yours does not conform to the HTTP/1.1 specification, pipelining can
  89. be disabled by setting the value to 0. It is enabled by default with the value 10.</para>
  90. <para><literal>Acquire::http::AllowRedirect</literal> controls whether APT will follow
  91. redirects, which is enabled by default.</para>
  92. <para><literal>Acquire::http::User-Agent</literal> can be used to set a different
  93. User-Agent for the http download method as some proxies allow access for clients
  94. only if the client uses a known identifier.</para>
  95. <para><literal>Acquire::http::SendAccept</literal> is enabled by default and
  96. sends an <literal>Accept: text/*</literal> header field to the server for
  97. requests without file extensions to prevent the server from attempting content
  98. negotiation.</para>
  99. </refsect2>
  100. </refsect1>
  101. <refsect1><title>Examples</title>
  102. <literallayout>
  103. Acquire::http {
  104. Proxy::example.org "DIRECT";
  105. Proxy "socks5h://apt:pass@127.0.0.1:9050";
  106. Proxy-Auto-Detect "/usr/local/bin/apt-http-proxy-auto-detect";
  107. No-Cache "true";
  108. Max-Age "3600";
  109. No-Store "true";
  110. Timeout "10";
  111. Dl-Limit "42";
  112. Pipeline-Depth "0";
  113. AllowRedirect "false";
  114. User-Agent "My APT-HTTP";
  115. SendAccept "false";
  116. };
  117. </literallayout>
  118. </refsect1>
  119. <refsect1>
  120. <title>See Also</title>
  121. <para>&apt-conf; &apt-authconf; &sources-list;
  122. </para>
  123. </refsect1>
  124. &manbugs;
  125. </refentry>