From c3b2444eea73903082fabd414167897088a2a3f9 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Wed, 2 Aug 2023 16:18:21 +0200 Subject: [PATCH] chore(*): renaming the entirity of LibreY --- Dockerfile | 15 ++--- README.md | 4 +- docker-compose.yml | 6 +- docker/README.md | 36 +++++------ docker/attributes.sh | 12 ++-- docker/php/php.dockerfile | 8 +-- docker/server/prepare.sh | 4 +- donate.php | 6 +- index.php | 8 +-- instances.json | 130 +------------------------------------- misc/footer.php | 6 +- misc/header.php | 2 +- opensearch.xml.example | 4 +- search.php | 2 +- settings.php | 2 +- static/css/styles.css | 2 +- 16 files changed, 62 insertions(+), 185 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58a08ea..a378b1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,18 @@ # syntax = edrevo/dockerfile-plus ARG VERSION="3.18" -FROM alpine:${VERSION} AS librex +FROM alpine:${VERSION} AS librey WORKDIR "/var/www/html" # Docker metadata contains information about the maintainer, such as the name, repository, and support email # Please add any necessary information or correct any incorrect information # See more: https://docs.docker.com/config/labels-custom-metadata/ -LABEL name="LibreX" \ +LABEL name="LibreY" \ description="Framework and javascript free privacy respecting meta search engine" \ version="1.0" \ - vendor="Hnhx Femboy" \ - maintainer="Hnhx Femboy, Junior L. Botelho" \ - url="https://github.com/hnhx/librex" \ - usage="https://github.com/hnhx/librex/wiki" \ - authors="https://github.com/hnhx/librex/contributors" + vendor="Ahwx " \ + maintainer="Ahwx " \ + url="https://github.com/Ahwxorg/LibreY" \ + authors="https://github.com/Ahwxorg/LibreY/contributors" # Include arguments as temporary environment variables to be handled by Docker during the image build process # Change or add new arguments to customize the image generated by 'docker build' command @@ -31,7 +30,7 @@ RUN apk add gettext --no-cache INCLUDE+ docker/php/php.dockerfile INCLUDE+ docker/server/nginx.dockerfile -# Include docker scripts, docker images, and the 'GNU License' in the Librex container +# Include docker scripts, docker images, and the 'GNU License' in the LibreY container ADD "." "/var/www/html" # Set permissions for script files as executable scripts inside 'docker/scripts' directory diff --git a/README.md b/README.md index f98080e..a95104c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@

LibreY

-# LibreY is a fork of LibreX, made by [hnhx](https://github.com/hnhx). LibreY removed some features like automatic redirection. +# Disclaimer + +> LibreY is a fork of LibreX, made by [hnhx](https://github.com/hnhx). LibreY removed some features like automatic redirection. Please be sure to check out [LibreX](https://github.com/hnhx/LibreX). The original code is written by [hnhx and contributors](https://github.com/hnhx/LibreX/contributors)

diff --git a/docker-compose.yml b/docker-compose.yml index c9224aa..0a1f989 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ version: "2.1" services: - librex: - image: librex/librex:latest - container_name: librex + librey: + image: ahwxorg/librey:latest + container_name: librey network_mode: bridge ports: - 8080:8080 diff --git a/docker/README.md b/docker/README.md index 04f2088..e52bad2 100644 --- a/docker/README.md +++ b/docker/README.md @@ -17,21 +17,21 @@ ### Running a docker container -Dockerized Librex is a way to provide users with yet another way to self-host their own projects with a view to privacy. If you wish to help, please start by looking for bugs in used docker configurations. +Dockerized librey is a way to provide users with yet another way to self-host their own projects with a view to privacy. If you wish to help, please start by looking for bugs in used docker configurations. ### Running a Docker container through the Docker hub -To run librex in a docker container, you can simply use the command: +To run librey in a docker container, you can simply use the command: ```sh docker run -d \ - --name librex \ + --name librey \ -e TZ="America/New_York" \ -e CONFIG_GOOGLE_DOMAIN="com" \ -e CONFIG_GOOGLE_LANGUAGE="en" \ -e CONFIG_WIKIPEDIA_LANGUAGE="en" \ -p 8080:8080 \ - librex/librex:latest + librey/librey:latest ```
@@ -41,9 +41,9 @@ docker run -d \ ```yml version: "2.1" services: - librex: - image: librex/librex:latest - container_name: librex + librey: + image: librey/librey:latest + container_name: librey network_mode: bridge ports: - 8080:8080 @@ -73,11 +73,11 @@ This docker image was developed with high configurability in mind, so here is th | Variables | Default | Examples | Description | |:----------|:-------------|:---------|:------| -| OPEN_SEARCH_TITLE | "LibreX" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) | +| OPEN_SEARCH_TITLE | "LibreY" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) | | OPEN_SEARCH_DESCRIPTION | "Framework and javascript free privacy respecting meta search engine" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) | | OPEN_SEARCH_ENCODING | "UTF-8" | "UTF-8" | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) | -| OPEN_SEARCH_LONG_NAME | "Librex Search" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) | -| OPEN_SEARCH_HOST | "http://localhost:8080" | string | Host used to identify Librex on the network | +| OPEN_SEARCH_LONG_NAME | "librey Search" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) | +| OPEN_SEARCH_HOST | "http://localhost:8080" | string | Host used to identify librey on the network |
@@ -155,30 +155,30 @@ Docker > 20.10: `docker buildx build` If you don't want to use the image that is already available on `docker hub`, then you can simply build the Dockerfile directly from the github repository using the command: ```sh -docker build https://github.com/hnhx/librex.git -t librex:latest +docker build https://github.com/Ahwxorg/librey.git -t librey:latest ``` ```sh -docker run -d --name librex \ +docker run -d --name librey \ -e CONFIG_GOOGLE_DOMAIN="com" \ -e CONFIG_GOOGLE_LANGUAGE="en" \ -p 8080:8080 \ - librex:latest + librey:latest ``` Or, instead of doing the build remotely, you still have the opportunity to `git clone` the repository, and build it locally with the command: ```sh -git clone https://github.com/hnhx/librex.git -cd librex/ -docker build -t librex:latest . +git clone https://github.com/Ahwxorg/librey.git +cd librey/ +docker build -t librey:latest . ```
### Support for different architectures -Supported architectures for the official Librex images include the same ones supported by Alpine itself, which are typically denoted as `linux/386`, `linux/amd64`, `linux/arm/v6`. If you need support for a different architecture, such as `linux/arm/v7`, you can modify the 'Dockerfile' to use a more comprehensive base image like `ubuntu:latest` instead. +Supported architectures for the official librey images include the same ones supported by Alpine itself, which are typically denoted as `linux/386`, `linux/amd64`, `linux/arm/v6`. If you need support for a different architecture, such as `linux/arm/v7`, you can modify the 'Dockerfile' to use a more comprehensive base image like `ubuntu:latest` instead. In this case, you must run the `build` process specifying the desired architecture as shown in the example below: @@ -186,7 +186,7 @@ In this case, you must run the `build` process specifying the desired architectu docker buildx build \ --no-cache \ --platform linux/arm/v7 \ - --tag librex/librex:latest . + --tag ahwxorg/librey:latest . ``` **OBS:** Keep in mind that this can cause some issues at build time, so you need to know a little about Dockerfiles to solve this problem for your specific case. diff --git a/docker/attributes.sh b/docker/attributes.sh index 26ca7a7..a0a78c0 100755 --- a/docker/attributes.sh +++ b/docker/attributes.sh @@ -7,14 +7,14 @@ # If these locations do not already exist within the Docker container, they will be created export CONFIG_PHP_TEMPLATE="$(pwd)/config.php" export CONFIG_OPEN_SEARCH_TEMPLATE="$(pwd)/opensearch.xml" -export CONFIG_NGINX_TEMPLATE="/etc/nginx/http.d/librex.conf" +export CONFIG_NGINX_TEMPLATE="/etc/nginx/http.d/librey.conf" -# Configure 'opensearch.xml' with Librex configuration metadata, such as the encoding and the host that stores the site +# Configure 'opensearch.xml' with librey configuration metadata, such as the encoding and the host that stores the site # These configurations will replace the 'opensearch.xml' inside '.dockers/templates' for the best setup for your instance -export OPEN_SEARCH_TITLE=${OPEN_SEARCH_TITLE:-"LibreX"} +export OPEN_SEARCH_TITLE=${OPEN_SEARCH_TITLE:-"LibreY"} export OPEN_SEARCH_DESCRIPTION=${OPEN_SEARCH_DESCRIPTION:-"Framework and javascript free privacy respecting meta search engine"} export OPEN_SEARCH_ENCODING=${OPEN_SEARCH_ENCODING:-"UTF-8"} -export OPEN_SEARCH_LONG_NAME=${OPEN_SEARCH_LONG_NAME:-"LibreX Search"} +export OPEN_SEARCH_LONG_NAME=${OPEN_SEARCH_LONG_NAME:-"LibreY Search"} export OPEN_SEARCH_HOST=${OPEN_SEARCH_HOST:-"127.0.0.1"} # Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups @@ -27,12 +27,12 @@ export CONFIG_HIDDEN_SERVICE_SEARCH=${CONFIG_HIDDEN_SERVICE_SEARCH:-false} export CONFIG_DISABLE_BITTORRENT_SEARCH=${CONFIG_DISABLE_BITTORRENT_SEARCH:-false} export CONFIG_BITTORRENT_TRACKERS="${CONFIG_BITTORRENT_TRACKERS:-"&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce"}" -# The settings that will be used to handle Wikipedia results displayed on the libreX search page +# The settings that will be used to handle Wikipedia results displayed on the librey search page # the settings below can be edited via environment variables. export CONFIG_WIKIPEDIA_LANGUAGE=${CONFIG_WIKIPEDIA_LANGUAGE:-${CONFIG_GOOGLE_LANGUAGE}} # Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers -# A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librex +# A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librey export APP_INVIDIOUS=${APP_INVIDIOUS:-""} export APP_RIMGO=${APP_RIMGO:-""} export APP_SCRIBE=${APP_SCRIBE:-""} diff --git a/docker/php/php.dockerfile b/docker/php/php.dockerfile index 7c984e4..0441cd7 100644 --- a/docker/php/php.dockerfile +++ b/docker/php/php.dockerfile @@ -1,12 +1,12 @@ # Set this argument during build time to indicate that the path is for php's www.conf ARG WWW_CONFIG="/etc/php8/php-fpm.d/www.conf" -# Configure 'opensearch.xml' with Librex configuration metadata, such as the encoding and the host that stores the site +# Configure 'opensearch.xml' with librey configuration metadata, such as the encoding and the host that stores the site # These configurations will replace the 'opensearch.xml' inside '.dockers/templates' for the best setup for your instance -ENV OPEN_SEARCH_TITLE="LibreX" +ENV OPEN_SEARCH_TITLE="LibreY" ENV OPEN_SEARCH_DESCRIPTION="Framework and javascript free privacy respecting meta search engine" ENV OPEN_SEARCH_ENCODING="UTF-8" -ENV OPEN_SEARCH_LONG_NAME="LibreX search" +ENV OPEN_SEARCH_LONG_NAME="LibreY search" ENV OPEN_SEARCH_HOST="http://127.0.0.1:${NGINX_PORT}" # Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups @@ -20,7 +20,7 @@ ENV CONFIG_DISABLE_BITTORRENT_SEARCH=false ENV CONFIG_BITTORRENT_TRACKERS="&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce" # Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers -# A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librex +# A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librey ENV APP_INVIDIOUS="" ENV APP_RIMGO="" ENV APP_SCRIBE="" diff --git a/docker/server/prepare.sh b/docker/server/prepare.sh index 322beac..5040600 100755 --- a/docker/server/prepare.sh +++ b/docker/server/prepare.sh @@ -11,11 +11,11 @@ export OPEN_SEARCH_HOST_FOR_NGINX="$(echo "${OPEN_SEARCH_HOST}" | cut -d "/" -f # Although not recommended (if you do not know what you are doing), you still have the option to add new substitution file templates using any required environment variables if [[ ! -s ${CONFIG_NGINX_TEMPLATE} ]]; then cp "docker/server/fastcgi.conf" /etc/nginx/fastcgi.conf - cp "docker/server/nginx.conf" /etc/nginx/http.d/librex.conf + cp "docker/server/nginx.conf" /etc/nginx/http.d/librey.conf # To address issues with 'nginx.conf', the following lines will ensure that these configurations remain executable chmod u+x "/etc/nginx/fastcgi.conf" - chmod u+x "/etc/nginx/http.d/librex.conf" + chmod u+x "/etc/nginx/http.d/librey.conf" cat 'docker/server/nginx.conf' | envsubst '${OPEN_SEARCH_HOST_FOR_NGINX}' > ${CONFIG_NGINX_TEMPLATE}; fi diff --git a/donate.php b/donate.php index 6e2915e..d5fcf3a 100644 --- a/donate.php +++ b/donate.php @@ -4,17 +4,19 @@ // Feel free to add your donation options here, but please don't remove mine. ?> - LibreX - Donate + LibreY - Donate

-

Donate to the developer

+

Donate to the original developer of LibreX, a project LibreY tries to improve.

Bitcoin (BTC):

bc1qs43kh6tvhch02dtsp7x7hcrwj8fwe4rzy7lp0h

btc qr code

Monero (XMR):

41dGQr9EwZBfYBY3fibTtJZYfssfRuzJZDSVDeneoVcgckehK3BiLxAV4FvEVJiVqdiW996zvMxhFB8G8ot9nBFqQ84VkuC

xmr qr code +

Donate to the person that forked LibreX into LibreY

+ Click here
diff --git a/index.php b/index.php index 9146e9a..92df811 100644 --- a/index.php +++ b/index.php @@ -1,17 +1,17 @@ - LibreX + LibreY
-

LibreX

+

LibreY

- - + +
diff --git a/instances.json b/instances.json index fa6501b..9e81708 100644 --- a/instances.json +++ b/instances.json @@ -1,136 +1,10 @@ { "instances": [ { - "clearnet": "https://librex.zzls.xyz/", - "tor": "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/", - "i2p": "http://zzlsaymhcfla7vibo3a223bybeecu3bd5z6rmw2u4y76maqeu76q.b32.i2p/", - "country": "CL" - }, - { - "clearnet": "https://librex.me/", - "tor": "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/", - "i2p": "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/", - "country": "CA" - }, - { - "clearnet": "https://s.dyox.in/", - "tor": "http://ddhigxwjz7elcl2erm7qzzukda4qmovoy4cepcueahggpwrpu24mi6qd.onion/", - "i2p": "http://s.dyoxin.i2p/", - "country": "IS" - }, - { - "clearnet": "https://lx.vern.cc/", - "tor": "http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/", - "i2p": "http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/", - "country": "US" - }, - { - "clearnet": "https://search.ahwx.org/", - "tor": "http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/", + "clearnet": "https://search.ahwx.org", + "tor": null, "i2p": null, "country": "NL" }, - { - "clearnet": "https://search.spaceint.fr/", - "tor": "http://6d4nqt2rndvmhogpwrbqfvj2ur6e6nm2r6dzi7ny4wj6ai3j5hnvbhyd.onion/", - "i2p": null, - "country": "FR" - }, - { - "clearnet": "https://search.davidovski.xyz/", - "tor": null, - "i2p": null, - "country": "UK" - }, - { - "clearnet": "https://search.madreyk.xyz/", - "tor": null, - "i2p": null, - "country": "DE" - }, - { - "clearnet": "https://search.pabloferreiro.es/", - "tor": null, - "i2p": null, - "country": "DE" - }, - { - "clearnet": "https://librex.pufe.org/", - "tor": null, - "i2p": null, - "country": "NZ" - }, - { - "clearnet": "https://librex.ratakor.com/", - "tor": null, - "i2p": null, - "country": "FR" - }, - { - "clearnet": "https://search.tildevarsh.in/", - "tor": null, - "i2p": null, - "country": "IN" - }, - { - "clearnet": "https://librex.myroware.eu/", - "tor": null, - "i2p": null, - "country": "DE" - }, - { - "clearnet": "https://librex.bloatcat.tk/", - "tor": null, - "i2p": null, - "country": "IS" - }, - { - "clearnet": "https://librex.retro-hax.net/", - "tor": null, - "i2p": null, - "country": "DE" - }, - { - "clearnet": "https://search.funami.tech/", - "tor": null, - "i2p": null, - "country": "KR" - }, - { - "clearnet": "https://search.zeroish.xyz/", - "tor": null, - "i2p": null, - "country": "US" - }, - { - "clearnet": "https://librex.baczek.me/", - "tor": null, - "i2p": null, - "country": "PL" - }, - { - "clearnet": "https://librex.yogeshlamichhane.com.np/", - "tor": null, - "i2p": null, - "country": "US" - }, - { - "clearnet": "https://lx.benike.monster/", - "tor": null, - "i2p": null, - "country": "DE" - }, - { - "clearnet": "https://librex.nohost.network/", - "tor": null, - "i2p": null, - "country": "MX" - }, - { - "clearnet": "https://search.decentrala.org/", - "tor": null, - "i2p": null, - "country": "US" - } ] } diff --git a/misc/footer.php b/misc/footer.php index 7988e66..9dca1e7 100644 --- a/misc/footer.php +++ b/misc/footer.php @@ -1,6 +1,6 @@