mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +00:00
189 lines
5.6 KiB
HTML
189 lines
5.6 KiB
HTML
{% extends "simple_service.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 %}
|
|
{% load i18n %}
|
|
|
|
{% block page_head %}
|
|
|
|
{% if config_running %}
|
|
<meta http-equiv="refresh" content="3" />
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block configuration %}
|
|
|
|
<h3>{% trans "Status" %}</h3>
|
|
|
|
{% if config_running %}
|
|
|
|
<p class="running-status-parent">
|
|
<span class="running-status loading"></span>
|
|
{% trans "Tor configuration is being updated" %}
|
|
</p>
|
|
|
|
{% else %}
|
|
|
|
<p class="running-status-parent">
|
|
{% if status.is_running %}
|
|
<span class="running-status active"></span>
|
|
{% trans "Tor is running" %}
|
|
{% else %}
|
|
<span class="running-status inactive"></span>
|
|
{% trans "Tor is not running" %}
|
|
{% endif %}
|
|
</p>
|
|
|
|
{% include "diagnostics_button.html" with module="tor" %}
|
|
|
|
{% if status.hs_enabled %}
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<table class="table table-bordered table-condensed table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Hidden Service" %}</th>
|
|
<th>{% trans "Status" %}</th>
|
|
<th>{% trans "Ports" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>{{ status.hs_hostname }}</td>
|
|
<td>{{ status.hs_status }}</td>
|
|
<td>
|
|
{% for service in status.hs_services %}
|
|
{{ service }}
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h3>{% trans "Configuration" %}</h3>
|
|
|
|
<form class="form" method="post">
|
|
{% csrf_token %}
|
|
|
|
{{ form|bootstrap }}
|
|
|
|
<input type="submit" class="btn btn-primary btn-md"
|
|
value="{% trans "Update setup" %}"/>
|
|
</form>
|
|
|
|
{% if status.relay_enabled %}
|
|
<h3>{% trans "Relay" %}</h3>
|
|
<p>
|
|
{% blocktrans trimmed %}
|
|
If your {{ box_name }} is behind a router or firewall, you should
|
|
make sure the following ports are open, and port-forwarded, if
|
|
necessary:
|
|
{% endblocktrans %}
|
|
</p>
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<table class="table table-bordered table-condensed table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Service" %}</th>
|
|
<th>{% trans "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>
|
|
{% endif %}
|
|
|
|
<h3>{% trans "SOCKS" %}</h3>
|
|
|
|
<p>
|
|
{% blocktrans trimmed %}
|
|
A Tor SOCKS port is available on your {{ box_name }} on TCP port
|
|
9050.
|
|
{% endblocktrans %}
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block page_js %}
|
|
|
|
<script>
|
|
/*
|
|
@licstart The following is the entire license notice for the
|
|
JavaScript code in this page.
|
|
|
|
The MIT License (MIT)
|
|
|
|
Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org>
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
THE SOFTWARE.
|
|
|
|
@licend The above is the entire license notice
|
|
for the JavaScript code in this page.
|
|
*/
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
(function($) {
|
|
$('#id_tor-relay_enabled').change(function() {
|
|
var bridge = $('#id_tor-bridge_relay_enabled');
|
|
var disable = ! $('#id_tor-relay_enabled').prop('checked');
|
|
bridge.prop('disabled', disable);
|
|
if (disable) {
|
|
$('#id_tor-bridge_relay_enabled').prop('checked', false);
|
|
}
|
|
}).change();
|
|
})(jQuery);
|
|
</script>
|
|
|
|
{% endblock %}
|