Sunil Mohan Adapa 8fd4f69bfd tor: Implement diagnostics
- Mostly moved from freedombox-setup.
2015-08-29 06:22:01 -04:00

110 lines
2.9 KiB
HTML

{% extends "base.html" %}
{% comment %}
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
{% endcomment %}
{% load bootstrap %}
{% block content %}
<h2>Anonymity Network (Tor)</h2>
<p>Tor is an anonymous communication system. You can learn more about
it from the <a href="https://www.torproject.org/">Tor Project</a>
website. For best protection when web surfing, the Tor Project
recommends that you use
the <a href="https://www.torproject.org/download/download-easy.html.en">
Tor Browser</a>.</p>
<h3>Status</h3>
<p class="running-status-parent">
{% if status.is_running %}
<span class="running-status active"></span> Tor is running
{% else %}
<span class="running-status inactive"></span> Tor is not running
{% endif %}
</p>
{% include "diagnostics_button.html" with module="tor" %}
{% if status.hs_enabled %}
<div class="row">
<div class="col-sm-3">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th>Hidden Service</th>
<th>Port</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ status.hs_hostname }}</td>
<td>{{ status.hs_ports }}</td>
</tr>
</tbody>
</table>
</div>
</div>
{% endif %}
<h3>Configuration</h3>
<form class="form" method="post">
{% csrf_token %}
{{ form|bootstrap }}
<input type="submit" class="btn btn-primary btn-md" value="Update setup"/>
</form>
<h3>Bridge</h3>
<p>Your {{ cfg.box_name }} is configured as a Tor bridge with obfsproxy, so it
can help circumvent censorship. If your {{ cfg.box_name }} is behind a router
or firewall, you should make sure the following ports are open, and
port-forwarded, if necessary:</p>
<div class="row">
<div class="col-sm-3">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th>Service</th>
<th>Port</th>
</tr>
</thead>
<tbody>
{% for name, port in status.ports.items %}
<tr>
<td>{{ name }}</td>
<td>{{ port }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<h3>SOCKS</h3>
<p>A Tor SOCKS port is available on your {{ cfg.box_name }} on TCP port
9050.</p>
{% endblock %}