[mdk-re] apt-get over proxy

Alexander Bokovoy ab на avilink.net
Ср Май 16 20:56:18 MSD 2001


On Wed, May 16, 2001 at 08:47:11PM +0300, Ivan A. Melechko wrote:
> Приветствую Вас !
> Возникла следующая проблема:
> После установки непрозрачного прокси (Squid) apt-get перестал работать.
> В apt.conf прописал :
> Acquire
> {
>   http
>   {
>     Proxy "http://x.x.x.x:3128/";
>   };
>   ftp
>   {
>     Proxy "http://x.x.x.x:3128/";
>     Passive "true";
>   }
> }
> 
> В документации ничего внятного не нашел.
> ftp пассивное. http и https работают. Лишние порты закрыты.
> Без прокси работал нормально.
В документации (/usr/share/doc/apt-0.3.19cnc38/examples/configure-index)
Приведены следующие опции, которые можно давать http/ftp методам:

// Options for the downloading routines
Acquire
{
  Queue-Mode "host";       // host|access
  Retries "0";
  Source-Symlinks "true";
  
  // HTTP method configuration
  http 
  {
    Proxy "http://127.0.0.1:3128";
    Proxy::http.us.debian.org "DIRECT";  // Specific per-host setting
    Timeout "120";
    Pipeline-Depth "5";
    
    // Cache Control. Note these do not work with Squid 2.0.2
    No-Cache "false";
    Max-Age "86400";     // 1 Day age on index files
    No-Store "false";    // Prevent the cache from storing archives    
  };

  ftp
  {
    Proxy "ftp://127.0.0.1/";
    Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting

    /* Required script to perform proxy login. This example demonstrates
       possible options */
    ProxyLogin
    {
       "USER $(PROXY_USER)";
       "PASS $(PROXY_PASS)";
       "USER $(SITE_USER)@$(SITE):$(SITE_PORT)";
       "PASS $(SITE_PASS)";
    };

    /* A script that works with tisfw below.  Please note that you 
       must also set 'Proxy::Passive "false"' and a Proxy line like:
       Proxy "ftp://anomymous:ftp.us.debian.org@tisproxy.yourcompany.com/"; */
    ProxyLogin
    {
       "USER $(SITE_USER)@$(SITE)";
       "PASS $(SITE_PASS)";
    };
    
    Timeout "120";
    
    /* Passive mode control, proxy, non-proxy and per-host. Pasv mode
       is prefered if possible */
    Passive "true";
    Proxy::Passive "true";
    Passive::http.us.debian.org "true"; // Specific per-host setting
  };
};
-- 
Sincerely yours, Alexander Bokovoy 
  The Midgard Project    | ALT  Linux  Team | Minsk Linux Users Group
 www.midgard-project.org | www.altlinux.ru  |    www.minsk-lug.net 
-- You won't skid if you stay in a rut.
		-- Frank Hubbard




Подробная информация о списке рассылки community