diff --git a/Dockerfile b/Dockerfile index 306dea0d..432a6b11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 WORKDIR "/var/www/html" @@ -19,7 +19,7 @@ LABEL name="LibreY" \ ARG DOCKER_SCRIPTS="docker" ARG NGINX_PORT=8080 # Set this argument during build time to indicate that the path is for php's www.conf -ARG WWW_CONFIG="/etc/php82/php-fpm.d/www.conf" +ARG WWW_CONFIG="/etc/php83/php-fpm.d/www.conf" # Customize the environment during both execution and build time by modifying the environment variables added to the container's shell # When building your image, make sure to set the 'TZ' environment variable to your desired time zone location, for example 'America/Sao_Paulo' @@ -27,11 +27,11 @@ ARG WWW_CONFIG="/etc/php82/php-fpm.d/www.conf" ENV TZ="America/New_York" # Install required packages -RUN apk add gettext php82 php82-fpm php82-dom php82-curl php82-json php82-apcu nginx --no-cache +RUN apk add gettext php83 php83-fpm php83-dom php83-curl php83-json php83-pecl-apcu nginx --no-cache # Configure PHP-FPM to listen on a Unix socket instead of a TCP port, which is more secure and efficient -RUN touch /run/php-fpm82.sock && chown nginx:nginx "/run/php-fpm82.sock" -RUN sed -i 's/^\s*listen = 127.0.0.1:9000/listen = \/run\/php-fpm82.sock/' ${WWW_CONFIG} &&\ +RUN touch /run/php-fpm83.sock && chown nginx:nginx "/run/php-fpm83.sock" +RUN sed -i 's/^\s*listen = 127.0.0.1:9000/listen = \/run\/php-fpm83.sock/' ${WWW_CONFIG} &&\ sed -i 's/^\s*;\s*listen.owner = nobody/listen.owner = nginx/' ${WWW_CONFIG} &&\ sed -i 's/^\s*;\s*listen.group = nobody/listen.group = nginx/' ${WWW_CONFIG} &&\ sed -i 's/^\s*;\s*listen.mode = 0660/listen.mode = 0660/' ${WWW_CONFIG} @@ -39,4 +39,4 @@ RUN sed -i 's/^\s*listen = 127.0.0.1:9000/listen = \/run\/php-fpm82.sock/' ${WWW EXPOSE ${NGINX_PORT} # Configures the container to be run as an executable. -ENTRYPOINT ["/bin/sh", "-c", "docker/entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/bin/sh", "-c", "docker/entrypoint.sh"] diff --git a/README.md b/README.md index 48b45572..ab31260b 100644 --- a/README.md +++ b/README.md @@ -23,15 +23,23 @@ You can find a list of instances on any LibreY instance by accessing /instances. Alternatively look at `instances.json` where the list is generated from.

While the official instances may be more updated and have better uptime, please consider using another person's instances as these are heavily overloaded.
Support the community. ❤️

-[@Ahwxorg](https://github.com/Ahwxorg)'s instances:
+[@Ahwxorg](https://github.com/Ahwxorg)'s instance:
[search.ahwx.org](https://search.ahwx.org/instances.php)
[Tor](http://wn5jl6fxlzzfenlyu3lc4q7jpw2saplrywxvxtvqbguotwd4y5cjeuqd.onion/instances.php)
-[search2.ahwx.org](https://search.ahwx.org/instances.php)
+[search2.ahwx.org](https://search2.ahwx.org/instances.php)
[Tor](http://hyy7rcvknwb22v4nnoar635wntiwr4uwzhiuyimemyl4fz6k7tahj5id.onion/instances.php)
+[search3.ahwx.org](https://search3.ahwx.org/instances.php)
+[Tor](http://r7nesn6dnp2fssinw7n5uj4ob2na6g4jppakpjgioxb6v4ca4bbsqoyd.onion/instances.php)

[@davidovski](https://github.com/davidovski)'s instance:
[search.davidovski.xyz](https://search.davidovski.xyz/instances.php)

+[@codedipper](https://github.com/codedipper)'s instance:
+[librex.me](https://librex.me/instances.php)
+[librex.revvy.de](https://librex.revvy.de/instances.php)
+[Tor](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/instances.php)
+[I2P](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/instances.php)
+
### About LibreY diff --git a/config.php.example b/config.php.example index 4fa21175..0f89687c 100644 --- a/config.php.example +++ b/config.php.example @@ -127,7 +127,6 @@ "preferred_engines" => array( - /* search engine to use to search, auto will automatically balance between all scrapers, which is recommended. */ "text" => "auto" // "text" => "google" diff --git a/docker-compose.yml b/docker-compose.yml index dfc96f2e..66ef0eb5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: - CURLOPT_FOLLOWLOCATION=true volumes: - ./nginx_logs:/var/log/nginx - - ./php_logs:/var/log/php7 + - ./php_logs:/var/log/php83 restart: unless-stopped watchtower: # Watchtower is not required but highly recommended, since Watchtower will re-pull and restart the LibreY container automatically whenever there's an update. image: containrrr/watchtower diff --git a/docker/README.md b/docker/README.md index ef88c279..12c86896 100644 --- a/docker/README.md +++ b/docker/README.md @@ -74,7 +74,7 @@ services: - CURLOPT_FOLLOWLOCATION=true volumes: - ./nginx_logs:/var/log/nginx - - ./php_logs:/var/log/php7 + - ./php_logs:/var/log/php83 restart: unless-stopped watchtower: # Watchtower is not required but highly recommended, since Watchtower will re-pull and restart the LibreY container automatically whenever there's an update. image: containrrr/watchtower @@ -105,6 +105,7 @@ This docker image was developed with high configurability in mind, so here is th | CONFIG_RATE_LIMIT_COOLDOWN | 25 | integer | Time in minutes to wait before sending requests to Google again after a rate limit. | | CONFIG_CACHE_TIME | 20 | integer | Time in minutes to store results for in the cache. | | CONFIG_DISABLE_API | false | boolean | Disable requests to /api.php | +| CONFIG_SHOW_RESULT_SOURCE | true | boolean | Whether to show where the result is from on the results page | ### Frontends | Variables | Default | Examples | Description | @@ -127,7 +128,7 @@ This docker image was developed with high configurability in mind, so here is th ### Engines | Variables | Default | Examples | Description | |:----------|:-------------|:---------|:------| -| CONFIG_TEXT_SEARCH_ENGINE | "google" | "google", "duckduckgo" | Integration with external self-hosted apps, configure the desired host. | +| CONFIG_TEXT_SEARCH_ENGINE | "auto" | "brave", "duckduckgo", "ecosia", "google", "mojeek", "yandex" | Use a specific search engine, or "auto" to use any available search engine. | ### cURL | Variables | Default | Examples | Description | diff --git a/docker/attributes.sh b/docker/attributes.sh index 491513e8..b0f4a8ae 100755 --- a/docker/attributes.sh +++ b/docker/attributes.sh @@ -30,6 +30,7 @@ export CONFIG_INSTANCE_FALLBACK="${CONFIG_INSTANCE_FALLBACK:-true}" export CONFIG_RATE_LIMIT_COOLDOWN="${CONFIG_RATE_LIMIT_COOLDOWN:-25}" export CONFIG_CACHE_TIME="${CONFIG_CACHE_TIME:-20}" export CONFIG_DISABLE_API="${CONFIG_DISABLE_API:-false}" +export CONFIG_SHOW_RESULT_SOURCE="${CONFIG_SHOW_RESULT_SOURCE:-true}" # 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 librey @@ -48,7 +49,7 @@ export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""} export APP_SUDS=${APP_SUDS:-""} export APP_BIBLIOREADS=${APP_BIBLIOREADS:-""} -export CONFIG_TEXT_SEARCH_ENGINE=${CONFIG_TEXT_SEARCH_ENGINE:-"google"} +export CONFIG_TEXT_SEARCH_ENGINE=${CONFIG_TEXT_SEARCH_ENGINE:-"auto"} # GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests # Generally, a proxy is needed when your IP address is blocked by search engines in response to multiple requests within a short time frame. In these cases, it is recommended to use rotating proxies diff --git a/docker/config.php b/docker/config.php index 3eb1370d..82039b20 100644 --- a/docker/config.php +++ b/docker/config.php @@ -12,6 +12,7 @@ "request_cooldown" => ${CONFIG_RATE_LIMIT_COOLDOWN}, "cache_time" => ${CONFIG_CACHE_TIME}, "disable_api" => ${CONFIG_DISABLE_API}, + "show_result_source" => ${CONFIG_SHOW_RESULT_SOURCE}, "frontends" => array( "invidious" => array( diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 56078edb..f035abb1 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,6 +2,6 @@ /bin/sh -c docker/env-substitution.sh -/bin/sh -c /usr/sbin/php-fpm82 +/bin/sh -c /usr/sbin/php-fpm83 exec nginx -g "daemon off;" diff --git a/docker/nginx.conf b/docker/nginx.conf index 29014776..00cc0f90 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -14,7 +14,7 @@ server { } location ~ \.php$ { - fastcgi_pass unix:/run/php-fpm82.sock; + fastcgi_pass unix:/run/php-fpm83.sock; fastcgi_index index.php; include fastcgi.conf; } diff --git a/instances.json b/instances.json index 310da80a..5cc4cca4 100644 --- a/instances.json +++ b/instances.json @@ -14,7 +14,7 @@ "country": "FR", "librey": true }, - { + { "clearnet": "https://search3.ahwx.org/", "tor": "http://r7nesn6dnp2fssinw7n5uj4ob2na6g4jppakpjgioxb6v4ca4bbsqoyd.onion/", "i2p": null, @@ -22,27 +22,13 @@ "librey": true }, { - "clearnet": "https://glass.prpl.wtf", - "tor": null, - "i2p": null, - "country": "GB", - "librey": true + "clearnet": "https://ly.owo.si/", + "tor": "http://ly.pk47sgwhncn5cgidm7bofngmh7lc7ukjdpk5bjwfemmyp27ovl25ikyd.onion/", + "i2p": "http://d4vi3tvfui2rfzsxr33tin4a6542heulf4mhkokdpbhbcejlg3la.b32.i2p/", + "country": "DE", + "librey": true }, { - "clearnet": "https://ly.owo.si/", - "tor": "http://ly.pk47sgwhncn5cgidm7bofngmh7lc7ukjdpk5bjwfemmyp27ovl25ikyd.onion/", - "i2p": "http://d4vi3tvfui2rfzsxr33tin4a6542heulf4mhkokdpbhbcejlg3la.b32.i2p/", - "country": "DE", - "librey": true - }, - { - "clearnet": "https://librey.danyaal.xyz/", - "tor": "http://libreytvcxak42f3p7nxh3filsp2pjqesjii5f5e4eivs2gpcn77tdid.onion/", - "i2p": "http://libreyqmoa2iuihoyyscolhaymrxxgdrmkgmiufnyaukwub2c7ya.b32.i2p/", - "country": "GB", - "librey": true - }, - { "clearnet": "https://librey.org/", "tor": "http://jxhkfulu6wpdl4apuy4dyivuowmpprvsd7e3el2z73crq7fmyv7rjkyd.onion/", "i2p": null, @@ -56,6 +42,13 @@ "country": "GB", "librey": true }, + { + "clearnet": "https://glass.prpl.wtf", + "tor": null, + "i2p": null, + "country": "GB", + "librey": true + }, { "clearnet": "https://librex.uk.to/", "tor": null, @@ -64,7 +57,7 @@ "librey": true }, { - "clearnet": "https://librex.ix.tc/", + "clearnet": "https://librey.ix.tc/", "tor": null, "i2p": null, "country": "GB", @@ -99,35 +92,28 @@ "librey": true }, { - "clearnet": "https://search.ratakor.com/", - "tor": null, - "i2p": null, - "country": "FR", - "librey": true - }, - { - "clearnet": "https://librex.yogeshlamichhane.com.np/", + "clearnet": "https://librey.baczek.me/", "tor": null, "i2p": null, - "country": "FI", + "country": "PL", "librey": true }, { - "clearnet": "https://librey.baczek.me/", + "clearnet": "https://lx.benike.me/", "tor": null, "i2p": null, - "country": "PL", + "country": "DE", "librey": true }, { - "clearnet": "https://lx.benike.me/", + "clearnet": "https://search.seitan-ayoub.lol/", "tor": null, "i2p": null, "country": "DE", "librey": true }, { - "clearnet": "https://search.seitan-ayoub.lol/", + "clearnet": "https://librey.myroware.net/", "tor": null, "i2p": null, "country": "DE", @@ -145,21 +131,14 @@ "tor": null, "i2p": null, "country": "US", - "librey": false - }, - { - "clearnet": "https://librex.baczek.me/", - "tor": null, - "i2p": null, - "country": "PL", - "librey": false + "librey": true }, { - "clearnet": "https://librey.myroware.net/", + "clearnet": "https://search.zeroish.xyz/", "tor": null, "i2p": null, - "country": "DE", - "librey": false + "country": "US", + "librey": true } ] } diff --git a/locale/sv.php b/locale/sv.php index f0d5c40a..573f50d0 100644 --- a/locale/sv.php +++ b/locale/sv.php @@ -18,6 +18,7 @@ "category_videos" => "Videor", "category_torrents" => "Torrents", "category_tor" => "Tor", + "category_maps" => "Maps", // TRANSLATE "feature_disabled" => "Funktionen är inaktiverad av serverägaren :C", @@ -31,6 +32,8 @@ "settings_search_settings" => "Sökinställningar", "settings_language" => "Språk", + "settings_preferred_engine" => "Preferred Engine", // TRANSLATE + "settings_number_of_results" => "Antal resultat per sida", @@ -47,7 +50,9 @@ "donate_original_developer" => "Donera till orginalutvecklaren av %s, ett projekt som LibreY försöker förbättra.", - "donate_fork" => "Donera till personen som forkade %s till LibreY" + "donate_fork" => "Donera till personen som forkade %s till LibreY", + + "api_unavailable" => "This LibreY API is unavailable at the moment" // TRANSLATE ); ?>