This function has been reworked and moved into the
http-client-functions library.

Signed-off-by: Stefan Schantl <[email protected]>
---
 config/cfgroot/general-functions.pl | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/config/cfgroot/general-functions.pl 
b/config/cfgroot/general-functions.pl
index 8ba6e3f79..861f95dec 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -17,7 +17,6 @@ package General;
 use strict;
 use Socket;
 use IO::Socket;
-use Net::SSLeay;
 use Net::IPv4Addr qw(:all);
 
 $General::version = 'VERSION';
@@ -961,26 +960,6 @@ sub findhasharraykey {
     }
 }
 
-sub FetchPublicIp {
-    my %proxysettings;
-    &General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
-    if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
-        my ($peer, $peerport) = (/^(?:[a-zA-Z 
]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
-        
Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'}
 );
-    }
-    my $user_agent = &MakeUserAgent();
-    my ($out, $response) = Net::SSLeay::get_http(  
'checkip4.dns.lightningwirelabs.com',
-                                                   80,
-                                                   "/",
-                                                   
Net::SSLeay::make_headers('User-Agent' => $user_agent )
-                                               );
-    if ($response =~ m%HTTP/1\.. 200 OK%) {
-       $out =~ /Your IP address is: (\d+.\d+.\d+.\d+)/;
-       return $1;
-    }
-    return '';
-}
-
 #
 # Check if hostname.domain provided have IP provided
 # use gethostbyname to verify that
-- 
2.47.2


Reply via email to