chore(*): renaming the entirity of LibreY

This commit is contained in:
Ahwx 2023-08-02 16:18:21 +02:00
parent 6a71de282c
commit c3b2444eea
16 changed files with 62 additions and 185 deletions

View File

@ -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<femboy.hu>" \
maintainer="Hnhx Femboy<femboy.hu>, Junior L. Botelho<juniorbotelho.com.br>" \
url="https://github.com/hnhx/librex" \
usage="https://github.com/hnhx/librex/wiki" \
authors="https://github.com/hnhx/librex/contributors"
vendor="Ahwx <ahwx.org>" \
maintainer="Ahwx <ahwx.org>" \
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

View File

@ -1,6 +1,8 @@
<h1 align="center">LibreY</h1>
# 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)
<p align="center">
<img src="https://user-images.githubusercontent.com/49120638/215327189-76c54dec-8b19-4faf-8c39-29a61aa3b143.png" width="400">

View File

@ -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

View File

@ -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
```
<br>
@ -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 |
<br>
@ -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 .
```
<br>
### 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.

View File

@ -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:-""}

View File

@ -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=""

View File

@ -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

View File

@ -4,17 +4,19 @@
// Feel free to add your donation options here, but please don't remove mine.
?>
<title>LibreX - Donate</title>
<title>LibreY - Donate</title>
</head>
<body>
<div class="misc-container">
<h1>Donate to the developer</h1>
<h1>Donate to the original developer of LibreX, a project LibreY tries to improve.</h1>
<h2>Bitcoin (BTC):</h2>
<p>bc1qs43kh6tvhch02dtsp7x7hcrwj8fwe4rzy7lp0h</p>
<img src="static/images/btc.png" alt="btc qr code" width="150" height="150"/>
<h2>Monero (XMR):</h2>
<p>41dGQr9EwZBfYBY3fibTtJZYfssfRuzJZDSVDeneoVcgckehK3BiLxAV4FvEVJiVqdiW996zvMxhFB8G8ot9nBFqQ84VkuC</p>
<img src="static/images/xmr.png" alt="xmr qr code" width="150" height="150"/>
<h1>Donate to the person that forked LibreX into LibreY</h1>
<a href="https://ahwx.org/donate.php">Click here</a>
</div>
<?php require "misc/footer.php"; ?>

View File

@ -1,17 +1,17 @@
<?php require "misc/header.php"; ?>
<title>LibreX</title>
<title>LibreY</title>
</head>
<body>
<form class="search-container" action="search.php" method="get" autocomplete="off">
<h1>Libre<span class="X">X</span></h1>
<h1>Libre<span class="Y">Y</span></h1>
<input type="text" name="q" autofocus/>
<input type="hidden" name="p" value="0"/>
<input type="hidden" name="t" value="0"/>
<input type="submit" class="hide"/>
<div class="search-button-wrapper">
<button name="t" value="0" type="submit">Search with LibreX</button>
<button name="t" value="3" type="submit">Search torrents with LibreX</button>
<button name="t" value="0" type="submit">Search with LibreY</button>
<button name="t" value="3" type="submit">Search torrents with LibreY</button>
</div>
</form>

View File

@ -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"
}
]
}

View File

@ -1,6 +1,6 @@
<div class="footer-container">
<a href="./">LibreX</a>
<a href="https://github.com/hnhx/librex/" target="_blank">Source &amp; Instances</a>
<a href="./">LibreY</a>
<a href="https://github.com/Ahwxorg/librey/" target="_blank">Source &amp; Instances</a>
<a href="./settings.php">Settings</a>
<a href="./api.php" target="_blank">API</a>
<a href="./donate.php">Donate ❤️</a>
@ -8,7 +8,7 @@
<div class="git-container">
<?php
$hash = file_get_contents(".git/refs/heads/main");
echo "<a href=\"https://github.com/hnhx/librex/commit/$hash\" target=\"_blank\">Latest commit: $hash</a>";
echo "<a href=\"https://github.com/Ahwxorg/librey/commit/$hash\" target=\"_blank\">Latest commit: $hash</a>";
?>
</div>
</body>

View File

@ -6,7 +6,7 @@
<meta name="description" content="A privacy respecting meta search engine."/>
<meta name="referrer" content="no-referrer"/>
<link rel="stylesheet" type="text/css" href="static/css/styles.css"/>
<link title="LibreX search" type="application/opensearchdescription+xml" href="opensearch.xml?method=POST" rel="search"/>
<link title="LibreY search" type="application/opensearchdescription+xml" href="opensearch.xml?method=POST" rel="search"/>
<link rel="stylesheet" type="text/css" href="<?php
echo "static/css/";
if (isset($_COOKIE["theme"]))

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>LibreX</ShortName>
<ShortName>LibreY</ShortName>
<Description>Framework and javascript free privacy respecting meta search engine</Description>
<InputEncoding>UTF-8</InputEncoding>
<LongName>LibreX search</LongName>
<LongName>LibreY search</LongName>
<Url rel="results" type="text/html" method="get" template="http://localhost:80/search.php?q={searchTerms}" />
<Url type="application/opensearchdescription+xml"
rel="self"

View File

@ -9,7 +9,7 @@
<?php
$query = htmlspecialchars(trim($_REQUEST["q"]));
echo $query;
?> - LibreX</title>
?> - LibreY</title>
</head>
<body>
<form class="sub-search-container" method="get" autocomplete="off">

View File

@ -39,7 +39,7 @@
require "misc/header.php";
?>
<title>LibreX - Settings</title>
<title>LibreY - Settings</title>
</head>
<body>
<div class="misc-container">

View File

@ -325,7 +325,7 @@ a[title] {
display: none;
}
.X {
.Y {
color: #bd93f9;
}