aboutsummaryrefslogtreecommitdiffstats
path: root/torouterui/templates
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-25 15:59:18 +0200
committerficus <ficus@robocracy.org>2012-09-25 15:59:18 +0200
commit79b260db495e94430d499906f321dc022c68fec1 (patch)
tree71b33694a9b9f7fc7f43b611191dc2cd5d1e1fc5 /torouterui/templates
parentfe4b8a01fc87d1a76fca8e8733270a260aa23cc0 (diff)
downloadtui-79b260db495e94430d499906f321dc022c68fec1.tar.gz
tui-79b260db495e94430d499906f321dc022c68fec1.zip
basic tor control (needs testing)
Diffstat (limited to 'torouterui/templates')
-rw-r--r--torouterui/templates/home.html8
-rw-r--r--torouterui/templates/logs.html1
-rw-r--r--torouterui/templates/tor.html29
3 files changed, 31 insertions, 7 deletions
diff --git a/torouterui/templates/home.html b/torouterui/templates/home.html
index 58ed2f2..fa9900c 100644
--- a/torouterui/templates/home.html
+++ b/torouterui/templates/home.html
@@ -71,11 +71,11 @@
<th>Version
<td style="font-family: monospace;">{% if status.tor.version %}{{ status.tor.version }} ({{ status.tor.version_current }}){% endif %}
<tr>
- <th>Traffic TX
- <td style="font-family: monospace;">{% if status.tor.traffic_written_bytes %}{{ status.tor.traffic_written_bytes }} bytes{% endif %}
+ <th>Total TX Data
+ <td style="font-family: monospace;">{% if status.tor.traffic_written_bytes != None %}{{ status.tor.traffic_written_bytes }} bytes{% endif %}
<tr>
- <th>Traffic RX
- <td style="font-family: monospace;">{% if status.tor.traffic_read_bytes %}{{ status.tor.traffic_read_bytes }} bytes{% endif %}
+ <th>Total RX Data
+ <td style="font-family: monospace;">{% if status.tor.traffic_read_bytes != None %}{{ status.tor.traffic_read_bytes }} bytes{% endif %}
</table>
</div>
</div>
diff --git a/torouterui/templates/logs.html b/torouterui/templates/logs.html
index c5ea52a..118c0e0 100644
--- a/torouterui/templates/logs.html
+++ b/torouterui/templates/logs.html
@@ -5,5 +5,6 @@
{{ lib.logbox("dmesg", logs.dmesg) }}
{{ lib.logbox("auth.log", logs.authlog) }}
{{ lib.logbox("syslog", logs.syslog) }}
+{{ lib.logbox("tor", logs.tor) }}
{% endblock %}
diff --git a/torouterui/templates/tor.html b/torouterui/templates/tor.html
index a1f30dc..327ac59 100644
--- a/torouterui/templates/tor.html
+++ b/torouterui/templates/tor.html
@@ -5,9 +5,32 @@
<form action="/tor/" method="POST" class="form-horizontal">
<legend>Tor Network Configuration</legend>
-{{ lib.formcheckbox(form, formerr, 'torenable', 'Enable Tor daemon', 'true') }}
-{{ lib.formcheckbox(form, formerr, 'torrelayenable', 'Enable Tor Relay', 'true') }}
-{{ lib.formcheckbox(form, formerr, 'torbridgeenable', 'Enable Tor Bridge', 'true') }}
+{{ lib.formcheckbox(form, formerr, 'tor_enable', 'Enable Tor daemon', 'true') }}
+
+{{ lib.forminput(form, formerr, 'tor_sockslistenaddress', 'SOCKS Proxy Listen Address', '127.0.0.1:9050') }}
+{{ lib.forminput(form, formerr, 'tor_virtualaddrnetwork', 'Virtual Address Network', '192.168.0.0/16') }}
+{{ lib.forminput(form, formerr, 'tor_translistenaddress', 'Trans Listen Address', '127.0.0.1:9040') }}
+{{ lib.forminput(form, formerr, 'tor_dnslistenaddress', 'DNS Listen Address', '127.0.0.1:5353') }}
+
+<legend>Exit Node Configuration</legend>
+{{ lib.formcheckbox(form, formerr, 'tor_exitnodeenable', 'Enable Exit Node', 'true') }}
+
+<legend>Relay Configuration</legend>
+<label class="radio">
+ <input type="radio" name="tor_relaytype" id="tor_relaytypenode" value="none" {% if form.tor_relaytype == "none" %}checked{% endif %}>
+ <h4>Not a Relay Node</h4>
+</label>
+<label class="radio">
+ <input type="radio" name="tor_relaytype" id="tor_relaytypebridge" value="bridge" {% if form.tor_relaytype == "bridge" %}checked{% endif %}>
+ <h4>Bridge Relay Node</h4>
+</label>
+<label class="radio">
+ <input type="radio" name="tor_relaytype" id="tor_relaytyperelay" value="relay" {% if form.tor_relaytype == "relay" %}checked{% endif %}>
+ <h4>Regular Relay Node</h4>
+</label>
+
+{{ lib.forminput(form, formerr, 'tor_relaybandwidthrateKBps', 'Relay Node Bandwidth (KB/sec)', '50') }}
+{{ lib.forminput(form, formerr, 'tor_relaybandwidthburstKBps', 'Relay Node Burst Bandwidth (KB/sec)', '75') }}
<div class="pull-right">
<a href="."><button class="btn" type="button">Reset</button></a>