Merge remote-tracking branch 'ms/tor' into tor
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 31 Jul 2013 17:40:17 +0000 (19:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 31 Jul 2013 17:40:17 +0000 (19:40 +0200)
13 files changed:
config/menu/EX-tor.menu [new file with mode: 0644]
config/rootfiles/common/configroot
config/rootfiles/packages/tor
doc/language_issues.es
doc/language_issues.fr
doc/language_issues.nl
doc/language_issues.pl
doc/language_issues.ru
doc/language_issues.tr
doc/language_missings
html/cgi-bin/tor.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

diff --git a/config/menu/EX-tor.menu b/config/menu/EX-tor.menu
new file mode 100644 (file)
index 0000000..00ddffe
--- /dev/null
@@ -0,0 +1,6 @@
+$subipfire->{'50.tor'} = {
+       'caption' => $Lang::tr{'tor'},
+       'uri' => '/cgi-bin/tor.cgi',
+       'title' => $Lang::tr{'tor'},
+       'enabled' => 1,
+};
index cd33ec4..8965ff7 100644 (file)
@@ -91,6 +91,7 @@ var/ipfire/menu.d/70-log.menu
 #var/ipfire/menu.d/EX-imspector.menu
 #var/ipfire/menu.d/EX-mpfire.menu
 #var/ipfire/menu.d/EX-samba.menu
+#var/ipfire/menu.d/EX-tor.menu
 #var/ipfire/menu.d/EX-tripwire.menu
 #var/ipfire/menu.d/EX-wlanap.menu
 var/ipfire/modem
index e670be2..8eb6dad 100644 (file)
@@ -4,10 +4,11 @@ etc/rc.d/init.d/tor
 #etc/tor
 etc/tor/tor-tsocks.conf
 etc/tor/torrc
+srv/web/ipfire/cgi-bin/tor.cgi
 usr/bin/tor
 usr/bin/tor-gencert
 usr/bin/tor-resolve
-usr/bin/torify
+#usr/bin/torify
 usr/local/bin/torctrl
 #usr/share/doc/tor
 #usr/share/doc/tor/tor-gencert.html
@@ -22,7 +23,7 @@ usr/share/tor
 usr/share/tor/defaults-torrc
 usr/share/tor/geoip
 var/ipfire/backup/addons/includes/tor
-srv/web/ipfire/cgi-bin/tor.cgi
+var/ipfire/menu.d/EX-tor.menu
 var/ipfire/tor
 var/ipfire/tor/settings
 var/ipfire/tor/torrc
index 7756f26..8adc0f4 100644 (file)
@@ -625,6 +625,7 @@ WARNING: untranslated string: routing table
 WARNING: untranslated string: server restart
 WARNING: untranslated string: static routes
 WARNING: untranslated string: system information
+WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
 WARNING: untranslated string: tor accounting bytes left
index 21fa1ad..b5361a7 100644 (file)
@@ -610,6 +610,7 @@ WARNING: untranslated string: server restart
 WARNING: untranslated string: snort working
 WARNING: untranslated string: static routes
 WARNING: untranslated string: system information
+WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
 WARNING: untranslated string: tor accounting bytes left
index 3a8f682..febebf9 100644 (file)
@@ -527,6 +527,7 @@ WARNING: untranslated string: route config changed
 WARNING: untranslated string: routing config added
 WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
+WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
 WARNING: untranslated string: tor accounting bytes left
index 7756f26..8adc0f4 100644 (file)
@@ -625,6 +625,7 @@ WARNING: untranslated string: routing table
 WARNING: untranslated string: server restart
 WARNING: untranslated string: static routes
 WARNING: untranslated string: system information
+WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
 WARNING: untranslated string: tor accounting bytes left
index 324c477..47c2da4 100644 (file)
@@ -590,6 +590,7 @@ WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
 WARNING: untranslated string: server restart
 WARNING: untranslated string: static routes
+WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
 WARNING: untranslated string: tor accounting bytes left
index 31a18c9..6679e73 100644 (file)
@@ -523,6 +523,7 @@ WARNING: untranslated string: route config changed
 WARNING: untranslated string: routing config added
 WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
+WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
 WARNING: untranslated string: tor accounting bytes left
index e47da81..a9fa875 100644 (file)
 < snort working
 < static routes
 < system information
+< tor
 < tor accounting
 < tor accounting bytes
 < tor accounting bytes left
 < Set time on boot
 < static routes
 < system information
+< tor
 < tor accounting
 < tor accounting bytes
 < tor accounting bytes left
 < qos enter bandwidths
 < server restart
 < static routes
+< tor
 < tor accounting
 < tor accounting bytes
 < tor accounting bytes left
 < qos enter bandwidths
 < server restart
 < static routes
+< tor
 < tor accounting
 < tor accounting bytes
 < tor accounting bytes left
index 6b4d9cc..0c173e0 100644 (file)
@@ -88,9 +88,6 @@ my $warnmessage = '';
 
 &Header::showhttpheaders();
 
-# Load settings from file.
-&General::readhash("${General::swroot}/tor/settings", \%settings);
-
 # Get GUI values.
 &Header::getcgihash(\%settings);
 
@@ -132,6 +129,9 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
        $settings{'ACTION'} = '';
 }
 
+# Load settings from file.
+&General::readhash("${General::swroot}/tor/settings", \%settings);
+
 &showMainBox();
 
 # Close Tor control connection.
@@ -171,21 +171,19 @@ sub showMainBox() {
                        </tr>
                        <tr>
                                <td width='25%' class='base'>$Lang::tr{'tor enabled'}:</td>
-                               <td width='20%'><input type='checkbox' name='TOR_ENABLED' $checked{'TOR_ENABLED'}{'on'} /></td>
-                               <td width='25%' class='base'></td>
-                               <td width='30%'></td>
+                               <td width='30%'><input type='checkbox' name='TOR_ENABLED' $checked{'TOR_ENABLED'}{'on'} /></td>
+                               <td width='25%' class='base'>$Lang::tr{'tor socks port'}:</td>
+                               <td width='20%'><input type='text' name='TOR_SOCKS_PORT' value='$settings{'TOR_SOCKS_PORT'}' size='5' /></td>
                        </tr>
                        <tr>
                                <td width='25%' class='base'>$Lang::tr{'tor relay enabled'}:</td>
-                               <td width='20%'><input type='checkbox' name='TOR_RELAY_ENABLED' $checked{'TOR_RELAY_ENABLED'}{'on'} /></td>
+                               <td width='30%'><input type='checkbox' name='TOR_RELAY_ENABLED' $checked{'TOR_RELAY_ENABLED'}{'on'} /></td>
                                <td width='25%' class='base'></td>
-                               <td width='30%'></td>
+                               <td width='20%'></td>
                        </tr>
                </table>
 END
 
-       &Header::closebox();
-
        if ($settings{'TOR_ENABLED'} eq 'on') {
                my @temp = split(",", $settings{'TOR_ALLOWED_SUBNETS'});
                $settings{'TOR_ALLOWED_SUBNETS'} = join("\n", @temp);
@@ -193,18 +191,10 @@ END
                @temp = split(",", $settings{'TOR_USE_EXIT_NODES'});
                $settings{'TOR_USE_EXIT_NODES'} = join("\n", @temp);
 
-               &Header::openbox('100%', 'left', $Lang::tr{'tor configuration'});
-
                print <<END;
-                       <table width='100%'>
-                               <tr>
-                                       <td width='25%' class='base'>$Lang::tr{'tor socks port'}:</td>
-                                       <td width='30%'><input type='text' name='TOR_SOCKS_PORT' value='$settings{'TOR_SOCKS_PORT'}' size='5' /></td>
-                                       <td width='50%' class='base' colspan='2'></td>
-                               </tr>
-                       </table>
-
+                       <br>
                        <hr size='1'>
+                       <br>
 
                        <table width='100%'>
                                <tr>
@@ -224,7 +214,9 @@ END
                                </tr>
                        </table>
 
+                       <br>
                        <hr size='1'>
+                       <br>
 
                        <table width='100%'>
                                <tr>
@@ -250,16 +242,17 @@ END
                print <<END;
                                                </select>
                                        </td>
-                                       <td colspan='2'>
+                                       <td width='50%' colspan='2'>
                                                <textarea name='TOR_USE_EXIT_NODES' cols='32' rows='3' wrap='off'>$settings{'TOR_USE_EXIT_NODES'}</textarea>
                                        </td>
                                </tr>
                        </table>
+                       <br><br>
 END
-
-               &Header::closebox();
        }
 
+       &Header::closebox();
+
        if ($settings{'TOR_RELAY_ENABLED'} eq 'on') {
                $checked{'TOR_RELAY_NOADVERTISE'}{'on'} = '';
                $checked{'TOR_RELAY_NOADVERTISE'}{'off'} = '';
@@ -516,10 +509,12 @@ END
 
                my @nodes = &TorORConnStatus($torctrl);
                if (@nodes) {
+                       my $nodes_length = scalar @nodes;
                        print <<END;
                                <table width='100%'>
                                        <tr>
-                                               <td colspan='3' class='base'><b>$Lang::tr{'tor connected relays'}</b></td>
+                                               <td width='40%' class='base'><b>$Lang::tr{'tor connected relays'}</b></td>
+                                               <td width='60%' colspan='2'>($nodes_length)</td>
                                        </tr>
 END
 
@@ -678,9 +673,9 @@ sub BuildConfiguration() {
 
        # Restart the service.
        if (($settings{'TOR_ENABLED'} eq 'on') || ($settings{'TOR_RELAY_ENABLED'} eq 'on')) {
-               system("/usr/local/bin/torctrl restart");
+               system("/usr/local/bin/torctrl restart &>/dev/null");
        } else {
-               system("/usr/local/bin/torctrl stop");
+               system("/usr/local/bin/torctrl stop &>/dev/null");
        }
 }
 
index 848aaef..a21f75a 100644 (file)
 'tone' => 'Ton',
 'tone dial' => 'Tonwahl:',
 'too long 80 char max' => ' ist zu lang, es sind maximal 80 Zeichen erlaubt',
+'tor' => 'Tor',
 'tor accounting' => 'Accounting',
 'tor accounting bytes' => 'Traffic (empfangen/gesendet)',
 'tor accounting bytes left' => '├╝brig',
index 150411a..b16ecbf 100644 (file)
 'tone' => 'Tone',
 'tone dial' => 'Tone dial:',
 'too long 80 char max' => ' is too long, maximum allowed is 80 characters',
+'tor' => 'Tor',
 'tor accounting' => 'Accounting',
 'tor accounting bytes' => 'Traffic (read/written)',
 'tor accounting bytes left' => 'left',