diff options
author | GZNGET FOSS Team <opensource@gznianguan.com> | 2017-11-15 09:27:24 +0100 |
---|---|---|
committer | GZNGET FOSS Team <opensource@gznianguan.com> | 2017-11-15 09:27:24 +0100 |
commit | 595d57418897cd072968a280efb5c2ace4ecf67c (patch) | |
tree | d13ab7ae14273cf84c09c9b10c0373514b8f1992 /lib/Arctica | |
parent | 3adc99a21465aeaa46e6e68602126cd8386ab4c8 (diff) | |
download | perl-Arctica-Browser-Proxy-master.tar.gz perl-Arctica-Browser-Proxy-master.tar.bz2 perl-Arctica-Browser-Proxy-master.zip |
Diffstat (limited to 'lib/Arctica')
-rw-r--r-- | lib/Arctica/Browser/Proxy.pm | 7 |
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; |