Merge pull request #6 from cmehay/build

- Don't build tests
- Reset confdir to /etc
- Using hostname in torrc
This commit is contained in:
Christophe Mehay 2016-09-28 00:46:43 +02:00 committed by GitHub
commit e8e6e29de6
3 changed files with 8 additions and 4 deletions

View file

@ -8,7 +8,12 @@ RUN apk add --no-cache git libevent-dev openssl-dev gcc make automake ca-cer
git clone https://git.torproject.org/tor.git /usr/local/src/tor && \
cd /usr/local/src/tor && \
git checkout tor-${TOR_VERSION} && \
./autogen.sh && ./configure --disable-asciidoc && make && make install && \
./autogen.sh && \
./configure \
--disable-asciidoc \
--sysconfdir=/etc \
--disable-unittests && \
make && make install && \
cd .. && \
rm -rf tor && \
apk add --no-cache python3 python3-dev && \

View file

@ -22,7 +22,7 @@ from base64 import b32encode
class Setup(object):
hidden_service_dir = "/var/lib/tor/hidden_service/"
torrc = '/usr/local/etc/tor/torrc'
torrc = '/etc/tor/torrc'
torrc_template = '/var/local/tor/torrc.tpl'
def onion_url_gen(self, key):
@ -37,7 +37,6 @@ class Setup(object):
return '{onion}.onion'.format(onion=onion.decode().lower())
def _add_host(self, host):
if host not in self.setup:
self.setup[host] = {}

View file

@ -2,7 +2,7 @@
HiddenServiceDir /var/lib/tor/hidden_service/{{service}}
{% for ports in conf['ports'] %}
# PORT {{service}} {{ports[0]}}
HiddenServicePort {{ports[0]}} {{conf['ip']}}:{{ports[1]}}
HiddenServicePort {{ports[0]}} {{service}}:{{ports[1]}}
{% endfor %}
{% endfor %}