From 956145444e1a3b7f5e660f71904711f4ea5bd262 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 22 Nov 2017 19:39:31 +0100 Subject: document http options in new apt-transport-http manpage We had documentation for the http transport in our "catch-all" apt.conf manpage, but it seems benefitial to document transports in their own manpage instead of pushing them all into one. --- doc/CMakeLists.txt | 1 + doc/apt-transport-http.1.xml | 138 +++++++++++++++++++++++++++++++++++++++++++ doc/apt-verbatim.ent | 11 ++++ doc/apt.conf.5.xml | 64 -------------------- doc/po4a.conf | 1 + doc/sources.list.5.xml | 16 +++-- 6 files changed, 158 insertions(+), 73 deletions(-) create mode 100644 doc/apt-transport-http.1.xml (limited to 'doc') diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 73d808c64..df88eb809 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -84,6 +84,7 @@ add_docbook(apt-man MANPAGE ALL apt_preferences.5.xml apt-secure.8.xml apt-sortpkgs.1.xml + apt-transport-http.1.xml sources.list.5.xml DEPENDS ${ENTITIES} TRANSLATED_ENTITIES ${TRANSLATED_ENTITIES} diff --git a/doc/apt-transport-http.1.xml b/doc/apt-transport-http.1.xml new file mode 100644 index 000000000..546e47761 --- /dev/null +++ b/doc/apt-transport-http.1.xml @@ -0,0 +1,138 @@ + + %aptent; + %aptverbatiment; + %aptvendor; +]> + + + + + &apt-author.team; + &apt-email; + &apt-product; + + 2017-11-22T00:00:00Z + + + + apt-transport-http + 1 + APT + + + + + apt-transport-http + APT transport for downloading via the Hypertext Transfer Protocol (HTTP) + + +Description +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. +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 referred to commonly as man in the middle (MITM). +Such an attacker can not modify the communication to compromise +the security of your system through as APTs data security model is independent of the +chosen transport method. This is explained in detail in &apt-secure;. An overview over +available transport methods is given in &sources-list;. + + +Options +Various options are available to modify its behaviour which can be set in +an &apt-conf; file ranging from proxy configuration to workaround for specific +server insufficiencies. + +Proxy Configuration +The environment variable http_proxy 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::host. Even more finegrained control +can be achieved via proxy autodetection detailed further below. +All these options use the URI format scheme://[[user][:pass]@]host[:port]/. +Supported URI schemes are socks5h (SOCKS5 with remote DNS resolution), http and https. +Authentification details can be supplied via &apt-authconf; instead of including it in the URI directly. +The various APT configuration options support the special value DIRECT meaning that +no proxy should be used. The environment variable no_proxy with the same propose is also supported. +Further more 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. + + +Automatic Proxy Configuration +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 an 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. +Note that auto-detection will not be used for a host if a host-specific proxy +configuration is already set via Acquire::http::Proxy::host. +See the &squid-deb-proxy-client; and &auto-apt-proxy; packages for example implementations. +This option takes precedence over the legacy option name Acquire::http::ProxyAutoDetect. + + +Connection Configuration +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. +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. +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 workaround 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. +Acquire::http::AllowRedirect controls whether APT will follow +redirects, which is enabled by default. +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::SendAccept is enabled by default and +sends a Accept: text/* header field to the server for +requests without file extensions to prevent the server from attempting content +negotiation. + + + +Examples + +Acquire::http { + Proxy::example.org "DIRECT"; + Proxy "socks5h://apt:pass@localhost: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"; +}; + + + + +See Also +&apt-conf; &apt-authconf; &sources-list; + + + + &manbugs; + + diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index 946c7cc7d..1af7b174d 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -81,6 +81,11 @@ " > + + apt-transport-http + 1 + " +> sources.list @@ -148,6 +153,12 @@ " > + + auto-apt-proxy + 1 + " +> + debsign 1 diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 6f47bb029..30714e66b 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -409,70 +409,6 @@ APT::Compressor::rev { be symlinked when possible instead of copying. True is the default. - - http::Proxy sets the default proxy to use for HTTP - URIs. It is in the standard form of http://[[user][:pass]@]host[:port]/. - Per host proxies can also be specified by using the form - http::Proxy::<host> with the special keyword DIRECT - meaning to use no proxies. If no one of the above settings is specified, - http_proxy environment variable - will be used. - - Three settings are provided for cache control with HTTP/1.1 compliant - proxy caches. - No-Cache tells the proxy not to use its cached - response under any circumstances. - Max-Age sets the allowed maximum age (in seconds) of - an index file in the cache of the proxy. - 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. - - The option timeout sets the timeout timer used by the method; - this value applies to the connection as well as the data timeout. - - 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 workaround 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. - - Acquire::http::AllowRedirect controls whether APT will follow - redirects, which is enabled by default. - - 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. - - 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 an external command to discover the http proxy to use. The first - and only parameter is an 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 style http://proxy:port/ - or the word DIRECT if no proxy should be used. No output - indicates that the generic proxy settings should be used. - - Note that auto-detection will not be used for a host if a host-specific proxy - configuration is already set via Acquire::http::Proxy::HOST. - - See the &squid-deb-proxy-client; package for an example implementation that - uses avahi. - - This option takes precedence over the legacy option name - ProxyAutoDetect. - - - - - The Cache-control, Timeout, diff --git a/doc/po4a.conf b/doc/po4a.conf index 955ebbc76..4b8d33f52 100644 --- a/doc/po4a.conf +++ b/doc/po4a.conf @@ -27,6 +27,7 @@ [type: manpage] apt-sortpkgs.1.xml $lang:$lang/apt-sortpkgs.$lang.1.xml add_$lang:xml.add [type: manpage] apt-ftparchive.1.xml $lang:$lang/apt-ftparchive.$lang.1.xml add_$lang:xml.add [type: manpage] apt_auth.conf.5.xml $lang:$lang/apt_auth.conf.$lang.5.xml add_$lang:xml.add +[type: manpage] apt-transport-http.1.xml $lang:$lang/apt-transport-http.$lang.1.xml add_$lang:xml.add [type: docbook] guide.dbk $lang:$lang/guide.$lang.dbk # add_$lang::$lang/addendum/docbook_$lang.add diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml index 694082bea..3f81dd515 100644 --- a/doc/sources.list.5.xml +++ b/doc/sources.list.5.xml @@ -352,17 +352,15 @@ deb-src [ option1=value1 option2=value2 ] uri suite [component1] [component2] [. The currently recognized URI types are: - http + http (&apt-transport-http;) The http scheme specifies an HTTP server for an archive and is the most - commonly used method, with many options in the - Acquire::http scope detailed in &apt-conf;. The URI can - directly include login information if the archive requires it, but the use - of &apt-authconf; should be preferred. The method also supports SOCKS5 and - HTTP(S) proxies either configured via apt-specific configuration or - specified by the environment variable http_proxy in the - format (assuming an HTTP proxy requiring authentication) - http://user:pass@server:port/. + commonly used method. The URI can directly include login information if the + archive requires it, but the use of &apt-authconf; should be preferred. + The method also supports SOCKS5 and HTTP(S) proxies either configured via + apt-specific configuration or specified by the environment variable + http_proxy in the format (assuming an HTTP proxy requiring + authentication) http://user:pass@server:port/. The authentication details for proxies can also be supplied via &apt-authconf;. Note that these forms of authentication are insecure as the whole -- cgit v1.2.3-70-g09d2