mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 02:55:55 +02:00
Merge branch 'ddns-all-inkl' into next
Conflicts: config/rootfiles/core/72/filelists/files
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
etc/system-release
|
||||
etc/issue
|
||||
etc/rc.d/init.d/firewall
|
||||
srv/web/ipfire/cgi-bin/ddns.cgi
|
||||
srv/web/ipfire/cgi-bin/vpnmain.cgi
|
||||
usr/local/bin/openvpnctrl
|
||||
usr/local/bin/setddns.pl
|
||||
|
||||
@@ -232,6 +232,7 @@ if ($settings{'ACTION'} eq '')
|
||||
&Header::openbigbox('100%', 'left', '', $errormessage);
|
||||
|
||||
my %checked =(); # Checkbox manipulations
|
||||
$checked{'SERVICE'}{'all-inkl.com'} = '';
|
||||
$checked{'SERVICE'}{'cjb.net'} = '';
|
||||
$checked{'SERVICE'}{'dhs.org'} = '';
|
||||
$checked{'SERVICE'}{'dnspark.com'} = '';
|
||||
@@ -327,6 +328,7 @@ print <<END
|
||||
<tr>
|
||||
<td width='25%' class='base'>$Lang::tr{'service'}:</td>
|
||||
<td width='25%'><select size='1' name='SERVICE'>
|
||||
<option $checked{'SERVICE'}{'all-inkl.com'}>all-inkl.com</option>
|
||||
<option $checked{'SERVICE'}{'cjb.net'}>cjb.net</option>
|
||||
<option $checked{'SERVICE'}{'dhs.org'}>dhs.org</option>
|
||||
<option $checked{'SERVICE'}{'dnspark.com'}>dnspark.com</option>
|
||||
|
||||
@@ -150,6 +150,27 @@ if ($ip ne $ipcache) {
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($settings{'SERVICE'} eq 'all-inkl') {
|
||||
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 ($out, $response) = Net::SSLeay::get_http("dyndns.kasserver.com", 80, "/", 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%) {
|
||||
&General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : success");
|
||||
$success++;
|
||||
} else {
|
||||
&General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : failure (could not connect to server, check your credentials)");
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($settings{'SERVICE'} eq 'cjb') {
|
||||
# use proxy ?
|
||||
my %proxysettings;
|
||||
|
||||
Reference in New Issue
Block a user