From 595d57418897cd072968a280efb5c2ace4ecf67c Mon Sep 17 00:00:00 2001 From: GZNGET FOSS Team Date: Wed, 15 Nov 2017 09:27:24 +0100 Subject: Take proxy info from ENV --- lib/Arctica/Browser/Proxy.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/Arctica/Browser') 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; -- cgit v1.2.3