소스 검색

Allow override of Proxy-Auto-Detect by the users configuration

Only run the Proxy-Auto-Detect code if there is not already
a host specific configuration.

Closes: 759264
Michael Vogt 12 년 전
부모
커밋
d73fe42cf0
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      apt-pkg/contrib/proxy.cc

+ 4 - 0
apt-pkg/contrib/proxy.cc

@@ -26,6 +26,10 @@ bool AutoDetectProxy(URI &URL)
    // we support both http/https debug options
    bool Debug = _config->FindB("Debug::Acquire::"+URL.Access,false);
 
+   // the user already explicitly set a proxy for this host
+   if(_config->Find("Acquire::"+URL.Access+"::proxy::"+URL.Host, "") != "")
+      return true;
+
    // option is "Acquire::http::Proxy-Auto-Detect" but we allow the old
    // name without the dash ("-")
    std::string AutoDetectProxyCmd = _config->Find("Acquire::"+URL.Access+"::Proxy-Auto-Detect",