diff --git a/Makefile b/Makefile index 4a27715..4a4c6bf 100644 --- a/Makefile +++ b/Makefile @@ -33,3 +33,6 @@ logs-full: ## Get logs from the containers tor: ## Get onion address for the Monero node docker-compose -f docker-compose.yaml exec tor cat /var/lib/tor/monero/hostname + +post: ## Post onion address to monero.fail + docker-compose -f docker-compose.yaml exec tor bash /post.sh diff --git a/dockerfiles/conf/post.sh b/dockerfiles/conf/post.sh new file mode 100644 index 0000000..2353d10 --- /dev/null +++ b/dockerfiles/conf/post.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +ONION_ADDR=$(cat /var/lib/tor/monero/hostname) +ONION_URL="http://${ONION_ADDR}:18081" + +curl -q -X POST https://monero.fail/add -d node_url=${ONION_URL} diff --git a/dockerfiles/tor b/dockerfiles/tor index a2238a9..a32a34f 100644 --- a/dockerfiles/tor +++ b/dockerfiles/tor @@ -1,6 +1,6 @@ FROM ubuntu:20.04 -RUN apt-get update && apt-get install tor -y +RUN apt-get update && apt-get install tor curl -y RUN mkdir -p /run/tor \ && chown -R debian-tor:debian-tor /run/tor \ @@ -8,6 +8,8 @@ RUN mkdir -p /run/tor \ COPY conf/torrc /etc/tor/torrc +COPY conf/post.sh /post.sh + USER debian-tor EXPOSE 9050