Add DDNS client for dns.lightningwirelabs.com.

This commit is contained in:
Michael Tremer
2013-06-12 14:36:51 +02:00
parent 7dddd54d47
commit 5a2935b1b3
4 changed files with 46 additions and 4 deletions

View File

@@ -857,13 +857,13 @@ sub FetchPublicIp {
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 ($out, $response) = Net::SSLeay::get_http( 'checkip.dyndns.org',
my ($out, $response) = Net::SSLeay::get_http( 'checkip.dns.lightningwirelabs.com',
80,
"/",
Net::SSLeay::make_headers('User-Agent' => 'IPFire' )
);
if ($response =~ m%HTTP/1\.. 200 OK%) {
$out =~ /Current IP Address: (\d+.\d+.\d+.\d+)/;
$out =~ /Your IP address is: (\d+.\d+.\d+.\d+)/;
return $1;
}
return '';