summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/torrc.control.erb10
-rw-r--r--templates/torrc.map_address.erb3
-rw-r--r--templates/torrc.relay.erb14
3 files changed, 23 insertions, 4 deletions
diff --git a/templates/torrc.control.erb b/templates/torrc.control.erb
index df9513a..336c72d 100644
--- a/templates/torrc.control.erb
+++ b/templates/torrc.control.erb
@@ -1,6 +1,16 @@
# tor controller
<%- if port != '0' then -%>
ControlPort <%= port %>
+<%- if cookie_authentication != '0' then -%>
+CookieAuthentication 1
+<%- if cookie_auth_file != '' then -%>
+CookieAuthFile <%= cookie_auth_file %>
+<%- end -%>
+<%- if cookie_auth_file_group_readable != '' then -%>
+CookieAuthFileGroupReadable <%= cookie_auth_file_group_readable %>
+<%- end -%>
+<%- else -%>
HashedControlPassword <%= hashed_control_password %>
<%- end -%>
+<%- end -%>
diff --git a/templates/torrc.map_address.erb b/templates/torrc.map_address.erb
new file mode 100644
index 0000000..3fb0274
--- /dev/null
+++ b/templates/torrc.map_address.erb
@@ -0,0 +1,3 @@
+# map address <%= name %>
+MapAddress <%= address %> <%= newaddress %>
+
diff --git a/templates/torrc.relay.erb b/templates/torrc.relay.erb
index 990dfcc..85320d3 100644
--- a/templates/torrc.relay.erb
+++ b/templates/torrc.relay.erb
@@ -13,11 +13,17 @@ Nickname <%= nickname %>
<%- if address != '' then -%>
Address <%= address %>
<%- end -%>
-<%- if bandwidth_rate != '0' then -%>
-RelayBandwidthRate <%= bandwidth_rate %> KB
+<%- if bandwidth_rate != '' then -%>
+BandwidthRate <%= bandwidth_rate %> KB
<%- end -%>
-<%- if bandwidth_burst != '0' then -%>
-RelayBandwidthBurst <%= bandwidth_burst %> KB
+<%- if bandwidth_burst != '' then -%>
+BandwidthBurst <%= bandwidth_burst %> KB
+<%- end -%>
+<%- if relay_bandwidth_rate != '0' then -%>
+RelayBandwidthRate <%= relay_bandwidth_rate %> KB
+<%- end -%>
+<%- if relay_bandwidth_burst != '0' then -%>
+RelayBandwidthBurst <%= relay_bandwidth_burst %> KB
<%- end -%>
<%- if accounting_max != '0' then -%>
AccountingMax <%= accounting_max %> GB