From 720c1670750345e8c361219a58c2722a603e26bb Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 1 Nov 2016 20:26:20 +0100 Subject: add support for onionbalance --- templates/onionbalance/Debian.torrc.erb | 5 +++++ templates/onionbalance/RedHat.torrc.erb | 13 +++++++++++++ templates/onionbalance/config.yaml.erb | 10 ++++++++++ 3 files changed, 28 insertions(+) create mode 100644 templates/onionbalance/Debian.torrc.erb create mode 100644 templates/onionbalance/RedHat.torrc.erb create mode 100644 templates/onionbalance/config.yaml.erb (limited to 'templates/onionbalance') diff --git a/templates/onionbalance/Debian.torrc.erb b/templates/onionbalance/Debian.torrc.erb new file mode 100644 index 0000000..4b1afc4 --- /dev/null +++ b/templates/onionbalance/Debian.torrc.erb @@ -0,0 +1,5 @@ +# Tor config for the onionbalance management server +# --- +# The onionbalance service must be able to access the Tor control port. +ControlPort 9051 +SocksPort 0 diff --git a/templates/onionbalance/RedHat.torrc.erb b/templates/onionbalance/RedHat.torrc.erb new file mode 100644 index 0000000..023748b --- /dev/null +++ b/templates/onionbalance/RedHat.torrc.erb @@ -0,0 +1,13 @@ +# Tor config for the onionbalance management server +# --- +# The onionbalance service must be able to access the Tor control port. + +DataDirectory /var/lib/tor/onionbalance-data + +ControlPort 9051 +CookieAuthentication 1 +SocksPort 0 + +CookieAuthFileGroupReadable 1 +CookieAuthFile /run/tor/onionbalance.control.authcookie + diff --git a/templates/onionbalance/config.yaml.erb b/templates/onionbalance/config.yaml.erb new file mode 100644 index 0000000..3f45bd1 --- /dev/null +++ b/templates/onionbalance/config.yaml.erb @@ -0,0 +1,10 @@ +# OnionBalance Config File +services: +<% @services.keys.sort.each do |key| -%> +- instances: +<% (@services[key].keys - ['_key_content']).sort.each do |inst| -%> + - address: <%= @services[key][inst] %> + name: <%= inst %> +<% end -%> + key: <%= key %>.key +<% end -%> -- cgit v1.2.3 From d17494c600a59206601e4dfd0731b6af36b59631 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 5 Nov 2016 13:38:45 +0100 Subject: correct identation --- templates/onionbalance/config.yaml.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/onionbalance') diff --git a/templates/onionbalance/config.yaml.erb b/templates/onionbalance/config.yaml.erb index 3f45bd1..b1d4d80 100644 --- a/templates/onionbalance/config.yaml.erb +++ b/templates/onionbalance/config.yaml.erb @@ -1,10 +1,10 @@ # OnionBalance Config File services: <% @services.keys.sort.each do |key| -%> -- instances: + - key: /etc/onionbalance/<%= key %>.key + instances: <% (@services[key].keys - ['_key_content']).sort.each do |inst| -%> - - address: <%= @services[key][inst] %> - name: <%= inst %> + - address: <%= @services[key][inst] %> + name: <%= inst %> <% end -%> - key: <%= key %>.key <% end -%> -- cgit v1.2.3