]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/tor.cgi
Merge remote-tracking branch 'ms/dns-forwarding' into next
[ipfire-2.x.git] / html / cgi-bin / tor.cgi
index 193e4059f6de97a9481d6c36a48d0d6ddc3e4af9..71da66666448f27c65e284ff5be243b3b7e332c6 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2013  IPFire Team  <info@ipfire.org>                          #
+# Copyright (C) 2013-2019  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -36,10 +36,10 @@ my @dummy = ( ${Header::colouryellow} );
 undef (@dummy);
 
 my @bandwidth_limits = (
-       1000 * 1024, # 1G
+       1000 * 1024, # 1 GBit/s
         500 * 1024,
         200 * 1024,
-        100 * 1024, # 100M
+        100 * 1024, # 100 MBit/s
          64 * 1024,
          50 * 1024,
          25 * 1024,
@@ -49,10 +49,7 @@ my @bandwidth_limits = (
           8 * 1024,
           4 * 1024,
           2 * 1024,
-              1024, # 1M
-               512,
-               256,
-               160
+              1024  # 1 MBit/s
 );
 my @accounting_periods = ('daily', 'weekly', 'monthly');
 
@@ -106,7 +103,7 @@ if (&Header::blue_used()) {
 }
 
 $settings{'TOR_RELAY_ENABLED'} = 'off';
-$settings{'TOR_RELAY_MODE'} = 'exit';
+$settings{'TOR_RELAY_MODE'} = 'relay';
 $settings{'TOR_RELAY_ADDRESS'} = '';
 $settings{'TOR_RELAY_PORT'} = 9001;
 $settings{'TOR_RELAY_DIRPORT'} = 0;
@@ -432,9 +429,9 @@ END
 
        foreach (@bandwidth_limits) {
                if ($_ >= 1024) {
-                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>". $_ / 1024 ." MBit/s</option>\n";
+                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>". $_ / 1024 ." Mbit/s</option>\n";
                } else {
-                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>$_ kBit/s</option>\n";
+                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>$_ kbit/s</option>\n";
                }
        }
 
@@ -455,9 +452,9 @@ END
 
        foreach (@bandwidth_limits) {
                if ($_ >= 1024) {
-                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>". $_ / 1024 ." MBit/s</option>\n";
+                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>". $_ / 1024 ." Mbit/s</option>\n";
                } else {
-                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>$_ kBit/s</option>\n";
+                       print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>$_ kbit/s</option>\n";
                }
        }
        print <<END;
@@ -519,7 +516,7 @@ END
                                        <tr>
                                                <td width='40%' class='base'>$Lang::tr{'tor relay fingerprint'}:</td>
                                                <td width='60%'>
-                                                       <a href='https://atlas.torproject.org/#details/$fingerprint' target='_blank'>$fingerprint</a>
+                                                       <a href='https://metrics.torproject.org/rs.html#details/$fingerprint' target='_blank'>$fingerprint</a>
                                                </td>
                                        </tr>
 END
@@ -612,7 +609,7 @@ END
                                print <<END;
                                        <tr>
                                                <td width='40%'>
-                                                       <a href='https://atlas.torproject.org/#details/$node->{'fingerprint'}' target='_blank'>
+                                                       <a href='https://metrics.torproject.org/rs.html#details/$node->{'fingerprint'}' target='_blank'>
                                                                $node->{'name'}
                                                        </a>
                                                </td>
@@ -978,7 +975,7 @@ sub FormatBytes() {
 sub FormatBitsPerSecond() {
        my $bits = shift;
 
-       my @units = ("Bit/s", "KBit/s", "MBit/s", "GBit/s", "TBit/s");
+       my @units = ("bit/s", "kbit/s", "Mbit/s", "Gbit/s", "Tbit/s");
        my $units_index = 0;
 
        while (($units_index <= $#units) && ($bits >= 1024)) {