Allows users to enable/disable tor from the config menu, which will forward all requests through Tor. Also adds support for setting environment variables for alternative proxy support. Setting the following variables will forward requests through the proxy: - WHOOGLE_PROXY_USER (optional) - WHOOGLE_PROXY_PASS (optional) - WHOOGLE_PROXY_TYPE (required) - Can be "http", "socks4", or "socks5" - WHOOGLE_PROXY_LOC (required) - Format: "<ip address>:<port>" See #30
40 lines
797 B
Docker
40 lines
797 B
Docker
FROM python:3.8-slim
|
|
|
|
WORKDIR /usr/src/app
|
|
RUN apt-get update && apt-get install -y build-essential libcurl4-openssl-dev libssl-dev tor
|
|
RUN cat rc/torrc > /etc/tor/torrc
|
|
RUN service tor start
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
ARG config_dir=/config
|
|
RUN mkdir -p $config_dir
|
|
VOLUME $config_dir
|
|
ENV CONFIG_VOLUME=$config_dir
|
|
|
|
ARG username=''
|
|
ENV WHOOGLE_USER=$username
|
|
ARG password=''
|
|
ENV WHOOGLE_PASS=$password
|
|
|
|
ARG proxyuser=''
|
|
ENV WHOOGLE_PROXY_USER=$proxyuser
|
|
ARG proxypass=''
|
|
ENV WHOOGLE_PROXY_PASS=$proxypass
|
|
ARG proxytype=''
|
|
ENV WHOOGLE_PROXY_TYPE=$proxytype
|
|
ARG proxyloc=''
|
|
ENV WHOOGLE_PROXY_LOC=$proxyloc
|
|
|
|
ARG use_https=''
|
|
ENV HTTPS_ONLY=$use_https
|
|
|
|
ARG whoogle_port=5000
|
|
ENV EXPOSE_PORT=$whoogle_port
|
|
|
|
COPY . .
|
|
|
|
EXPOSE $EXPOSE_PORT
|
|
|
|
CMD ["./run"]
|