From f007eab137bbde0edcec84afdaac9a876589328c Mon Sep 17 00:00:00 2001 From: qvqc Date: Mon, 5 Jul 2021 05:16:58 -0400 Subject: [PATCH] add tor p2p --- roles/wownerod/defaults/main.yaml | 1 + roles/wownerod/tasks/main.yaml | 11 +++++++++++ roles/wownerod/templates/torrc.j2 | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/roles/wownerod/defaults/main.yaml b/roles/wownerod/defaults/main.yaml index aa13ba3..287f432 100644 --- a/roles/wownerod/defaults/main.yaml +++ b/roles/wownerod/defaults/main.yaml @@ -6,3 +6,4 @@ wownero_bin_dir: "/usr/local/bin" wownerod_path: "{{ wownero_bin_dir }}/wownerod" wownerod_p2p_port: "34567" wownerod_rpc_port: "34568" +wownerod_p2p_tor_port: "34566" \ No newline at end of file diff --git a/roles/wownerod/tasks/main.yaml b/roles/wownerod/tasks/main.yaml index 84b729b..c89b9e9 100644 --- a/roles/wownerod/tasks/main.yaml +++ b/roles/wownerod/tasks/main.yaml @@ -94,6 +94,17 @@ slurp: src: /var/lib/tor/wownero/hostname register: onionhost +- name: echo onion + shell: echo {{ onionhost['content'] | b64decode }} + register: onionhostinsert +- name: add tor inbound wownerod.conf + lineinfile: + dest: /etc/wownerod.conf + line: "anonymous-inbound={{ onionhostinsert.stdout }}:{{ wownerod_p2p_tor_port }},127.0.0.1:{{ wownerod_p2p_tor_port }},64" + notify: + - restart wownerod +- name: Flush handlers + meta: flush_handlers - name: get i2p hostname find: path: /var/lib/i2pd/destinations diff --git a/roles/wownerod/templates/torrc.j2 b/roles/wownerod/templates/torrc.j2 index 4609760..fc1145e 100644 --- a/roles/wownerod/templates/torrc.j2 +++ b/roles/wownerod/templates/torrc.j2 @@ -1,2 +1,3 @@ HiddenServiceDir /var/lib/tor/wownero/ -HiddenServicePort {{ wownerod_rpc_port }} 127.0.0.1:{{ wownerod_rpc_port }} \ No newline at end of file +HiddenServicePort {{ wownerod_rpc_port }} 127.0.0.1:{{ wownerod_rpc_port }} +HiddenServicePort {{ wownerod_p2p_tor_port }} 127.0.0.1:{{ wownerod_p2p_tor_port }} \ No newline at end of file