mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Display Tor hidden service configuration on Tor page.
Currently assumes that there is no more than 1 hidden service.
This commit is contained in:
1 parent
bc08be681e
commit
cf52bf5029
3 files changed
+45
No files matched your search
@@ -30,6 +30,16 @@
|
||||
{% endif %}
|
||||
<br style='clear:both'>
|
||||
|
||||
<p><h3>Hidden Service</h3>
|
||||
A hidden service will allow your FreedomBox to provide selected
|
||||
services (such as OwnCloud or Chat) without revealing its location.
|
||||
Here is the current configuration:
|
||||
<ul>
|
||||
<li>Hostname: {{ tor_hs_hostname }}</li>
|
||||
<li>Ports: {{ tor_hs_ports }}</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p><h3>Bridge</h3>
|
||||
Your FreedomBox is configured as a Tor bridge with obfsproxy, so it
|
||||
can help circumvent censorship. If your FreedomBox is behind a router
|
||||
|
||||
@@ -47,8 +47,19 @@ def index(request):
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
output = actions.superuser_run("tor", ["get-hs"])
|
||||
if output == "":
|
||||
tor_hs_hostname = "Not Configured"
|
||||
tor_hs_ports = ""
|
||||
else:
|
||||
hs_info = output.split()
|
||||
tor_hs_hostname = hs_info[0]
|
||||
tor_hs_ports = hs_info[1]
|
||||
|
||||
is_running = actions.superuser_run("tor", ["is-running"]).strip() == "yes"
|
||||
return TemplateResponse(request, 'tor.html',
|
||||
{'title': _('Tor Control Panel'),
|
||||
'tor_hs_hostname': tor_hs_hostname,
|
||||
'tor_hs_ports': tor_hs_ports,
|
||||
'tor_ports': tor_ports,
|
||||
'is_running': is_running})
|
||||
Reference in new issue
Block a user