* [git.ipfire.org] IPFire 2.x development tree branch, fifteen, updated. afe4656c72c71715bb264ef63849826e3bc0a399
@ 2013-10-15 9:51 git
0 siblings, 0 replies; only message in thread
From: git @ 2013-10-15 9:51 UTC (permalink / raw)
To: ipfire-scm
[-- Attachment #1: Type: text/plain, Size: 4834 bytes --]
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(a)ipfire.org>
Date: Tue Oct 15 11:50:48 2013 +0200
DDNS: Sort providers alphabetically.
commit 290c9cf89b07f4d873bc098f2160ae6008b4bab0
Author: Stefan Schantl <stefan.schantl(a)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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-15 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-15 9:51 [git.ipfire.org] IPFire 2.x development tree branch, fifteen, updated. afe4656c72c71715bb264ef63849826e3bc0a399 git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox