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, next has been updated via 56bf9f21747cc68a954048cb88f4ddfd79f7a0fa (commit) via bd8b033078e3a255285c56e4056083bf6108ebaf (commit) via 818f47d06f0b2126428e8702c5930b9b44c73cc1 (commit) via b0449403e6fc144b8ada72153e97091a8444a9f1 (commit) via 3308f8d09f5518c5f4654f5fe4b35d62eeee6642 (commit) via 6eb9c49d605918cbdb54cac58c08e909ff04efd1 (commit) via 9e4cb00b428f8ff8a1e9f85c8cbb2451d732846d (commit) via 52a2f02f41d362b84d294a0b3239d93cd2010a14 (commit) via 80002fe433b0a983fbee13c1f4ad6760596531f9 (commit) from 45aef0dd284b7dc7bdab4f26862446ece460b8f2 (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 56bf9f21747cc68a954048cb88f4ddfd79f7a0fa Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 11:27:14 2013 +0200
tor.cgi: Check for valid accounting limit.
commit bd8b033078e3a255285c56e4056083bf6108ebaf Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 11:22:52 2013 +0200
tor.cgi: Check for valid relay address.
commit 818f47d06f0b2126428e8702c5930b9b44c73cc1 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 11:20:53 2013 +0200
tor.cgi: Check for valid port numbers.
commit b0449403e6fc144b8ada72153e97091a8444a9f1 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 11:06:40 2013 +0200
tor.cgi: Catch invalid characters in relay name.
commit 3308f8d09f5518c5f4654f5fe4b35d62eeee6642 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 10:57:01 2013 +0200
tor.cgi: Burst bandwidth may never be less than rate.
commit 6eb9c49d605918cbdb54cac58c08e909ff04efd1 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 10:42:41 2013 +0200
tor: The slowest bandwidth rate for a relay is 20 kbyte/s.
commit 9e4cb00b428f8ff8a1e9f85c8cbb2451d732846d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 10:42:08 2013 +0200
tor: Fix path to readhash in initscript.
commit 52a2f02f41d362b84d294a0b3239d93cd2010a14 Merge: 45aef0d 80002fe Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Aug 2 10:41:27 2013 +0200
Merge branch 'ddns-all-inkl' into next
Conflicts: config/rootfiles/core/72/filelists/files
commit 80002fe433b0a983fbee13c1f4ad6760596531f9 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Aug 1 17:38:12 2013 +0200
DDNS: Support for all-inkl.com.
Requested by Daniel Kovacs daniel.kovacs@pleasuredome.org.
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/core/72/filelists/files | 2 ++ doc/language_issues.es | 5 ++++ doc/language_issues.fr | 5 ++++ doc/language_issues.nl | 5 ++++ doc/language_issues.pl | 5 ++++ doc/language_issues.ru | 5 ++++ doc/language_issues.tr | 5 ++++ doc/language_missings | 20 ++++++++++++++ html/cgi-bin/ddns.cgi | 2 ++ html/cgi-bin/tor.cgi | 45 ++++++++++++++++++++++++++------ langs/de/cgi-bin/de.pl | 5 ++++ langs/en/cgi-bin/en.pl | 5 ++++ src/initscripts/init.d/tor | 2 +- src/scripts/setddns.pl | 21 +++++++++++++++ 14 files changed, 123 insertions(+), 9 deletions(-)
Difference in files: diff --git a/config/rootfiles/core/72/filelists/files b/config/rootfiles/core/72/filelists/files index 3a1767c..f254631 100644 --- a/config/rootfiles/core/72/filelists/files +++ b/config/rootfiles/core/72/filelists/files @@ -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 diff --git a/doc/language_issues.es b/doc/language_issues.es index 8adc0f4..9d241ab 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -644,7 +644,12 @@ WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info WARNING: untranslated string: tor do not advertise relay WARNING: untranslated string: tor enabled +WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask +WARNING: untranslated string: tor errmsg invalid relay address +WARNING: untranslated string: tor errmsg invalid relay name +WARNING: untranslated string: tor errmsg invalid relay port +WARNING: untranslated string: tor errmsg invalid socks port WARNING: untranslated string: tor exit country any WARNING: untranslated string: tor exit nodes WARNING: untranslated string: tor relay address diff --git a/doc/language_issues.fr b/doc/language_issues.fr index b5361a7..dffd620 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -629,7 +629,12 @@ WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info WARNING: untranslated string: tor do not advertise relay WARNING: untranslated string: tor enabled +WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask +WARNING: untranslated string: tor errmsg invalid relay address +WARNING: untranslated string: tor errmsg invalid relay name +WARNING: untranslated string: tor errmsg invalid relay port +WARNING: untranslated string: tor errmsg invalid socks port WARNING: untranslated string: tor exit country any WARNING: untranslated string: tor exit nodes WARNING: untranslated string: tor relay address diff --git a/doc/language_issues.nl b/doc/language_issues.nl index febebf9..b57eaea 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -546,7 +546,12 @@ WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info WARNING: untranslated string: tor do not advertise relay WARNING: untranslated string: tor enabled +WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask +WARNING: untranslated string: tor errmsg invalid relay address +WARNING: untranslated string: tor errmsg invalid relay name +WARNING: untranslated string: tor errmsg invalid relay port +WARNING: untranslated string: tor errmsg invalid socks port WARNING: untranslated string: tor exit country any WARNING: untranslated string: tor exit nodes WARNING: untranslated string: tor relay address diff --git a/doc/language_issues.pl b/doc/language_issues.pl index 8adc0f4..9d241ab 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -644,7 +644,12 @@ WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info WARNING: untranslated string: tor do not advertise relay WARNING: untranslated string: tor enabled +WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask +WARNING: untranslated string: tor errmsg invalid relay address +WARNING: untranslated string: tor errmsg invalid relay name +WARNING: untranslated string: tor errmsg invalid relay port +WARNING: untranslated string: tor errmsg invalid socks port WARNING: untranslated string: tor exit country any WARNING: untranslated string: tor exit nodes WARNING: untranslated string: tor relay address diff --git a/doc/language_issues.ru b/doc/language_issues.ru index 47c2da4..0a46803 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -609,7 +609,12 @@ WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info WARNING: untranslated string: tor do not advertise relay WARNING: untranslated string: tor enabled +WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask +WARNING: untranslated string: tor errmsg invalid relay address +WARNING: untranslated string: tor errmsg invalid relay name +WARNING: untranslated string: tor errmsg invalid relay port +WARNING: untranslated string: tor errmsg invalid socks port WARNING: untranslated string: tor exit country any WARNING: untranslated string: tor exit nodes WARNING: untranslated string: tor relay address diff --git a/doc/language_issues.tr b/doc/language_issues.tr index 6679e73..a9d5659 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -542,7 +542,12 @@ WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info WARNING: untranslated string: tor do not advertise relay WARNING: untranslated string: tor enabled +WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask +WARNING: untranslated string: tor errmsg invalid relay address +WARNING: untranslated string: tor errmsg invalid relay name +WARNING: untranslated string: tor errmsg invalid relay port +WARNING: untranslated string: tor errmsg invalid socks port WARNING: untranslated string: tor exit country any WARNING: untranslated string: tor exit nodes WARNING: untranslated string: tor relay address diff --git a/doc/language_missings b/doc/language_missings index a9fa875..6aac6b8 100644 --- a/doc/language_missings +++ b/doc/language_missings @@ -138,7 +138,12 @@ < tor contact info < tor do not advertise relay < tor enabled +< tor errmsg invalid accounting limit < tor errmsg invalid ip or mask +< tor errmsg invalid relay address +< tor errmsg invalid relay name +< tor errmsg invalid relay port +< tor errmsg invalid socks port < tor exit country < tor exit country any < tor exit nodes @@ -369,7 +374,12 @@ < tor contact info < tor do not advertise relay < tor enabled +< tor errmsg invalid accounting limit < tor errmsg invalid ip or mask +< tor errmsg invalid relay address +< tor errmsg invalid relay name +< tor errmsg invalid relay port +< tor errmsg invalid socks port < tor exit country < tor exit country any < tor exit nodes @@ -552,7 +562,12 @@ < tor contact info < tor do not advertise relay < tor enabled +< tor errmsg invalid accounting limit < tor errmsg invalid ip or mask +< tor errmsg invalid relay address +< tor errmsg invalid relay name +< tor errmsg invalid relay port +< tor errmsg invalid socks port < tor exit country < tor exit country any < tor exit nodes @@ -740,7 +755,12 @@ < tor contact info < tor do not advertise relay < tor enabled +< tor errmsg invalid accounting limit < tor errmsg invalid ip or mask +< tor errmsg invalid relay address +< tor errmsg invalid relay name +< tor errmsg invalid relay port +< tor errmsg invalid socks port < tor exit country < tor exit country any < tor exit nodes diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index d840d39..88847a0 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -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> diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi index 0c173e0..28d8bf7 100644 --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -51,8 +51,7 @@ my @bandwidth_limits = ( 1024, # 1M 512, 256, - 128, - 64 + 160 ); my @accounting_periods = ('daily', 'weekly', 'monthly');
@@ -74,7 +73,10 @@ if (&Header::blue_used()) {
$settings{'TOR_RELAY_ENABLED'} = 'off'; $settings{'TOR_RELAY_MODE'} = 'exit'; +$settings{'TOR_RELAY_ADDRESS'} = ''; $settings{'TOR_RELAY_PORT'} = 9001; +$settings{'TOR_RELAY_NICKNAME'} = ''; +$settings{'TOR_RELAY_CONTACT_INFO'} = ''; $settings{'TOR_RELAY_NOADVERTISE'} = 'off'; $settings{'TOR_RELAY_BANDWIDTH_RATE'} = 0; $settings{'TOR_RELAY_BANDWIDTH_BURST'} = 0; @@ -96,6 +98,28 @@ our $torctrl = &TorConnect();
# Toggle enable/disable field. if ($settings{'ACTION'} eq $Lang::tr{'save'}) { + if ($settings{'TOR_RELAY_NICKNAME'} !~ /^[a-zA-Z0-9]+$/) { + $errormessage = "$Lang::tr{'tor errmsg invalid relay name'}: $settings{'TOR_RELAY_NICKNAME'}"; + } + + if (!&General::validport($settings{'TOR_SOCKS_PORT'})) { + $errormessage = "$Lang::tr{'tor errmsg invalid socks port'}: $settings{'TOR_SOCKS_PORT'}"; + } + + if (!&General::validport($settings{'TOR_RELAY_PORT'})) { + $errormessage = "$Lang::tr{'tor errmsg invalid relay port'}: $settings{'TOR_RELAY_PORT'}"; + } + + if ($settings{'TOR_RELAY_ADDRESS'} ne '') { + if ((!&General::validfqdn($settings{'TOR_RELAY_ADDRESS'})) && (!&General::validip($settings{'TOR_RELAY_ADDRESS'}))) { + $errormessage = "$Lang::tr{'tor errmsg invalid relay address'}: $settings{'TOR_RELAY_ADDRESS'}"; + } + } + + if ($settings{'TOR_RELAY_ACCOUNTING_LIMIT'} !~ /^\d+$/) { + $errormessage = "$Lang::tr{'tor errmsg invalid accounting limit'}: $settings{'TOR_RELAY_ACCOUNTING_LIMIT'}"; + } + my @temp = split(/[\n,]/,$settings{'TOR_ALLOWED_SUBNETS'}); $settings{'TOR_ALLOWED_SUBNETS'} = ""; foreach (@temp) { @@ -117,6 +141,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) { } }
+ # Burst bandwidth must be less or equal to bandwidth rate. + if ($settings{'TOR_RELAY_BANDWIDTH_RATE'} == 0) { + $settings{'TOR_RELAY_BANDWIDTH_BURST'} = 0; + + } elsif ($settings{'TOR_RELAY_BANDWIDTH_BURST'} < $settings{'TOR_RELAY_BANDWIDTH_RATE'}) { + $settings{'TOR_RELAY_BANDWIDTH_BURST'} = $settings{'TOR_RELAY_BANDWIDTH_RATE'}; + } + if ($errormessage eq '') { # Write configuration settings to file. &General::writehash("${General::swroot}/tor/settings", %settings); @@ -124,14 +156,11 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) { # Update configuration files. &BuildConfiguration(); } - - # Reset ACTION. - $settings{'ACTION'} = ''; +} else { + # Load settings from file. + &General::readhash("${General::swroot}/tor/settings", %settings); }
-# Load settings from file. -&General::readhash("${General::swroot}/tor/settings", %settings); - &showMainBox();
# Close Tor control connection. diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index a21f75a..021682f 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1819,7 +1819,12 @@ 'tor contact info' => 'Kontaktinformationen', 'tor do not advertise relay' => 'Relay nicht announcieren', 'tor enabled' => 'Tor einschalten', +'tor errmsg invalid accounting limit' => 'Ungültiges Accounting-Limit', 'tor errmsg invalid ip or mask' => 'Ungültiges IP-Subnetz', +'tor errmsg invalid relay address' => 'Ungültige Relay-Adresse', +'tor errmsg invalid relay name' => 'Ungültiger Relay-Nickname.', +'tor errmsg invalid relay port' => 'Ungültiger Relay-Port', +'tor errmsg invalid socks port' => 'Ungültiger SOCKS-Port', 'tor exit country' => 'Exit-Land', 'tor exit country any' => 'Beliebig', 'tor exit nodes' => 'Exit-Nodes', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index b16ecbf..2e04c46 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1854,8 +1854,13 @@ 'tor contact info' => 'Contact Info', 'tor do not advertise relay' => 'Do not advertise the relay', 'tor enabled' => 'Enable Tor', +'tor errmsg invalid accounting limit' => 'Invalid accounting limit', 'tor errmsg invalid ip or mask' => 'Invalid IP subnet', 'tor errmsg invalid node id' => 'Invalid node ID', +'tor errmsg invalid relay address' => 'Invalid relay address', +'tor errmsg invalid relay name' => 'Invalid relay nickname', +'tor errmsg invalid relay port' => 'Invalid relay port', +'tor errmsg invalid socks port' => 'Invalid SOCKS port', 'tor exit country' => 'Exit country', 'tor exit country any' => 'Any country', 'tor exit nodes' => 'Exit Nodes', diff --git a/src/initscripts/init.d/tor b/src/initscripts/init.d/tor index d376178..e27241f 100644 --- a/src/initscripts/init.d/tor +++ b/src/initscripts/init.d/tor @@ -10,7 +10,7 @@ . ${rc_functions}
function setup_firewall() { - eval $(readhash /var/ipfire/tor/settings) + eval $(/usr/local/bin/readhash /var/ipfire/tor/settings)
# Flush all rules. flush_firewall diff --git a/src/scripts/setddns.pl b/src/scripts/setddns.pl index 6c4c369..0833b49 100644 --- a/src/scripts/setddns.pl +++ b/src/scripts/setddns.pl @@ -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;
hooks/post-receive -- IPFire 2.x development tree