summaryrefslogtreecommitdiff
path: root/templates/torrc.hidden_service.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/torrc.hidden_service.erb')
-rw-r--r--templates/torrc.hidden_service.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/torrc.hidden_service.erb b/templates/torrc.hidden_service.erb
index 7cd849f..6a97351 100644
--- a/templates/torrc.hidden_service.erb
+++ b/templates/torrc.hidden_service.erb
@@ -1,6 +1,6 @@
# hidden service <%= @name %>
HiddenServiceDir <%= @data_dir %>/<%= @name %>
<% Array(@ports).each do |port| -%>
-HiddenServicePort <%= port %>
+HiddenServicePort <%= port =~ /^\d+$/ ? "#{port} 127.0.0.1:#{port}" : port %>
<% end -%>