238 lines
7.8 KiB
HTML
238 lines
7.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of APT-TRANSPORT-HTTP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>APT-TRANSPORT-HTTP</H1>
|
|
Section: APT (1)<BR>Updated: 04 April 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
apt-transport-http - APT transport for downloading via the Hypertext Transfer Protocol (HTTP)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
This APT transport allows the use of repositories accessed via the Hypertext Transfer Protocol (HTTP). It is available by default and probably the most used of all transports. Note that a transport is never called directly by a user but used by APT tools based on user configuration.
|
|
<P>
|
|
|
|
HTTP is an unencrypted transport protocol meaning that the whole communication with the remote server (or proxy) can be observed by a sufficiently capable attacker commonly referred to as a "man in the middle" (MITM). However, such an attacker can
|
|
<I>not</I>
|
|
modify the communication to compromise the security of your system, as APT's data security model is independent of the chosen transport method. This is explained in detail in
|
|
<B><A HREF="/cgi-bin/man/man2html?8+apt-secure">apt-secure</A></B>(8). An overview of available transport methods is given in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+sources.list">sources.list</A></B>(5).
|
|
<A NAME="lbAD"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
Various options can be set in an
|
|
<B><A HREF="/cgi-bin/man/man2html?5+apt.conf">apt.conf</A></B>(5)
|
|
file to modify its behavior, ranging from proxy configuration to workarounds for specific server limitations.
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Proxy Configuration</H3>
|
|
|
|
<P>
|
|
|
|
The environment variable
|
|
<B>http_proxy</B>
|
|
is supported for system wide configuration. Proxies specific to APT can be configured via the option
|
|
Acquire::http::Proxy. Proxies which should be used only for certain hosts can be specified via
|
|
Acquire::http::Proxy::<I>host</I>. Even more fine-grained control can be achieved via proxy autodetection, detailed further below. All these options use the URI format
|
|
<I>scheme</I>://[[<I>user</I>][:<I>pass</I>]@]<I>host</I>[:<I>port</I>]/. Supported URI schemes are
|
|
socks5h
|
|
(SOCKS5 with remote DNS resolution),
|
|
http
|
|
and
|
|
https. Authentication details can be supplied via
|
|
<B><A HREF="/cgi-bin/man/man2html?5+apt_auth.conf">apt_auth.conf</A></B>(5)
|
|
instead of including it in the URI directly.
|
|
<P>
|
|
|
|
The various APT configuration options support the special value
|
|
DIRECT
|
|
meaning that no proxy should be used. The environment variable
|
|
<B>no_proxy</B>
|
|
is also supported for the same purpose.
|
|
<P>
|
|
|
|
Furthermore, there are three settings provided for cache control with HTTP/1.1 compliant proxy caches:
|
|
Acquire::http::No-Cache
|
|
tells the proxy not to use its cached response under any circumstances.
|
|
Acquire::http::Max-Age
|
|
sets the allowed maximum age (in seconds) of an index file in the cache of the proxy.
|
|
Acquire::http::No-Store
|
|
specifies that the proxy should not store the requested archive files in its cache, which can be used to prevent the proxy from polluting its cache with (big) .deb files.
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Automatic Proxy Configuration</H3>
|
|
|
|
<P>
|
|
|
|
Acquire::http::Proxy-Auto-Detect
|
|
can be used to specify an external command to discover the HTTP proxy to use. The first and only parameter is a URI denoting the host to be contacted, to allow for host-specific configuration. APT expects the command to output the proxy on stdout as a single line in the previously specified URI format or the word
|
|
DIRECT
|
|
if no proxy should be used. No output indicates that the generic proxy settings should be used.
|
|
<P>
|
|
|
|
Note that auto-detection will not be used for a host if a host-specific proxy configuration is already set via
|
|
Acquire::http::Proxy::<I>host</I>.
|
|
<P>
|
|
|
|
See the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+squid-deb-proxy-client">squid-deb-proxy-client</A></B>(1)
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?1+auto-apt-proxy">auto-apt-proxy</A></B>(1)
|
|
packages for example implementations.
|
|
<P>
|
|
|
|
This option takes precedence over the legacy option name
|
|
Acquire::http::ProxyAutoDetect.
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Connection Configuration</H3>
|
|
|
|
<P>
|
|
|
|
The option
|
|
Acquire::http::Timeout
|
|
sets the timeout timer used by the method; this value applies to the connection as well as the data timeout.
|
|
<P>
|
|
|
|
The used bandwidth can be limited with
|
|
Acquire::http::Dl-Limit
|
|
which accepts integer values in kilobytes per second. The default value is 0 which deactivates the limit and tries to use all available bandwidth. Note that this option implicitly disables downloading from multiple servers at the same time.
|
|
<P>
|
|
|
|
The setting
|
|
Acquire::http::Pipeline-Depth
|
|
can be used to enable HTTP pipelining (RFC 2616 section 8.1.2.2) which can be beneficial e.g. on high-latency connections. It specifies how many requests are sent in a pipeline. APT tries to detect and work around misbehaving webservers and proxies at runtime, but if you know that yours does not conform to the HTTP/1.1 specification, pipelining can be disabled by setting the value to 0. It is enabled by default with the value 10.
|
|
<P>
|
|
|
|
Acquire::http::AllowRedirect
|
|
controls whether APT will follow redirects, which is enabled by default.
|
|
<P>
|
|
|
|
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.
|
|
<P>
|
|
|
|
Acquire::http::SendAccept
|
|
is enabled by default and sends an
|
|
Accept: text/*
|
|
header field to the server for requests without file extensions to prevent the server from attempting content negotiation.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
Acquire::http {
|
|
Proxy::example.org "DIRECT";
|
|
Proxy "socks5h://apt:<A HREF="mailto:pass@127.0.0.1">pass@127.0.0.1</A>:9050";
|
|
Proxy-Auto-Detect "/usr/local/bin/apt-http-proxy-auto-detect";
|
|
No-Cache "true";
|
|
Max-Age "3600";
|
|
No-Store "true";
|
|
Timeout "10";
|
|
Dl-Limit "42";
|
|
Pipeline-Depth "0";
|
|
AllowRedirect "false";
|
|
User-Agent "My APT-HTTP";
|
|
SendAccept "false";
|
|
};
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+apt.conf">apt.conf</A></B>(5)
|
|
<B><A HREF="/cgi-bin/man/man2html?5+apt_auth.conf">apt_auth.conf</A></B>(5)
|
|
<B><A HREF="/cgi-bin/man/man2html?5+sources.list">sources.list</A></B>(5)
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
<P>
|
|
|
|
m[blue]<B>APT bug page</B>m[]<FONT SIZE="-2">[1]</FONT>. If you wish to report a bug in APT, please see
|
|
/usr/share/doc/debian/bug-reporting.txt
|
|
or the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+reportbug">reportbug</A></B>(1)
|
|
command.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
<B>APT team</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
</DL>
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="3"> 1.<DD>
|
|
APT bug page
|
|
<DL COMPACT><DT id="4"><DD>
|
|
<A HREF="http://bugs.debian.org/src:apt">http://bugs.debian.org/src:apt</A>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="6"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="7"><A HREF="#lbAD">OPTIONS</A><DD>
|
|
<DL>
|
|
<DT id="8"><A HREF="#lbAE">Proxy Configuration</A><DD>
|
|
<DT id="9"><A HREF="#lbAF">Automatic Proxy Configuration</A><DD>
|
|
<DT id="10"><A HREF="#lbAG">Connection Configuration</A><DD>
|
|
</DL>
|
|
<DT id="11"><A HREF="#lbAH">EXAMPLES</A><DD>
|
|
<DT id="12"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="13"><A HREF="#lbAJ">BUGS</A><DD>
|
|
<DT id="14"><A HREF="#lbAK">AUTHOR</A><DD>
|
|
<DT id="15"><A HREF="#lbAL">NOTES</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:07 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|