Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apt-mirror/apt-mirror.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Shaoyan <huangshaoyan1982@gmail.com>2016-07-21 05:46:03 +0300
committerBenjamin Drung <benjamin.drung@profitbricks.com>2016-11-08 18:59:17 +0300
commit861e6acfb1c6a9eb93bb9677d0e6cbf4f583a1cb (patch)
tree6a76bc4e74a67b25ba4021c503fb853289917650
parentf901d7f56ea49dcbb50a38415e43ecade552e8dc (diff)
Add support for https_proxy
fixes #60 Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
-rwxr-xr-xapt-mirror5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-mirror b/apt-mirror
index 42a92d2..ec7e3fc 100755
--- a/apt-mirror
+++ b/apt-mirror
@@ -116,6 +116,7 @@ my %config_variables = (
"postmirror_script" => '$var_path/postmirror.sh',
"use_proxy" => 'off',
"http_proxy" => '',
+ "https_proxy" => '',
"proxy_user" => '',
"proxy_password" => ''
);
@@ -234,7 +235,9 @@ sub download_urls
if ( get_variable("unlink") == 1 ) { push( @args, "--unlink" ); }
if ( length( get_variable("use_proxy") ) && ( get_variable("use_proxy") eq 'yes' || get_variable("use_proxy") eq 'on' ) )
{
- if ( length( get_variable("http_proxy") ) ) { push( @args, "-e use_proxy=yes" ); push( @args, "-e http_proxy=" . get_variable("http_proxy") ); }
+ if ( length( get_variable("http_proxy") ) || length( get_variable("https_proxy") ) ) { push( @args, "-e use_proxy=yes" ); }
+ if ( length( get_variable("http_proxy") ) ) { push( @args, "-e http_proxy=" . get_variable("http_proxy") ); }
+ if ( length( get_variable("https_proxy") ) ) { push( @args, "-e https_proxy=" . get_variable("https_proxy") ); }
if ( length( get_variable("proxy_user") ) ) { push( @args, "-e proxy_user=" . get_variable("proxy_user") ); }
if ( length( get_variable("proxy_password") ) ) { push( @args, "-e proxy_password=" . get_variable("proxy_password") ); }
}