aboutsummaryrefslogtreecommitdiffstats
path: root/torouterui/templates/tor.html
blob: 3c7e3409e39a88a2425d2d854f88b9d8a9e12f22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% import "lib.html" as lib %}
{% extends "base.html" %}
{% block body %}

{% if form == None %}
<form action="/tor/" method="POST">
Tor daemon should probably be restarted... are you certain?
<br>
<br>
<button type="submit" class="btn btn-large btn-primary btn-warning" type="button" name="submit" value="Restart">
Restart</button>
</form>

{% else %}

<form action="/tor/" method="POST" class="form-horizontal">
<legend>Tor Network Configuration</legend>

{{ 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>
<button type="submit" class="btn btn-primary" type="button">
Save</button>
</div>
</form>
{% endif %}
{% endblock %}