Commit Graph

31 Commits

Author SHA1 Message Date
Stefan Schantl
07e42be978 Adjust CGI files to work with latest location-function.pl changes.
Fixes #12515.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-09 14:07:21 +00:00
Peter Müller
c63ea6cf49 tor.cgi: look up Tor relay country codes using libloc
Tor provides a function to resolve a relay's IP address into a country
code by taking advantage of a (heavily outdated) GeoIP database shipped
with it.

We should consequently use libloc for doing this, since it can be
confusing if those results differ from active connections in the
connection tracking CGI (where we _use_ libloc) and such tasks are why
we invented libloc in the first place. :-)

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-05 23:31:14 +00:00
Peter Müller
5fe798b52f tor.cgi: fix calling Perl location module functions
The second version of this patch avoids re-defining $db_handle.

Fixes: #12492

Cc: Stefan Schantl <stefan.schantl@ipfire.org
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-By: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-10-12 10:15:36 +00:00
Stefan Schantl
8b45257326 tor.cgi: Use own location functions.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-09-24 17:36:38 +00:00
Stefan Schantl
0893eef4cc tor.cgi: Use location-functions.pl
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-12 18:48:24 +02:00
Erik Kapfer
ac2fdbb15e tor.cgi: Disable debugging output
Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-27 15:46:45 +01:00
Peter Müller
04f9321955 Tor WebUI: drop relay bandwith options < 1 MBit/s
Tor requires at least 1 MBit/s in order to participate.

Fixes #12001

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-03-11 09:52:54 +00:00
Peter Müller
0675a66d83 update metrics links in Tor WebUI
https://atlas.torproject.org/ is deprecated in favour of
https://metrics.torproject.org/ by now.

Fixes #11781.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-25 01:02:59 +00:00
Peter Müller
eea4969dff Tor: Use relay mode as default setting
Set the default operating mode to "relay" in the Tor WebUI
configuration page.

Running a Tor exit relay may cause legal trouble in some
countries and should not be the default setting to prevent
users from accidentally running an exit router.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-07 16:14:36 +00:00
Alf Høgemark
f00699e8bb Change case of the unit "bit" from "Bit" to "bit" in web UI
The correct case for "kilobit" is "kilobit", not "kiloBit".
And the same applies for Mbit, Gbit etc.
Reference is https://en.wikipedia.org/wiki/Kilobit

This commit changes the texts used in the web UI, so
that it correctly displays as "bit", "kbit", "Mbit" etc.

This fixes bugzilla item 10918.

Signed-off-by: Alf Høgemark <alf@i100.no>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-07-20 16:46:23 +01:00
Stefan Schantl
a9a28430b5 tor.cgi: Fix missing country flag icons.
The CGI now is using the GeoIP::get_flag_icon function provided by the
geoip-functions.pl, which takes care of the changed flag icons shipped
by core update 90.

Fixes #10919.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Tested-by: Jan Paul Tuecking <jan.paul.tuecking@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-10-15 15:42:44 +01:00
Lars Schuhmacher
e3edceeb7a Mark required input fields with a star
Mark required input fields with a star as nowadays this is
the de-facto default. Before, it was the other way around and
optional fields were marked.

Signed-off-by: Lars Schumacher <larsen007@web.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-09-21 16:40:41 +01:00
Stefan Schantl
b013822b99 Rename Locale::Country to Locale::Codes::Country in various scripts.
The new Locale-Country version needs to be loaded and used by specifing
Locale::Codes::Country since an upstream API change. Adjusting various perl
scripts to use the module in the proper way again.
2015-04-22 18:18:38 +02:00
Alexander Marx
aeefcc9caa Firewall: modified firewall-groups so that they can be empty even if used in rules
Now one can create a group, use it in a rule and then delete every entry
from the group. (The firewallrule then will be displayed yellow and
disabled).
2014-01-11 12:13:45 +01:00
Alexander Marx
f76b104cf3 fifteen-theme: made tor.cgi table themeable 2014-01-08 15:02:34 +01:00
Jan Paul Tuecking
4245fe3479 tor: added directory port to tor.cgi 2013-09-07 14:47:28 +02:00
Jan Paul Tuecking
ae666bf128 tor: fixed display of not founded country flags in tor.cgi 2013-09-06 22:05:10 +02:00
Jan Paul Tuecking
b31af08582 tor: valid client names are max. 19 characters long changed that in tor.cgi 2013-09-06 22:01:21 +02:00
Michael Tremer
26cce22da0 tor.cgi: Remember selected exit node country. 2013-08-21 17:24:36 +02:00
Jan Paul Tuecking
3387469bdb tor: added daemon stats and little changes on styling 2013-08-21 17:23:16 +02:00
Michael Tremer
919a50208b tor.cgi: Remove NoAdvertise option.
This does not make much sense with our setup.
2013-08-10 12:14:29 +02:00
Michael Tremer
a03547fe5e tor.cgi: Always show all configuration options.
Otherwise, if tor was disable, all settings like nickname, etc.
were reset to default.
2013-08-02 13:17:54 +02:00
Michael Tremer
56bf9f2174 tor.cgi: Check for valid accounting limit. 2013-08-02 11:27:14 +02:00
Michael Tremer
bd8b033078 tor.cgi: Check for valid relay address. 2013-08-02 11:22:52 +02:00
Michael Tremer
818f47d06f tor.cgi: Check for valid port numbers. 2013-08-02 11:20:53 +02:00
Michael Tremer
b0449403e6 tor.cgi: Catch invalid characters in relay name. 2013-08-02 11:06:40 +02:00
Michael Tremer
3308f8d09f tor.cgi: Burst bandwidth may never be less than rate. 2013-08-02 10:57:01 +02:00
Michael Tremer
6eb9c49d60 tor: The slowest bandwidth rate for a relay is 20 kbyte/s. 2013-08-02 10:42:41 +02:00
Michael Tremer
f16bcc3e31 tor.cgi: Show number of connected relays. 2013-07-31 19:26:37 +02:00
Michael Tremer
005db20668 tor.cgi: Minor functionality fixes and layout improvements. 2013-07-31 19:11:59 +02:00
Michael Tremer
13b5ce6e40 tor: Import CGI script. 2013-07-30 21:53:16 +02:00