From f7745aa262e1162928218c8616081d6860c93de5 Mon Sep 17 00:00:00 2001 From: Revvy Date: Sat, 20 Apr 2024 11:46:11 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20Docker-LibreY-Tor-proxy.md,=20LibreY-To?= =?UTF-8?q?r-Proxy-=E2=80=90-Prebuilt-images-with-run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d => docker-compose-prebuilt-tor-proxy.md} | 10 ++--- docs/docker-run-prebuilt-tor-proxy.md | 43 +++++++++++++++++++ 2 files changed, 46 insertions(+), 7 deletions(-) rename docs/{Docker-LibreY-Tor-proxy.md => docker-compose-prebuilt-tor-proxy.md} (83%) create mode 100644 docs/docker-run-prebuilt-tor-proxy.md diff --git a/docs/Docker-LibreY-Tor-proxy.md b/docs/docker-compose-prebuilt-tor-proxy.md similarity index 83% rename from docs/Docker-LibreY-Tor-proxy.md rename to docs/docker-compose-prebuilt-tor-proxy.md index 48422696..ad7970f5 100644 --- a/docs/Docker-LibreY-Tor-proxy.md +++ b/docs/docker-compose-prebuilt-tor-proxy.md @@ -2,7 +2,7 @@ > Please note that this heavily relies on [@codedipper](https://github.com/codedipper)'s [work and is basically a copy of his wiki](https://github.com/codedipper/LibreY-Tor/wiki/LibreY-Tor-Proxy-%E2%80%90-Prebuilt-images-with-compose). -Step 0: Install and configure Docker. +Step 0: Install and configure Docker.\ Step 1: Enter a root shell on the host machine. Step 2: Clone the required git repositories to the host machine. @@ -21,6 +21,8 @@ git apply ../LibreY-Tor/LibreY_docker-compose-yml.diff Step 4: Manually edit `LibreY/docker-compose.yml` and `LibreY-Tor/torrc` to configure LibreY and Tor to your liking. +Step 5: Run it! `docker compose up -d` + To update containers: ```sh @@ -31,9 +33,3 @@ docker compose up -d ``` It is recommended to build the images yourself to avoid an outdated Tor version. - -TODO Documentation: - - Manually build images, `docker-compose` - Manually build images, `docker run` - Use prebuilt images, `docker run` diff --git a/docs/docker-run-prebuilt-tor-proxy.md b/docs/docker-run-prebuilt-tor-proxy.md new file mode 100644 index 00000000..af7c4fea --- /dev/null +++ b/docs/docker-run-prebuilt-tor-proxy.md @@ -0,0 +1,43 @@ +> [!IMPORTANT] +> Please note that this heavily relies on [@codedipper](https://github.com/codedipper)'s [work and is basically a copy of his wiki](https://github.com/codedipper/LibreY-Tor/wiki/LibreY-Tor-Proxy-‐-Prebuilt-images-with-run). + + +Step 0: Install and configure Docker.\ +Step 1: Enter a root shell on the host machine. + +Step 2: Clone the required git repositories to the host machine. + +```sh +git clone https://github.com/Ahwxorg/LibreY.git LibreY/ +git clone https://github.com/codedipper/LibreY-Tor.git LibreY-Tor/ +``` + +Step 3: Configure Docker network. + +```sh +docker network create --driver=bridge --subnet=172.4.0.0/16 librey_tor_net +``` + +Step 4: Manually edit `LibreY-Tor/torrc` to configure Tor to your liking. + +Step 5: Run it! +```sh +cd LibreY/ +docker run -d --name librey --ip=172.4.0.6 --network librey_tor_net -p 8080:8080 -e TZ="America/New_York" -e CONFIG_GOOGLE_DOMAIN="com" -e CONFIG_LANGUAGE="en" -e CONFIG_NUMBER_OF_RESULTS="10" -e CONFIG_INVIDIOUS_INSTANCE="https://yt.ahwx.org" -e CONFIG_DISABLE_BITTORRENT_SEARCH=false -e CONFIG_HIDDEN_SERVICE_SEARCH=false -e CONFIG_INSTANCE_FALLBACK=true -e CONFIG_RATE_LIMIT_COOLDOWN=25 -e CONFIG_CACHE_TIME=20 -e CONFIG_DISABLE_API=false -e CONFIG_TEXT_SEARCH_ENGINE="auto" -e CURLOPT_PROXY_ENABLED=true -e CURLOPT_PROXY="172.4.0.5:9050" -e CURLOPT_PROXYTYPE="CURLPROXY_SOCKS5_HOSTNAME" -e CURLOPT_USERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:116.0) Gecko/20100101 Firefox/116.0" -e CURLOPT_FOLLOWLOCATION=true -v ./nginx_logs:/var/log/nginx -v ./php_logs:/var/log/php83 --restart unless-stopped ghcr.io/ahwxorg/librey:latest +docker run -d --name librey-watchtower-1 -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower +docker run -d --name librey-librey_tor-1 --network librey_tor_net --ip=172.4.0.5 -v $PWD/../LibreY-Tor/torrc:/etc/tor/torrc ghcr.io/codedipper/librey-tor:latest +``` + +To update containers: + +```sh +cd LibreY/ +docker stop librey librey-watchtower-1 librey-librey_tor-1 +docker rm librey librey-watchtower-1 librey-librey_tor-1 +docker pull ghcr.io/ahwxorg/librey:latest +docker pull containrrr/watchtower +docker pull ghcr.io/codedipper/librey-tor:latest +# Repeat run commands +``` + +It is recommended to build the images yourself to avoid an outdated Tor version.