aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGZNGET FOSS Team <opensource@gznianguan.com>2017-11-15 09:27:24 +0100
committerGZNGET FOSS Team <opensource@gznianguan.com>2017-11-15 09:27:24 +0100
commit595d57418897cd072968a280efb5c2ace4ecf67c (patch)
treed13ab7ae14273cf84c09c9b10c0373514b8f1992 /lib
parent3adc99a21465aeaa46e6e68602126cd8386ab4c8 (diff)
downloadperl-Arctica-Browser-Proxy-595d57418897cd072968a280efb5c2ace4ecf67c.tar.gz
perl-Arctica-Browser-Proxy-595d57418897cd072968a280efb5c2ace4ecf67c.tar.bz2
perl-Arctica-Browser-Proxy-595d57418897cd072968a280efb5c2ace4ecf67c.zip
Take proxy info from ENVHEADmaster
Diffstat (limited to 'lib')
-rw-r--r--lib/Arctica/Browser/Proxy.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Arctica/Browser/Proxy.pm b/lib/Arctica/Browser/Proxy.pm
index a2809b4..b59678d 100644
--- a/lib/Arctica/Browser/Proxy.pm
+++ b/lib/Arctica/Browser/Proxy.pm
@@ -77,8 +77,9 @@ sub new {
};
bless($self, $class_name);
- $self->_set_proxy(8888);
-
+ if ($ENV{'TEKI_PROXY_PORT'} =~ /^(\d{3,})$/) {
+ $self->_set_proxy($1);
+ }
return $self;
}
@@ -93,11 +94,11 @@ sub _set_proxy {
$auth_string = "$username:$password\@";
}
my $proxy_string = "http://$auth_string$hostname:$port";
+
$ENV{'HTTP_PROXY'} = $proxy_string;
$ENV{'http_proxy'} = $proxy_string;
$ENV{'HTTPS_PROXY'} = $proxy_string;
$ENV{'https_proxy'} = $proxy_string;
-
}
1;