2007年8月8日星期三

Ubuntu 7.04下,在apt-get中使用http proxy

在/etc/apt/apt.conf.d/25acquire中(如果没有,就新建一个,名字可以任意),加入

// Options for the downloading routines
Acquire
{
  Queue-Mode "host";       // host|access
  Retries "0";
  Source-Symlinks "true";

  // HTTP method configuration
  http
  {
    Proxy " http://210.45.66.24:8082";
    Proxy::debian.ustc.edu.cn "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
//    Dl-Limit "7";        // 7Kb/sec maximum download rate
  };


  // HTTPS method configuration:
  // - uses the http proxy config
  // - uses the http cache-control values
  // - uses the http Dl-Limit values
  https
  {
//        Verify-Peer "false";
//        SslCert "/etc/apt/some.pem";
//        CaPath  "/etc/ssl/certs";
        Verify-Host "2";
  };

  ftp
  {
    Proxy "http://XXX.XXXX.XXX.XXX.XX/"; // your proxy
    Proxy::debian.ustc.edu.cn "DIRECT"; // Specific per-host setting

    /* Required script to perform proxy login. This example should work
       for tisfwtk */
//    ProxyLogin
//    {
//       "USER $(PROXY_USER)";
//       "PASS $(PROXY_PASS)";
//       "USER $(SITE_USER)@$(SITE):$(SITE_PORT)";
//       "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
  };

//  cdrom
//  {
//    mount "/cdrom";

    // You need the trailing slash!
//    "/cdrom/"
//    {
//       Mount "sleep 1000";
//       UMount "sleep 500";
//    }
//  };

//  gpgv
//  {
//   Options {"--ignore-time-conflict";}  // not very usefull on a normal system
//  };

//  mirror
//  {
//   RefreshInterval "360"; // refresh interval in minutes
//   MaxAge "90";           // max age for a mirror file in days before
                          // it gets deleted
   // mirror failure reporting script
//   ProblemReporting "/usr/lib/apt/apt-report-mirror-failure";
   // mirror failure reporting url
//   ReportFailures " http://example.com/mirror-failure";
//  };

  // translations can be set here to "none", "environment" or "$locale"
  Translation "none";
};



--
一步一步教你从互联网赚钱 http://www.zqzn.com/index.asp?rid=key480769
投资理财 http://li-cai.blogspot.com/

1 条评论:

匿名 说...

I used to be recommended this website by way of my cousin.
I'm now not certain whether or not this submit is written through him as nobody else realize such detailed approximately my problem. You're amazing!
Thank you!

my page :: home cellulite treatment