aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Jorge <zezinho@mageia.org>2013-06-04 19:47:23 +0000
committerJosé Jorge <zezinho@mageia.org>2013-06-04 19:47:23 +0000
commitf1d863eadd8790d73ac563ff067e58c8581e432a (patch)
tree7cd41a4247ea8af62dadb009d0ff8a740e417cee
parent7f94af338f88aeb1226f094d3dddb17486d9349f (diff)
downloadurpmi-proxy-f1d863eadd8790d73ac563ff067e58c8581e432a.tar
urpmi-proxy-f1d863eadd8790d73ac563ff067e58c8581e432a.tar.gz
urpmi-proxy-f1d863eadd8790d73ac563ff067e58c8581e432a.tar.bz2
urpmi-proxy-f1d863eadd8790d73ac563ff067e58c8581e432a.tar.xz
urpmi-proxy-f1d863eadd8790d73ac563ff067e58c8581e432a.zip
version 0.3.3 : add squid proxy support0.3.3
-rw-r--r--VERSION2
-rwxr-xr-xurpmi-proxy.cgi2
-rw-r--r--urpmi-proxy.conf3
3 files changed, 6 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index d15723f..1c09c74 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.3.2
+0.3.3
diff --git a/urpmi-proxy.cgi b/urpmi-proxy.cgi
index f439100..38c57ba 100755
--- a/urpmi-proxy.cgi
+++ b/urpmi-proxy.cgi
@@ -6,6 +6,7 @@ use strict;
use warnings;
my $debug = 0;
+my $proxy = 0;
my $config_file = '/etc/urpmi-proxy.conf';
# config defaults
@@ -293,6 +294,7 @@ foreach my $source (@sources) {
$curl->setopt(CURLOPT_TIMEVALUE, $modified_since);
}
$curl->setopt(CURLOPT_USERAGENT, $user_agent) if $user_agent;
+ $curl->setopt(CURLOPT_PROXY, $proxy) if $proxy;
$curl->setopt(CURLOPT_CONNECTTIMEOUT, $connect_timeout);
$curl->setopt(CURLOPT_FTP_RESPONSE_TIMEOUT, $ftp_response_timeout);
$curl->setopt(CURLOPT_LOW_SPEED_LIMIT, $max_stall_speed);
diff --git a/urpmi-proxy.conf b/urpmi-proxy.conf
index 780469d..1775653 100644
--- a/urpmi-proxy.conf
+++ b/urpmi-proxy.conf
@@ -20,6 +20,9 @@
# 'urpmi'
# ];
+## Define your proxy if needed in form 'hostname:port'
+# $proxy = '';
+
## Location of the logfile, it's a request log with cache status results.
# $logfile = '/var/log/urpmi-proxy.log';