From 1ac909a74812231490f0a2eb4b10efb54f6161ac Mon Sep 17 00:00:00 2001 From: brooke Date: Fri, 7 Mar 2025 23:15:18 -0500 Subject: [PATCH] add initial support for tor --- .env.sample | 3 +++ compose.tor.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ compose.yml | 2 +- onion.txt.tmpl | 1 + 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 compose.tor.yml create mode 100644 onion.txt.tmpl diff --git a/.env.sample b/.env.sample index a8204aa..53ce865 100644 --- a/.env.sample +++ b/.env.sample @@ -13,6 +13,9 @@ FOURGET_SHORT_DESCRIPTION="4get 4get 4get 4get" ## Enable captcha protection, please see readme. #COMPOSE_FILE="$COMPOSE_FILE:compose.captcha.yml" +## Enable onion routing, this will make all searches using tor +#COMPOSE_FILE="$COMPOSE_FILE:compose.tor.yml" + INCLUDE_NEWS_LINK=false INCLUDE_4GET_DONATION_LINK=true INCLUDE_SOURCE_LINK=false \ No newline at end of file diff --git a/compose.tor.yml b/compose.tor.yml new file mode 100644 index 0000000..8da0d49 --- /dev/null +++ b/compose.tor.yml @@ -0,0 +1,49 @@ +--- +version: "3.11" + +services: + app: + environment: + - FOURGET_PROXY_DDG="onion" + - FOURGET_PROXY_BRAVE="onion" + - FOURGET_PROXY_FB="onion" + - FOURGET_PROXY_GOOGLE="onion" + - FOURGET_PROXY_QWANT="onion" + - FOURGET_PROXY_MARGINALIA="onion" + - FOURGET_PROXY_MOJEEK="onion" + - FOURGET_PROXY_SC="onion" + - FOURGET_PROXY_SPOTIFY="onion" + - FOURGET_PROXY_WIBY="onion" + - FOURGET_PROXY_CURLIE="onion" + - FOURGET_PROXY_YT="onion" + - FOURGET_PROXY_YEP="onion" + - FOURGET_PROXY_PINTEREST="onion" + - FOURGET_PROXY_SEZNAM="onion" + - FOURGET_PROXY_NAVER="onion" + - FOURGET_PROXY_GREPPR="onion" + - FOURGET_PROXY_CROWDVIEW="onion" + - FOURGET_PROXY_MWMBL="onion" + - FOURGET_PROXY_FTM="onion" + - FOURGET_PROXY_IMGUR="onion" + - FOURGET_PROXY_YANDEX_W="onion" + - FOURGET_PROXY_YANDEX_I="onion" + - FOURGET_PROXY_YANDEX_V="onion" + networks: + - internal + volumes: + - banners:/var/www/html/4get/banner/ + configs: + - source: onion_txt + target: /var/www/html/4get/data/proxies/onion.txt + tor: + image: luuul/tor:latest + +configs: + onion_txt: + name: ${STACK_NAME}_onion_txt_${ROBOTS_TXT_VERSION} + file: onion.txt.tmpl + template_driver: golang + + +networks: + internal: \ No newline at end of file diff --git a/compose.yml b/compose.yml index 9d0f60f..7f857ce 100644 --- a/compose.yml +++ b/compose.yml @@ -40,7 +40,7 @@ services: configs: robots_txt: - name: ${STACK_NAME}_entrypoint_conf_${ROBOTS_TXT_VERSION} + name: ${STACK_NAME}_robots_txt${ROBOTS_TXT_VERSION} file: robots.txt.tmpl template_driver: golang about_html: diff --git a/onion.txt.tmpl b/onion.txt.tmpl new file mode 100644 index 0000000..c908080 --- /dev/null +++ b/onion.txt.tmpl @@ -0,0 +1 @@ +socks5:tor:9050:: \ No newline at end of file