first commit

This commit is contained in:
panda 2018-08-22 00:28:47 +02:00
parent da2cf7fe7b
commit abc0734fa2
3 changed files with 40 additions and 1 deletions

26
Dockerfile Normal file
View file

@ -0,0 +1,26 @@
FROM debian:stretch
ARG HiddenServiceDir="/var/lib/tor/hidden-service"
ARG HiddenServicePort="80 172.17.0.1:8000"
RUN apt-get update && \
apt-get install -y gpg apt-transport-https
RUN echo "deb http://deb.torproject.org/torproject.org stretch main" > /etc/apt/sources.list.d/tor.list && \
echo "deb-src http://deb.torproject.org/torproject.org stretch main" >> /etc/apt/sources.list.d/tor.list && \
cd /tmp && \
gpg --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 && \
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
RUN apt-get update && \
apt-get install -y tor deb.torproject.org-keyring
RUN echo "Log notice file /var/log/tor/notices.log" > /etc/tor/torrc && \
echo "HiddenServiceDir ${HiddenServiceDir}" >> /etc/tor/torrc && \
echo "HiddenServicePort ${HiddenServicePort}" >> /etc/tor/torrc && \
mkdir ${HiddenServiceDir} && \
chmod 700 ${HiddenServiceDir} && \
chown debian-tor:debian-tor ${HiddenServiceDir} && \
service tor restart
ENTRYPOINT service tor restart && ping localhost && /bin/bash

View file

@ -1,3 +1,13 @@
# Docker_Tor_HiddenService
Dockerized tor hidden service
Dockerized tor hidden service
##Build the image:
docker build -t torhs_dockerized .
##Run the image:
docker run -d --name torhs_dockerized torhs_dockerized
##Retrieve the idden service name:
docker exec torhs_dockerized cat /var/lib/tor/hidden-service/hostname

3
notes.txt Normal file
View file

@ -0,0 +1,3 @@
docker build -t torhs_dockerized .
docker run -d --name torhs_dockerized torhs_dockerized
docker exec torhs_dockerized cat /var/lib/tor/hidden-service/hostname