mirror of
https://github.com/cmehay/docker-tor-hidden-service.git
synced 2025-04-20 13:59:12 +00:00
Merge c31c409a1a
into 1dbcebdee3
This commit is contained in:
commit
c1e8caaad0
4 changed files with 17 additions and 31 deletions
32
Dockerfile
32
Dockerfile
|
@ -25,35 +25,9 @@ RUN apk add --no-cache git bind-tools cargo libevent-dev openssl-dev gnupg g
|
|||
apk del git libevent-dev openssl-dev gnupg cargo make automake autoconf musl-dev coreutils libffi-dev && \
|
||||
apk add --no-cache libevent openssl
|
||||
|
||||
RUN apk add --no-cache git gcc make automake autoconf musl-dev libtool && \
|
||||
git clone https://git.torproject.org/torsocks.git /usr/local/src/torsocks && \
|
||||
cd /usr/local/src/torsocks && \
|
||||
TORSOCKS_VERSION=${torsocks_version=$(git tag | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)} && \
|
||||
git checkout $TORSOCKS_VERSION && \
|
||||
./autogen.sh && \
|
||||
./configure && \
|
||||
make && make install && \
|
||||
cd .. && \
|
||||
rm -rf torsocks && \
|
||||
apk del git gcc make automake autoconf musl-dev libtool
|
||||
|
||||
RUN mkdir -p /etc/tor/
|
||||
|
||||
COPY pyproject.toml /usr/local/src/onions/
|
||||
|
||||
RUN cd /usr/local/src/onions && apk add --no-cache openssl-dev libffi-dev gcc libc-dev && \
|
||||
poetry install --no-dev --no-root && \
|
||||
apk del libffi-dev gcc libc-dev openssl-dev
|
||||
|
||||
COPY onions /usr/local/src/onions/onions
|
||||
COPY poetry.lock /usr/local/src/onions/
|
||||
RUN cd /usr/local/src/onions && apk add --no-cache gcc libc-dev && \
|
||||
poetry install --no-dev && \
|
||||
apk del gcc libc-dev
|
||||
|
||||
RUN mkdir -p ${HOME}/.tor && \
|
||||
addgroup -S -g 107 tor && \
|
||||
adduser -S -G tor -u 104 -H -h ${HOME} tor
|
||||
RUN mkdir -p ${HOME}/.tor && \
|
||||
addgroup -S -g 107 tor && \
|
||||
adduser -S -G tor -u 104 -H -h ${HOME} tor
|
||||
|
||||
COPY assets/entrypoint-config.yml /
|
||||
COPY assets/torrc /var/local/tor/torrc.tpl
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# docker-tor-hidden-service
|
||||
|
||||
[](https://travis-ci.org/cmehay/docker-tor-hidden-service)
|
||||
## What's New?
|
||||
|
||||
* /version is a text file with the current of Tor version generated with each build
|
||||
* Weekly builds. The Goldy's original image hadn't been updated in some time. Using the latest version of Tor is always best practice.
|
||||
|
||||
## Changelog
|
||||
|
||||
|
|
|
@ -50,3 +50,4 @@ HashedControlPassword {{ onion.control_hashed_password }}
|
|||
{% endif %}
|
||||
|
||||
# useless line for Jinja bug
|
||||
HiddenServiceVersion 3
|
||||
|
|
8
assets/v3onions
Normal file
8
assets/v3onions
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
#Define Variables
|
||||
PORT=`onions | awk -F: '{ print $NF }'`
|
||||
ONION=`ls -l /var/lib/tor/hidden_service/*/hostname | cut -c58- && cat /var/lib/tor/hidden_service/*/hostname`
|
||||
|
||||
#Displace v3address:port
|
||||
echo $ONION:$PORT
|
Loading…
Add table
Reference in a new issue