From ef89083295c28b1d8b15ff3dcd9a11d8c1595dea Mon Sep 17 00:00:00 2001 From: ficus Date: Fri, 23 Nov 2012 23:13:04 +0100 Subject: add about page, include version number --- torouterui/__init__.py | 4 +++ torouterui/server.py | 4 +-- torouterui/templates/about.html | 67 +++++++++++++++++++++++++++++++++++++++++ torouterui/templates/base.html | 5 +-- torouterui/templates/home.html | 6 ++++ torouterui/views.py | 4 +++ 6 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 torouterui/templates/about.html (limited to 'torouterui') diff --git a/torouterui/__init__.py b/torouterui/__init__.py index c6517f5..42a6bb1 100644 --- a/torouterui/__init__.py +++ b/torouterui/__init__.py @@ -1,3 +1,7 @@ + +__version_info__ = (0, 0, 1) +__version__ = '.'.join(map(str,__version_info__)) + from flask import Flask app = Flask(__name__) diff --git a/torouterui/server.py b/torouterui/server.py index 8ae4a3a..3dfb946 100644 --- a/torouterui/server.py +++ b/torouterui/server.py @@ -1,8 +1,7 @@ -from torouterui import app +from torouterui import app, __version__ import argparse - def main(): """Primary entry-point for torouterui. """ @@ -27,6 +26,7 @@ def main(): default="uap0", help="wifi interface (uap0 or wlan0)") args = parser.parse_args() + app.config['TOROUTERVERSION'] = __version__ app.config['LAN_IF'] = args.lanif app.config['WAN_IF'] = args.wanif app.config['WIFI_IF'] = args.wifiif diff --git a/torouterui/templates/about.html b/torouterui/templates/about.html new file mode 100644 index 0000000..e4d11ac --- /dev/null +++ b/torouterui/templates/about.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} +{% block body %} + +

DISCLAIMERS!

+ + + + +

Project Information

+ + + +

Background

+ +

+Learn more by reading the Tor Project's +overview and +documentation. + +

How do I check if Tor is working?

+ +

+Tor is only transparently enabled on the local wireless network (check the status page to see if WiFi is enabled and what the SSID name +is). When connected to that network only, you could determine if Tor is working +correctly via: + +

+
check.torproject.org +
The Tor Project runs a web service at + check.torproject.org which + indicates if you connection is inbound from a known Tor exit node or not. + +
External IP Check +
You can check your external "exit" IP address at domains like whatismyip.com or with queries to search + engines like duckduckgo + or google.com. + You should get different results when browsing on the LAN ethernet port and + connecting to the wireless access point. + +
Hidden Services +
You can check that DNS queries and transperent proxying is working + correctly by visiting a hidden service like duckduckgo's + (3g2upl4pq6kufc4m.onion) or + torproject.org's + (idnxcnkne4qt76tg.onion). + Read more about hidden services at + torproject.org +
+ +{% endblock %} diff --git a/torouterui/templates/base.html b/torouterui/templates/base.html index 4c15c73..bf926c3 100644 --- a/torouterui/templates/base.html +++ b/torouterui/templates/base.html @@ -21,7 +21,7 @@ torouter @@ -36,7 +36,8 @@ {% macro pagelink(path, name) -%}
  • {{name}}
  • {%- endmacro %} - {{ pagelink("/", "Status") }} + {{ pagelink("/", "System Status") }} + {{ pagelink("/about/", "About Project") }} {{ pagelink("/reboot/", "Reboot...") }} {{ pagelink("/wan/", "Upstream Ethernet") }} diff --git a/torouterui/templates/home.html b/torouterui/templates/home.html index fa9900c..6610e51 100644 --- a/torouterui/templates/home.html +++ b/torouterui/templates/home.html @@ -2,6 +2,12 @@ {% extends "base.html" %} {% block body %} +
    +Achtung! Warning! +This firmware is very experimental and has obvious known holes, like default +root passwords available over SSH! Read the disclaimer! +You have been warned! +
    diff --git a/torouterui/views.py b/torouterui/views.py index d3daf77..418c391 100644 --- a/torouterui/views.py +++ b/torouterui/views.py @@ -33,6 +33,10 @@ def statuspage(): status['tor'] = tor.get_tor_status() return render_template('home.html', settings=None, status=status) +@app.route('/about/') +def aboutpage(): + return render_template('about.html') + @app.route('/reboot/', methods=['GET', 'POST']) def rebootpage(): msg = list() -- cgit v1.2.3