This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, fifteen has been updated via afe4656c72c71715bb264ef63849826e3bc0a399 (commit) via 290c9cf89b07f4d873bc098f2160ae6008b4bab0 (commit) from fa9ef0a616a8c5f536c9f6f5d9a10a088bea5488 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit afe4656c72c71715bb264ef63849826e3bc0a399 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Oct 15 11:50:48 2013 +0200
DDNS: Sort providers alphabetically.
commit 290c9cf89b07f4d873bc098f2160ae6008b4bab0 Author: Stefan Schantl stefan.schantl@ipfire.org Date: Mon Oct 14 19:07:18 2013 +0200
DDNS: Add support for udmedia.de.
This commit adds support for the dynamic dns service provider udmedia.de and was requested by a user on the forum.
Details can be found here: http://forum.ipfire.org/index.php?topic=9097.0
Fixes #10432.
-----------------------------------------------------------------------
Summary of changes: html/cgi-bin/ddns.cgi | 2 ++ src/scripts/setddns.pl | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-)
Difference in files: diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index 88847a0..ae4de6c 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -256,6 +256,7 @@ $checked{'SERVICE'}{'selfhost.de'} = ''; $checked{'SERVICE'}{'strato.com'} = ''; $checked{'SERVICE'}{'tzo.com'} = ''; $checked{'SERVICE'}{'zoneedit.com'} = ''; +$checked{'SERVICE'}{'udmedia.de'} = ''; $checked{'SERVICE'}{$settings{'SERVICE'}} = "selected='selected'";
$checked{'BEHINDROUTER'}{'RED_IP'} = ''; @@ -351,6 +352,7 @@ print <<END <option $checked{'SERVICE'}{'selfhost.de'}>selfhost.de</option> <option $checked{'SERVICE'}{'strato.com'}>strato.com</option> <!-- <option $checked{'SERVICE'}{'tzo.com'}>tzo.com</option> comment this service out until a working fix is developed --> + <option $checked{'SERVICE'}{'udmedia.de'}>udmedia.de</option> <option $checked{'SERVICE'}{'zoneedit.com'}>zoneedit.com</option> </select></td> <td width='20%' class='base'>$Lang::tr{'hostname'}: <img src='/blob.gif' alt='*' /></td> diff --git a/src/scripts/setddns.pl b/src/scripts/setddns.pl index f943ac8..12c0f1d 100644 --- a/src/scripts/setddns.pl +++ b/src/scripts/setddns.pl @@ -637,7 +637,42 @@ if ($ip ne $ipcache) { } else { &General::log("Dynamic DNS ip-update for $settings{'HOSTDOMAIN'} : failure (could not connect to server)"); } - } else { + } + elsif ($settings{'SERVICE'} eq 'udmedia.de') { + # use proxy ? + 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'} ); + } + + if ($settings{'HOSTNAME'} eq '') { + $settings{'HOSTDOMAIN'} = $settings{'DOMAIN'}; + } else { + $settings{'HOSTDOMAIN'} = "$settings{'HOSTNAME'}.$settings{'DOMAIN'}"; + } + + my ($out, $response) = Net::SSLeay::get_https( 'www.udmedia.de', + 443, + "/nic/update?myip=$ip&username=$settings{'HOSTDOMAIN'}&password=$settings{'PASSWORD'}", + Net::SSLeay::make_headers('User-Agent' => 'IPFire', + 'Authorization' => 'Basic ' . encode_base64("$settings{'LOGIN'}:$settings{'PASSWORD'}")) ); + + # Valid response are 'ok' 'nochange' + if ($response =~ m%HTTP/1.. 200 OK%) { + if ( $out !~ m/^(ok|nochg)/ ) { + $out =~ s/\n/ /g; + &General::log("Dynamic DNS ip-update for $settings{'HOSTDOMAIN'} : failure ($out)"); + } else { + &General::log("Dynamic DNS ip-update for $settings{'HOSTDOMAIN'} : success"); + $success++; + } + } else { + &General::log("Dynamic DNS ip-update for $settings{'HOSTDOMAIN'} : failure (could not connect to server, check your credentials---$out-$response--)"); + } + } + else { if ($settings{'WILDCARDS'} eq 'on') { $settings{'WILDCARDS'} = '-w'; } else {
hooks/post-receive -- IPFire 2.x development tree