diff options
author | Huang Shaoyan <huangshaoyan1982@gmail.com> | 2016-07-21 05:46:03 +0300 |
---|---|---|
committer | Benjamin Drung <benjamin.drung@profitbricks.com> | 2016-11-08 18:59:17 +0300 |
commit | 861e6acfb1c6a9eb93bb9677d0e6cbf4f583a1cb (patch) | |
tree | 6a76bc4e74a67b25ba4021c503fb853289917650 | |
parent | f901d7f56ea49dcbb50a38415e43ecade552e8dc (diff) |
Add support for https_proxy
fixes #60
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
-rwxr-xr-x | apt-mirror | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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") ); } } |