first commit
This commit is contained in:
parent
da2cf7fe7b
commit
abc0734fa2
3 changed files with 40 additions and 1 deletions
26
Dockerfile
Normal file
26
Dockerfile
Normal 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
|
12
README.md
12
README.md
|
@ -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
3
notes.txt
Normal 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
|
Loading…
Reference in a new issue