mirror of
https://github.com/hnhx/librex.git
synced 2025-04-29 14:09:27 -04:00
commit
ffd6d56035
17 changed files with 246 additions and 106 deletions
14
Dockerfile
14
Dockerfile
|
@ -1,6 +1,6 @@
|
||||||
# syntax = edrevo/dockerfile-plus
|
# syntax = edrevo/dockerfile-plus
|
||||||
ARG VERSION="3.17"
|
ARG VERSION="3.17"
|
||||||
FROM alpine:${VERSION} AS runner
|
FROM alpine:${VERSION} AS librex
|
||||||
WORKDIR "/var/www/html"
|
WORKDIR "/var/www/html"
|
||||||
|
|
||||||
# Docker metadata contains information about the maintainer, such as the name, repository, and support email
|
# Docker metadata contains information about the maintainer, such as the name, repository, and support email
|
||||||
|
@ -25,6 +25,12 @@ ARG NGINX_PORT=8080
|
||||||
# See more: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
# See more: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
||||||
ENV TZ="America/New_York"
|
ENV TZ="America/New_York"
|
||||||
|
|
||||||
|
RUN apk add gettext --no-cache
|
||||||
|
|
||||||
|
# The following lines import all Dockerfiles from other folders so that they can be built together in the final build
|
||||||
|
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 Librex container
|
||||||
ADD "." "/var/www/html"
|
ADD "." "/var/www/html"
|
||||||
|
|
||||||
|
@ -34,12 +40,6 @@ RUN chmod u+x "${DOCKER_SCRIPTS}/php/prepare.sh" &&\
|
||||||
chmod u+x "${DOCKER_SCRIPTS}/entrypoint.sh" &&\
|
chmod u+x "${DOCKER_SCRIPTS}/entrypoint.sh" &&\
|
||||||
chmod u+x "${DOCKER_SCRIPTS}/attributes.sh"
|
chmod u+x "${DOCKER_SCRIPTS}/attributes.sh"
|
||||||
|
|
||||||
RUN apk add gettext --no-cache
|
|
||||||
|
|
||||||
# The following lines import all Dockerfiles from other folders so that they can be built together in the final build
|
|
||||||
INCLUDE+ docker/php/php.dockerfile
|
|
||||||
INCLUDE+ docker/server/nginx.dockerfile
|
|
||||||
|
|
||||||
EXPOSE ${NGINX_PORT}
|
EXPOSE ${NGINX_PORT}
|
||||||
|
|
||||||
# Configures the container to be run as an executable.
|
# Configures the container to be run as an executable.
|
||||||
|
|
11
README.md
11
README.md
|
@ -13,26 +13,27 @@
|
||||||
|
|
||||||
| Clearnet | TOR | I2P | Country |
|
| Clearnet | TOR | I2P | Country |
|
||||||
|-|-|-|-|
|
|-|-|-|-|
|
||||||
| [search.femboy.hu](https://search.femboy.hu/) | [✅](http://search.cepyxplublbyw2f4axy4pyztfbxmf63lrt2c7uwv6wl4iixz53czload.onion/) | ❌ | 🇭🇺 HU (OFFICIAL INSTANCE) |
|
|
||||||
| [lx.vern.cc](https://lx.vern.cc/) | [✅](http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/) | [✅](http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/) | 🇺🇸 US |
|
| [lx.vern.cc](https://lx.vern.cc/) | [✅](http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/) | [✅](http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/) | 🇺🇸 US |
|
||||||
| [librex.sesu.cc](https://librex.sesu.cc/) | [✅](http://librex.swxoebbpeqiiixyhbuh3vbw53pdrmtbiaj2sqveol6kkn5rpapfi4aad.onion/) | [✅](http://lqbchqljxiwl3bbjt4vqe76luovk5ly6khqhg7mt5qcqfn6e4sbq.b32.i2p/) | 🇨🇱 CL |
|
|
||||||
| [librex.zzls.xyz](https://librex.zzls.xyz/) | [✅](http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/) | [✅](http://7huurwog32tny663wkglrhozfoyqyqmsuxjbd7dtudccx44awjda.b32.i2p) | 🇨🇱 CL |
|
| [librex.zzls.xyz](https://librex.zzls.xyz/) | [✅](http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/) | [✅](http://7huurwog32tny663wkglrhozfoyqyqmsuxjbd7dtudccx44awjda.b32.i2p) | 🇨🇱 CL |
|
||||||
|
| [librex.revvy.de](https://librex.revvy.de/) | [✅](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/) | [✅](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/) | 🇨🇦 CA |
|
||||||
| [librex.mikata.ru](https://librex.mikata.ru/) | [✅](http://f7ssz7l3biu4fugwctfpcx4txg5yq4gqhrt473ledsuc3ivtd3omniid.onion/) | ❌ | 🇺🇸 US |
|
| [librex.mikata.ru](https://librex.mikata.ru/) | [✅](http://f7ssz7l3biu4fugwctfpcx4txg5yq4gqhrt473ledsuc3ivtd3omniid.onion/) | ❌ | 🇺🇸 US |
|
||||||
| [search.milivojevic.in.rs](https://search.milivojevic.in.rs/) | [✅](http://librex2xsek6qnh2i4yufuzqjumfdwtw7io7omgmimpzna6llqudqzyd.onion/) | ❌ | 🇳🇱 NL |
|
| [search.milivojevic.in.rs](https://search.milivojevic.in.rs/) | [✅](http://librex2xsek6qnh2i4yufuzqjumfdwtw7io7omgmimpzna6llqudqzyd.onion/) | ❌ | 🇳🇱 NL |
|
||||||
|
| [search.ahwx.org](https://search.ahwx.org/) | [✅](http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/) | ❌ | 🇳🇱 NL |
|
||||||
| [search.davidovski.xyz](https://search.davidovski.xyz/) | ❌ | ❌ | 🇬🇧 UK |
|
| [search.davidovski.xyz](https://search.davidovski.xyz/) | ❌ | ❌ | 🇬🇧 UK |
|
||||||
| [search.madreyk.xyz](https://search.madreyk.xyz/) | ❌ | ❌ | 🇩🇪 DE |
|
| [search.madreyk.xyz](https://search.madreyk.xyz/) | ❌ | ❌ | 🇩🇪 DE |
|
||||||
| [search.pabloferreiro.es](https://search.pabloferreiro.es/) | ❌ | ❌ | 🇩🇪 DE |
|
| [search.pabloferreiro.es](https://search.pabloferreiro.es/) | ❌ | ❌ | 🇩🇪 DE |
|
||||||
| [buscar.weblibre.org](https://buscar.weblibre.org/) | ❌ | ❌ | 🇨🇱 CL |
|
|
||||||
| [search.ahwx.org](https://search.ahwx.org/) | ❌ | ❌ | 🇳🇱 NL |
|
|
||||||
| [librex.pufe.org](https://librex.pufe.org/) | ❌ | ❌ | :new_zealand: NZ |
|
| [librex.pufe.org](https://librex.pufe.org/) | ❌ | ❌ | :new_zealand: NZ |
|
||||||
| [librex.ratakor.com](https://librex.ratakor.com/) | ❌ | ❌ | 🇫🇷 FR |
|
| [librex.ratakor.com](https://librex.ratakor.com/) | ❌ | ❌ | 🇫🇷 FR |
|
||||||
| [search.tildevarsh.in](https://search.tildevarsh.in/) | ❌ | ❌ | 🇮🇳 IN |
|
| [search.tildevarsh.in](https://search.tildevarsh.in/) | ❌ | ❌ | 🇮🇳 IN |
|
||||||
| [librex.myroware.eu](https://librex.myroware.eu/) | ❌ | ❌ | 🇩🇪 DE |
|
| [librex.myroware.eu](https://librex.myroware.eu/) | ❌ | ❌ | 🇩🇪 DE |
|
||||||
| [lx.drain.win](https://lx.drain.win/) | ❌ | ❌ | 🇸🇬 SG |
|
|
||||||
| [librex.bloatcat.tk](https://librex.bloatcat.tk/) | ❌ | ❌ | 🇮🇸 IS |
|
| [librex.bloatcat.tk](https://librex.bloatcat.tk/) | ❌ | ❌ | 🇮🇸 IS |
|
||||||
| [librex.retro-hax.net](https://librex.retro-hax.net/) | ❌ | ❌ | 🇩🇪 DE |
|
| [librex.retro-hax.net](https://librex.retro-hax.net/) | ❌ | ❌ | 🇩🇪 DE |
|
||||||
| [search.funami.tech](https://search.funami.tech/) | ❌ | ❌ | 🇰🇷 KR |
|
| [search.funami.tech](https://search.funami.tech/) | ❌ | ❌ | 🇰🇷 KR |
|
||||||
| [search.zeroish.xyz](https://search.zeroish.xyz/) | ❌| ❌ | 🇺🇸 US |
|
| [search.zeroish.xyz](https://search.zeroish.xyz/) | ❌| ❌ | 🇺🇸 US |
|
||||||
|
| [librex.baczek.me](https://librex.baczek.me/) | ❌| ❌ | 🇵🇱 PL |
|
||||||
|
| [librex.yogeshlamichhane.com.np](https://librex.yogeshlamichhane.com.np/) | ❌| ❌ | 🇺🇸 US |
|
||||||
|
| [search.spaceint.fr](https://search.spaceint.fr/) | ❌ | ❌ | 🇩🇪 DE |
|
||||||
|
| [lx.benike.monster](https://lx.benike.monster/) | ❌ | ❌ | 🇩🇪 DE |
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
### Thanks rms
|
### Thanks rms
|
||||||
|
|
|
@ -7,15 +7,16 @@
|
||||||
// Google results will be in this language
|
// Google results will be in this language
|
||||||
"google_language_site" => "",
|
"google_language_site" => "",
|
||||||
"google_language_results" => "",
|
"google_language_results" => "",
|
||||||
|
"google_number_of_results" => 10,
|
||||||
|
|
||||||
// You can set a language for results in wikipedia
|
// You can set a language for results in wikipedia
|
||||||
"wikipedia_language" => "en",
|
"wikipedia_language" => "en",
|
||||||
|
|
||||||
// You can use any Invidious instance here
|
// You can use any Invidious instance here
|
||||||
"invidious_instance_for_video_results" => "https://invidious.namazso.eu",
|
"invidious_instance_for_video_results" => "https://invidious.snopyta.org",
|
||||||
|
|
||||||
"disable_bittorent_search" => false,
|
"disable_bittorent_search" => false,
|
||||||
"bittorent_trackers" => "&tr=http%3A%2F%2Fnyaa.tracker.wf%3A7777%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce",
|
"bittorent_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",
|
||||||
|
|
||||||
"disable_hidden_service_search" => false,
|
"disable_hidden_service_search" => false,
|
||||||
|
|
||||||
|
@ -31,12 +32,6 @@
|
||||||
"original_name" => "YouTube",
|
"original_name" => "YouTube",
|
||||||
"original_url" => "youtube.com"
|
"original_url" => "youtube.com"
|
||||||
),
|
),
|
||||||
"bibliogram" => array(
|
|
||||||
"instance_url" => "",
|
|
||||||
"project_url" => "https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md",
|
|
||||||
"original_name" => "Instagram",
|
|
||||||
"original_url" => "instagram.com"
|
|
||||||
),
|
|
||||||
"rimgo" => array(
|
"rimgo" => array(
|
||||||
"instance_url" => "",
|
"instance_url" => "",
|
||||||
"project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances",
|
"project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances",
|
||||||
|
@ -110,6 +105,12 @@
|
||||||
"project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances",
|
"project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances",
|
||||||
"original_name" => "StackOverflow",
|
"original_name" => "StackOverflow",
|
||||||
"original_url" => "stackoverflow.com"
|
"original_url" => "stackoverflow.com"
|
||||||
|
),
|
||||||
|
"suds" => array(
|
||||||
|
"instance_url" => "",
|
||||||
|
"project_url" => "https://git.vern.cc/cobra/Suds/src/branch/main/instances.json",
|
||||||
|
"original_name" => "Snopes",
|
||||||
|
"original_url" => "snopes.com"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -132,7 +133,7 @@
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
CURLOPT_ENCODING => "",
|
CURLOPT_ENCODING => "",
|
||||||
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
||||||
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
|
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_WHATEVER,
|
||||||
CURLOPT_CUSTOMREQUEST => "GET",
|
CURLOPT_CUSTOMREQUEST => "GET",
|
||||||
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
||||||
CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
||||||
|
|
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
version: "2.1"
|
||||||
|
services:
|
||||||
|
librex:
|
||||||
|
image: librex/librex:latest
|
||||||
|
container_name: librex
|
||||||
|
network_mode: bridge
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- VERSION=docker
|
||||||
|
- TZ=America/New_York
|
||||||
|
- CONFIG_GOOGLE_DOMAIN=com
|
||||||
|
- CONFIG_GOOGLE_LANGUAGE_SITE=en
|
||||||
|
- CONFIG_GOOGLE_LANGUAGE_RESULTS=en
|
||||||
|
- CONFIG_WIKIPEDIA_LANGUAGE=en
|
||||||
|
volumes:
|
||||||
|
- ./nginx_logs:/var/log/nginx
|
||||||
|
- ./php_logs:/var/log/php7
|
||||||
|
restart: unless-stopped
|
|
@ -107,7 +107,6 @@ This docker image was developed with high configurability in mind, so here is th
|
||||||
| Variables | Default | Examples | Description |
|
| Variables | Default | Examples | Description |
|
||||||
|:----------|:-------------|:---------|:------|
|
|:----------|:-------------|:---------|:------|
|
||||||
| APP_INVIDIOUS | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
| APP_INVIDIOUS | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
| APP_BIBLIOGRAM | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
|
||||||
| APP_RIMGO | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
| APP_RIMGO | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
| APP_SCRIBE | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
| APP_SCRIBE | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
| APP_LIBRARIAN | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
| APP_LIBRARIAN | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
|
@ -120,6 +119,7 @@ This docker image was developed with high configurability in mind, so here is th
|
||||||
| APP_LIBREMDB | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
| APP_LIBREMDB | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
| APP_BREEZEWIKI | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
| APP_BREEZEWIKI | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
| APP_ANONYMOUS_OVERFLOW | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
| APP_ANONYMOUS_OVERFLOW | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
|
| APP_SUDS | "" | string | Integration with external self-hosted apps, configure the desired host. |
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,13 @@ 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
|
# Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups
|
||||||
# These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases
|
# These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases
|
||||||
export CONFIG_GOOGLE_DOMAIN=${CONFIG_GOOGLE_DOMAIN:-"com"}
|
export CONFIG_GOOGLE_DOMAIN="${CONFIG_GOOGLE_DOMAIN:-"com"}"
|
||||||
export CONFIG_GOOGLE_LANGUAGE=${CONFIG_GOOGLE_LANGUAGE:-"en"}
|
export CONFIG_GOOGLE_LANGUAGE_SITE="${CONFIG_GOOGLE_LANGUAGE_SITE:-"en"}"
|
||||||
export CONFIG_INVIDIOUS_INSTANCE=${CONFIG_INVIDIOUS_INSTANCE:-"invidious.namazso.eu"}
|
export CONFIG_GOOGLE_LANGUAGE_RESULTS="${CONFIG_GOOGLE_LANGUAGE_RESULTS:-"en"}"
|
||||||
|
export CONFIG_INVIDIOUS_INSTANCE="${CONFIG_INVIDIOUS_INSTANCE:-"invidious.snopyta.org"}"
|
||||||
export CONFIG_HIDDEN_SERVICE_SEARCH=${CONFIG_HIDDEN_SERVICE_SEARCH:-false}
|
export CONFIG_HIDDEN_SERVICE_SEARCH=${CONFIG_HIDDEN_SERVICE_SEARCH:-false}
|
||||||
export CONFIG_DISABLE_BITTORRENT_SEARCH=${CONFIG_DISABLE_BITTORRENT_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"}
|
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 libreX search page
|
||||||
# the settings below can be edited via environment variables.
|
# the settings below can be edited via environment variables.
|
||||||
|
@ -33,7 +34,6 @@ export CONFIG_WIKIPEDIA_LANGUAGE=${CONFIG_WIKIPEDIA_LANGUAGE:-${CONFIG_GOOGLE_LA
|
||||||
# Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers
|
# 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 librex
|
||||||
export APP_INVIDIOUS=${APP_INVIDIOUS:-""}
|
export APP_INVIDIOUS=${APP_INVIDIOUS:-""}
|
||||||
export APP_BIBLIOGRAM=${APP_BIBLIOGRAM:-""}
|
|
||||||
export APP_RIMGO=${APP_RIMGO:-""}
|
export APP_RIMGO=${APP_RIMGO:-""}
|
||||||
export APP_SCRIBE=${APP_SCRIBE:-""}
|
export APP_SCRIBE=${APP_SCRIBE:-""}
|
||||||
export APP_LIBRARIAN=${APP_LIBRARIAN:-""}
|
export APP_LIBRARIAN=${APP_LIBRARIAN:-""}
|
||||||
|
@ -46,6 +46,7 @@ export APP_QUETRE=${APP_QUETRE:-""}
|
||||||
export APP_LIBREMDB=${APP_LIBREMDB:-""}
|
export APP_LIBREMDB=${APP_LIBREMDB:-""}
|
||||||
export APP_BREEZEWIKI=${APP_BREEZEWIKI:-""}
|
export APP_BREEZEWIKI=${APP_BREEZEWIKI:-""}
|
||||||
export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""}
|
export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""}
|
||||||
|
export APP_SUDS=${APP_SUDS:-""}
|
||||||
|
|
||||||
# GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests
|
# 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
|
# 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
|
||||||
|
@ -53,11 +54,11 @@ export CURLOPT_PROXY_ENABLED=${CURLOPT_PROXY_ENABLED:-false}
|
||||||
export CURLOPT_PROXY=${CURLOPT_PROXY:-""}
|
export CURLOPT_PROXY=${CURLOPT_PROXY:-""}
|
||||||
export CURLOPT_RETURNTRANSFER=${CURLOPT_RETURNTRANSFER:-true}
|
export CURLOPT_RETURNTRANSFER=${CURLOPT_RETURNTRANSFER:-true}
|
||||||
export CURLOPT_ENCODING=${CURLOPT_ENCODING:-""}
|
export CURLOPT_ENCODING=${CURLOPT_ENCODING:-""}
|
||||||
export CURLOPT_USERAGENT=${CURLOPT_USERAGENT:-"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"}
|
export CURLOPT_USERAGENT="${CURLOPT_USERAGENT:-"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"}"
|
||||||
export CURLOPT_CUSTOMREQUEST=${CURLOPT_CUSTOMREQUEST:-"GET"}
|
export CURLOPT_CUSTOMREQUEST="${CURLOPT_CUSTOMREQUEST:-"GET"}"
|
||||||
export CURLOPT_MAXREDIRS=${CURLOPT_MAXREDIRS:-5}
|
export CURLOPT_MAXREDIRS=${CURLOPT_MAXREDIRS:-5}
|
||||||
export CURLOPT_TIMEOUT=${CURLOPT_TIMEOUT:-18}
|
export CURLOPT_TIMEOUT=${CURLOPT_TIMEOUT:-18}
|
||||||
export CURLOPT_VERBOSE=${CURLOPT_VERBOSE:-false}
|
export CURLOPT_VERBOSE=${CURLOPT_VERBOSE:-true}
|
||||||
|
|
||||||
# These shell functions will be available for use by any function calls
|
# These shell functions will be available for use by any function calls
|
||||||
function AwkTrim() { awk '{$1=$1};1'; }
|
function AwkTrim() { awk '{$1=$1};1'; }
|
||||||
|
|
|
@ -1,37 +1,113 @@
|
||||||
<?php
|
<?php
|
||||||
return (object) array(
|
return (object) array(
|
||||||
"google_domain" => "${CONFIG_GOOGLE_DOMAIN}",
|
"google_domain" => "${CONFIG_GOOGLE_DOMAIN}",
|
||||||
"google_language" => "${CONFIG_GOOGLE_LANGUAGE}",
|
"google_language_site" => "${CONFIG_GOOGLE_LANGUAGE_SITE}",
|
||||||
"invidious_instance_for_video_results" => "${CONFIG_INVIDIOUS_INSTANCE}",
|
"google_language_results" => "${CONFIG_GOOGLE_LANGUAGE_RESULTS}",
|
||||||
|
|
||||||
"wikipedia_language" => "${CONFIG_WIKIPEDIA_LANGUAGE}",
|
"wikipedia_language" => "${CONFIG_WIKIPEDIA_LANGUAGE}",
|
||||||
|
"invidious_instance_for_video_results" => "${CONFIG_INVIDIOUS_INSTANCE}",
|
||||||
|
|
||||||
"disable_bittorent_search" => ${CONFIG_DISABLE_BITTORRENT_SEARCH},
|
"disable_bittorent_search" => ${CONFIG_DISABLE_BITTORRENT_SEARCH},
|
||||||
"bittorent_trackers" => "${CONFIG_BITTORRENT_TRACKERS}",
|
"bittorent_trackers" => "${CONFIG_BITTORRENT_TRACKERS}",
|
||||||
"disable_hidden_service_search" => ${CONFIG_HIDDEN_SERVICE_SEARCH},
|
"disable_hidden_service_search" => ${CONFIG_HIDDEN_SERVICE_SEARCH},
|
||||||
|
|
||||||
"invidious" => "${APP_INVIDIOUS}", // youtube
|
"frontends" => array(
|
||||||
"bibliogram" => "${APP_BIBLIOGRAM}", // instagram
|
"invidious" => array(
|
||||||
"rimgo" => "${APP_RIMGO}", // imgur
|
"instance_url" => "${APP_INVIDIOUS}",
|
||||||
"scribe" => "${APP_SCRIBE}", // medium
|
"project_url" => "https://docs.invidious.io/instances/",
|
||||||
"librarian" => "${APP_LIBRARIAN}", // odysee
|
"original_name" => "YouTube",
|
||||||
"gothub" => "${APP_GOTHUB}", // github
|
"original_url" => "youtube.com"
|
||||||
"nitter" => "${APP_NITTER}", // twitter
|
),
|
||||||
"libreddit" => "${APP_LIBREREDDIT}", // reddit
|
"rimgo" => array(
|
||||||
"proxitok" => "${APP_PROXITOK}", // tiktok
|
"instance_url" => "${APP_RIMGO}",
|
||||||
"wikiless" => "${APP_WIKILESS}", // wikipedia
|
"project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances",
|
||||||
"quetre" => "${APP_QUETRE}", // quora
|
"original_name" => "Imgur",
|
||||||
"libremdb" => "${APP_LIBREMDB}", // imdb,
|
"original_url" => "imgur.com"
|
||||||
"breezewiki" => "${APP_BREEZEWIKI}", // fandom,
|
),
|
||||||
"anonymousoverflow" => "${APP_ANONYMOUS_OVERFLOW}", // stackoverflow
|
"scribe" => array(
|
||||||
|
"instance_url" => "${APP_SCRIBE}",
|
||||||
|
"project_url" => "https://git.sr.ht/~edwardloveall/scribe/tree/main/docs/instances.md",
|
||||||
|
"original_name" => "Medium",
|
||||||
|
"original_url" => "medium.com"
|
||||||
|
),
|
||||||
|
"gothub" => array(
|
||||||
|
"instance_url" => "${APP_GOTHUB}",
|
||||||
|
"project_url" => "https://codeberg.org/gothub/gothub/wiki/Instances",
|
||||||
|
"original_name" => "GitHub",
|
||||||
|
"original_url" => "github.com"
|
||||||
|
),
|
||||||
|
"librarian" => array(
|
||||||
|
"instance_url" => "${APP_LIBRARIAN}",
|
||||||
|
"project_url" => "https://codeberg.org/librarian/librarian#clearnet",
|
||||||
|
"original_name" => "Odysee",
|
||||||
|
"original_url" => "odysee.com"
|
||||||
|
),
|
||||||
|
|
||||||
|
"nitter" => array(
|
||||||
|
"instance_url" => "${APP_NITTER}",
|
||||||
|
"project_url" => "https://github.com/zedeus/nitter/wiki/Instances",
|
||||||
|
"original_name" => "Twitter",
|
||||||
|
"original_url" => "twitter.com"
|
||||||
|
),
|
||||||
|
|
||||||
|
"libreddit" => array(
|
||||||
|
"instance_url" => "${APP_LIBREREDDIT}",
|
||||||
|
"project_url" => "https://github.com/spikecodes/libreddit",
|
||||||
|
"original_name" => "Reddit",
|
||||||
|
"original_url" => "reddit.com"
|
||||||
|
),
|
||||||
|
"proxitok" => array(
|
||||||
|
"instance_url" => "${APP_PROXITOK}",
|
||||||
|
"project_url" => "https://github.com/pablouser1/ProxiTok/wiki/Public-instances",
|
||||||
|
"original_name" => "TikTok",
|
||||||
|
"original_url" => "tiktok.com"
|
||||||
|
),
|
||||||
|
"wikiless" => array(
|
||||||
|
"instance_url" => "${APP_WIKILESS}",
|
||||||
|
"project_url" => "https://github.com/Metastem/wikiless#instances",
|
||||||
|
"original_name" => "Wikipedia",
|
||||||
|
"original_url" => "wikipedia.com"
|
||||||
|
),
|
||||||
|
"quetre" => array(
|
||||||
|
"instance_url" => "${APP_QUETRE}",
|
||||||
|
"project_url" => "https://github.com/zyachel/quetre",
|
||||||
|
"original_name" => "Quora",
|
||||||
|
"original_url" => "quora.com"
|
||||||
|
),
|
||||||
|
"libremdb" => array(
|
||||||
|
"instance_url" => "${APP_LIBREMDB}",
|
||||||
|
"project_url" => "https://github.com/zyachel/libremdb",
|
||||||
|
"original_name" => "IMDb",
|
||||||
|
"original_url" => "imdb.com"
|
||||||
|
),
|
||||||
|
"breezewiki" => array(
|
||||||
|
"instance_url" => "${APP_BREEZEWIKI}",
|
||||||
|
"project_url" => "https://gitdab.com/cadence/breezewiki",
|
||||||
|
"original_name" => "Fandom",
|
||||||
|
"original_url" => "fandom.com"
|
||||||
|
),
|
||||||
|
"anonymousoverflow" => array(
|
||||||
|
"instance_url" => "${APP_ANONYMOUS_OVERFLOW}",
|
||||||
|
"project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances",
|
||||||
|
"original_name" => "StackOverflow",
|
||||||
|
"original_url" => "stackoverflow.com"
|
||||||
|
),
|
||||||
|
"suds" => array(
|
||||||
|
"instance_url" => "${APP_SUDS}",
|
||||||
|
"project_url" => "https://git.vern.cc/cobra/Suds/src/branch/main/instances.json",
|
||||||
|
"original_name" => "Snopes",
|
||||||
|
"original_url" => "snopes.com"
|
||||||
|
)
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
"curl_settings" => array(
|
"curl_settings" => array(
|
||||||
CURLOPT_PROXY => "",
|
CURLOPT_PROXY => "${CURLOPT_PROXY}",
|
||||||
CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
|
CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
|
||||||
CURLOPT_RETURNTRANSFER => ${CURLOPT_RETURNTRANSFER},
|
CURLOPT_RETURNTRANSFER => ${CURLOPT_RETURNTRANSFER},
|
||||||
CURLOPT_ENCODING => "${CURLOPT_ENCODING}",
|
CURLOPT_ENCODING => "${CURLOPT_ENCODING}",
|
||||||
CURLOPT_USERAGENT => "${CURLOPT_USERAGENT}",
|
CURLOPT_USERAGENT => "${CURLOPT_USERAGENT}",
|
||||||
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
|
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_WHATEVER,
|
||||||
CURLOPT_CUSTOMREQUEST => "${CURLOPT_CUSTOMREQUEST}",
|
CURLOPT_CUSTOMREQUEST => "${CURLOPT_CUSTOMREQUEST}",
|
||||||
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
||||||
CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
||||||
|
@ -39,6 +115,5 @@
|
||||||
CURLOPT_TIMEOUT => ${CURLOPT_TIMEOUT},
|
CURLOPT_TIMEOUT => ${CURLOPT_TIMEOUT},
|
||||||
CURLOPT_VERBOSE => ${CURLOPT_VERBOSE}
|
CURLOPT_VERBOSE => ${CURLOPT_VERBOSE}
|
||||||
)
|
)
|
||||||
|
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -12,8 +12,9 @@ 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
|
# Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups
|
||||||
# These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases
|
# These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases
|
||||||
ENV CONFIG_GOOGLE_DOMAIN="com"
|
ENV CONFIG_GOOGLE_DOMAIN="com"
|
||||||
ENV CONFIG_GOOGLE_LANGUAGE="en"
|
ENV CONFIG_GOOGLE_LANGUAGE_SITE="en"
|
||||||
ENV CONFIG_INVIDIOUS_INSTANCE="https://invidious.namazso.eu"
|
ENV CONFIG_GOOGLE_LANGUAGE_RESULTS="en"
|
||||||
|
ENV CONFIG_INVIDIOUS_INSTANCE="https://invidious.snopyta.org"
|
||||||
ENV CONFIG_HIDDEN_SERVICE_SEARCH=false
|
ENV CONFIG_HIDDEN_SERVICE_SEARCH=false
|
||||||
ENV CONFIG_DISABLE_BITTORRENT_SEARCH=false
|
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"
|
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"
|
||||||
|
@ -21,7 +22,6 @@ ENV CONFIG_BITTORRENT_TRACKERS="&tr=http://nyaa.tracker.wf:7777/announce&tr=udp:
|
||||||
# Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers
|
# 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 librex
|
||||||
ENV APP_INVIDIOUS=""
|
ENV APP_INVIDIOUS=""
|
||||||
ENV APP_BIBLIOGRAM=""
|
|
||||||
ENV APP_RIMGO=""
|
ENV APP_RIMGO=""
|
||||||
ENV APP_SCRIBE=""
|
ENV APP_SCRIBE=""
|
||||||
ENV APP_LIBRARIAN=""
|
ENV APP_LIBRARIAN=""
|
||||||
|
@ -34,6 +34,7 @@ ENV APP_QUETRE=""
|
||||||
ENV APP_LIBREMDB=""
|
ENV APP_LIBREMDB=""
|
||||||
ENV APP_BREEZEWIKI=""
|
ENV APP_BREEZEWIKI=""
|
||||||
ENV APP_ANONYMOUS_OVERFLOW=""
|
ENV APP_ANONYMOUS_OVERFLOW=""
|
||||||
|
ENV APP_SUDS=""
|
||||||
|
|
||||||
# GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests
|
# 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
|
# 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
|
||||||
|
@ -45,7 +46,7 @@ ENV CURLOPT_USERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537
|
||||||
ENV CURLOPT_CUSTOMREQUEST="GET"
|
ENV CURLOPT_CUSTOMREQUEST="GET"
|
||||||
ENV CURLOPT_MAXREDIRS=5
|
ENV CURLOPT_MAXREDIRS=5
|
||||||
ENV CURLOPT_TIMEOUT=18
|
ENV CURLOPT_TIMEOUT=18
|
||||||
ENV CURLOPT_VERBOSE=false
|
ENV CURLOPT_VERBOSE=true
|
||||||
|
|
||||||
# Install PHP-FPM using Alpine's package manager, apk
|
# Install PHP-FPM using Alpine's package manager, apk
|
||||||
# Configure PHP-FPM to listen on a Unix socket instead of a TCP port, which is more secure and efficient
|
# Configure PHP-FPM to listen on a Unix socket instead of a TCP port, which is more secure and efficient
|
||||||
|
|
|
@ -10,7 +10,7 @@ source "docker/attributes.sh"
|
||||||
if [ ! -d "/run/php7" ] || [ ! -S "/run/php7/php-fpm7.sock" ]; then
|
if [ ! -d "/run/php7" ] || [ ! -S "/run/php7/php-fpm7.sock" ]; then
|
||||||
mkdir "/run/php7"
|
mkdir "/run/php7"
|
||||||
touch "/run/php7/php-fpm7.sock"
|
touch "/run/php7/php-fpm7.sock"
|
||||||
chmod 0660 "/run/php7/php-fpm7.sock"
|
chmod 660 "/run/php7/php-fpm7.sock"
|
||||||
chown nginx:nginx "/run/php7/php-fpm7.sock"
|
chown nginx:nginx "/run/php7/php-fpm7.sock"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# Install Nginx with FastCGI enabled, optimizing its performance for serving content
|
# Install Nginx with FastCGI enabled, optimizing its performance for serving content
|
||||||
RUN apk add nginx
|
RUN apk add nginx
|
||||||
|
|
||||||
|
# Forward request and error logs to docker log collector
|
||||||
|
# RUN ln -sf /dev/stdout /var/log/nginx/access.log &&\
|
||||||
|
# ln -sf /dev/stderr /var/log/nginx/error.log
|
||||||
|
|
||||||
# After executing the 'docker run' command, run the 'prepare.sh' script
|
# After executing the 'docker run' command, run the 'prepare.sh' script
|
||||||
CMD [ "/bin/sh", "-c", "docker/server/prepare.sh" ]
|
CMD [ "/bin/sh", "-c", "docker/server/prepare.sh" ]
|
||||||
|
|
|
@ -9,11 +9,21 @@
|
||||||
|
|
||||||
foreach($xpath->query("//tbody/tr") as $result)
|
foreach($xpath->query("//tbody/tr") as $result)
|
||||||
{
|
{
|
||||||
$name = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result)[0]->textContent;
|
$name_node = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result);
|
||||||
|
if ($name_node->length > 0) {
|
||||||
|
$name = $name_node[0]->textContent;
|
||||||
|
} else {
|
||||||
|
$name = "";
|
||||||
|
}
|
||||||
$centered = $xpath->evaluate(".//td[@class='text-center']", $result);
|
$centered = $xpath->evaluate(".//td[@class='text-center']", $result);
|
||||||
$magnet = $xpath->evaluate(".//a[2]/@href", $centered[0])[0]->textContent;
|
$magnet_node = $xpath->evaluate(".//a[2]/@href", $centered[0]);
|
||||||
$magnet_without_tracker = explode("&tr=", $magnet)[0];
|
if ($magnet_node->length > 0) {
|
||||||
$magnet = $magnet_without_tracker . $config->bittorent_trackers;
|
$magnet = $magnet_node[0]->textContent;
|
||||||
|
$magnet_without_tracker = explode("&tr=", $magnet)[0];
|
||||||
|
$magnet = $magnet_without_tracker . $config->bittorent_trackers;
|
||||||
|
} else {
|
||||||
|
$magnet = "";
|
||||||
|
}
|
||||||
$size = $centered[1]->textContent;
|
$size = $centered[1]->textContent;
|
||||||
$seeders = $centered[3]->textContent;
|
$seeders = $centered[3]->textContent;
|
||||||
$leechers = $centered[4]->textContent;
|
$leechers = $centered[4]->textContent;
|
||||||
|
@ -29,7 +39,6 @@
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -10,23 +10,21 @@
|
||||||
$domain = $config->google_domain;
|
$domain = $config->google_domain;
|
||||||
$site_language = isset($_COOKIE["google_language_site"]) ? trim(htmlspecialchars($_COOKIE["google_language_site"])) : $config->google_language_site;
|
$site_language = isset($_COOKIE["google_language_site"]) ? trim(htmlspecialchars($_COOKIE["google_language_site"])) : $config->google_language_site;
|
||||||
$results_language = isset($_COOKIE["google_language_results"]) ? trim(htmlspecialchars($_COOKIE["google_language_results"])) : $config->google_language_results;
|
$results_language = isset($_COOKIE["google_language_results"]) ? trim(htmlspecialchars($_COOKIE["google_language_results"])) : $config->google_language_results;
|
||||||
|
$number_of_results = isset($_COOKIE["google_number_of_results"]) ? trim(htmlspecialchars($_COOKIE["google_number_of_results"])) : $config->google_number_of_results;
|
||||||
|
|
||||||
$url = "https://www.google.$domain/search?q=$query_encoded&start=$page";
|
$url = "https://www.google.$domain/search?q=$query_encoded&start=$page";
|
||||||
|
|
||||||
if (3 > strlen($site_language) && 0 < strlen($site_language))
|
if (3 > strlen($site_language) && 0 < strlen($site_language))
|
||||||
{
|
|
||||||
$url .= "&hl=$site_language";
|
$url .= "&hl=$site_language";
|
||||||
}
|
|
||||||
|
|
||||||
if (3 > strlen($results_language) && 0 < strlen($results_language))
|
if (3 > strlen($results_language) && 0 < strlen($results_language))
|
||||||
{
|
|
||||||
$url .= "&lr=lang_$results_language";
|
$url .= "&lr=lang_$results_language";
|
||||||
}
|
|
||||||
|
if (3 > strlen($number_of_results) && 0 < strlen($number_of_results))
|
||||||
|
$url .= "&num=$number_of_results";
|
||||||
|
|
||||||
if (isset($_COOKIE["safe_search"]))
|
if (isset($_COOKIE["safe_search"]))
|
||||||
{
|
|
||||||
$url .= "&safe=medium";
|
$url .= "&safe=medium";
|
||||||
}
|
|
||||||
|
|
||||||
$google_ch = curl_init($url);
|
$google_ch = curl_init($url);
|
||||||
curl_setopt_array($google_ch, $config->curl_settings);
|
curl_setopt_array($google_ch, $config->curl_settings);
|
||||||
|
|
|
@ -2,13 +2,11 @@
|
||||||
function get_video_results($query)
|
function get_video_results($query)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$instance_url = $config->invidious_instance_for_video_results;
|
$instance_url = $config->invidious_instance_for_video_results;
|
||||||
|
|
||||||
$url = "$instance_url/api/v1/search?q=$query";
|
$url = "$instance_url/api/v1/search?q=$query";
|
||||||
$response = request($url);
|
$response = request($url);
|
||||||
$json_response = json_decode($response, true);
|
$json_response = json_decode($response, true);
|
||||||
|
|
||||||
$results = array();
|
$results = array();
|
||||||
|
|
||||||
foreach ($json_response as $response)
|
foreach ($json_response as $response)
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
{
|
{
|
||||||
"instances": [
|
"instances": [
|
||||||
{
|
|
||||||
"clearnet": "https://search.femboy.hu/",
|
|
||||||
"tor": "http://search.cepyxplublbyw2f4axy4pyztfbxmf63lrt2c7uwv6wl4iixz53czload.onion/",
|
|
||||||
"i2p": null,
|
|
||||||
"country": "HU"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"clearnet": "https://lx.vern.cc/",
|
"clearnet": "https://lx.vern.cc/",
|
||||||
"tor": "http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/",
|
"tor": "http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/",
|
||||||
"i2p": "http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/",
|
"i2p": "http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/",
|
||||||
"country": "US"
|
"country": "US"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"clearnet": "https://librex.sesu.cc/",
|
|
||||||
"tor": "http://librex.swxoebbpeqiiixyhbuh3vbw53pdrmtbiaj2sqveol6kkn5rpapfi4aad.onion/",
|
|
||||||
"i2p": "http://lqbchqljxiwl3bbjt4vqe76luovk5ly6khqhg7mt5qcqfn6e4sbq.b32.i2p/",
|
|
||||||
"country": "CL"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"clearnet": "https://librex.zzls.xyz/",
|
"clearnet": "https://librex.zzls.xyz/",
|
||||||
"tor": "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/",
|
"tor": "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/",
|
||||||
"i2p": "http://7huurwog32tny663wkglrhozfoyqyqmsuxjbd7dtudccx44awjda.b32.i2p/",
|
"i2p": "http://7huurwog32tny663wkglrhozfoyqyqmsuxjbd7dtudccx44awjda.b32.i2p/",
|
||||||
"country": "CL"
|
"country": "CL"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"clearnet": "https://librex.revvy.de/",
|
||||||
|
"tor": "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/",
|
||||||
|
"i2p": "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/",
|
||||||
|
"country": "CA"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"clearnet": "https://librex.mikata.ru/",
|
"clearnet": "https://librex.mikata.ru/",
|
||||||
"tor": "http://f7ssz7l3biu4fugwctfpcx4txg5yq4gqhrt473ledsuc3ivtd3omniid.onion/",
|
"tor": "http://f7ssz7l3biu4fugwctfpcx4txg5yq4gqhrt473ledsuc3ivtd3omniid.onion/",
|
||||||
"i2p": null,
|
"i2p": null,
|
||||||
"country": "US"
|
"country": "US"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"clearnet": "https://search.ahwx.org/",
|
||||||
|
"tor": "http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/",
|
||||||
|
"i2p": null,
|
||||||
|
"country": "NL"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"clearnet": "https://search.davidovski.xyz/",
|
"clearnet": "https://search.davidovski.xyz/",
|
||||||
"tor": null,
|
"tor": null,
|
||||||
|
@ -48,18 +48,6 @@
|
||||||
"i2p": null,
|
"i2p": null,
|
||||||
"country": "DE"
|
"country": "DE"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"clearnet": "https://buscar.weblibre.org/",
|
|
||||||
"tor": null,
|
|
||||||
"i2p": null,
|
|
||||||
"country": "CL"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearnet": "https://search.ahwx.org/",
|
|
||||||
"tor": null,
|
|
||||||
"i2p": null,
|
|
||||||
"country": "NL"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"clearnet": "https://librex.pufe.org/",
|
"clearnet": "https://librex.pufe.org/",
|
||||||
"tor": null,
|
"tor": null,
|
||||||
|
@ -90,12 +78,6 @@
|
||||||
"i2p": null,
|
"i2p": null,
|
||||||
"country": "DE"
|
"country": "DE"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"clearnet": "https://lx.drain.win/",
|
|
||||||
"tor": null,
|
|
||||||
"i2p": null,
|
|
||||||
"country": "SG"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"clearnet": "https://librex.bloatcat.tk/",
|
"clearnet": "https://librex.bloatcat.tk/",
|
||||||
"tor": null,
|
"tor": null,
|
||||||
|
@ -119,6 +101,30 @@
|
||||||
"tor": null,
|
"tor": null,
|
||||||
"i2p": null,
|
"i2p": null,
|
||||||
"country": "US"
|
"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://search.spaceint.fr/",
|
||||||
|
"tor": null,
|
||||||
|
"i2p": null,
|
||||||
|
"country": "DE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clearnet": "https://lx.benike.monster/",
|
||||||
|
"tor": null,
|
||||||
|
"i2p": null,
|
||||||
|
"country": "DE"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,12 +30,6 @@
|
||||||
else if (!empty($frontends[$frontend]["instance_url"]))
|
else if (!empty($frontends[$frontend]["instance_url"]))
|
||||||
$frontend = $frontends[$frontend]["instance_url"];
|
$frontend = $frontends[$frontend]["instance_url"];
|
||||||
|
|
||||||
if ($original == "instagram.com")
|
|
||||||
{
|
|
||||||
if (!strpos($url, "/p/"))
|
|
||||||
$frontend .= "/u";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty(trim($frontend)))
|
if (empty(trim($frontend)))
|
||||||
return $url;
|
return $url;
|
||||||
|
|
||||||
|
@ -45,7 +39,7 @@
|
||||||
if (count($wiki_split) > 1)
|
if (count($wiki_split) > 1)
|
||||||
{
|
{
|
||||||
$lang = explode("://", $wiki_split[0])[1];
|
$lang = explode("://", $wiki_split[0])[1];
|
||||||
$url = $frontend . explode($original, $url)[1] . "?lang=" . $lang;
|
$url = $frontend . explode($original, $url)[1] . (strpos($url, "?") !== false ? "&" : "?") . "lang=" . $lang;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (strpos($url, "fandom.com") !== false)
|
else if (strpos($url, "fandom.com") !== false)
|
||||||
|
|
|
@ -61,7 +61,8 @@
|
||||||
<option value=\"google\">Google Dark</option>
|
<option value=\"google\">Google Dark</option>
|
||||||
<option value=\"startpage\">Startpage Dark</option>
|
<option value=\"startpage\">Startpage Dark</option>
|
||||||
<option value=\"gruvbox\">Gruvbox</option>
|
<option value=\"gruvbox\">Gruvbox</option>
|
||||||
<option value=\"github_night\">GitHub Night</option>";
|
<option value=\"github_night\">GitHub Night</option>
|
||||||
|
<option value=\"catppuccin\">Catppucin</option>";
|
||||||
|
|
||||||
if (isset($_COOKIE["theme"]))
|
if (isset($_COOKIE["theme"]))
|
||||||
{
|
{
|
||||||
|
@ -114,6 +115,10 @@
|
||||||
echo isset($_COOKIE["google_language_results"]) ? htmlspecialchars($_COOKIE["google_language_results"]) : $config->google_language_results;
|
echo isset($_COOKIE["google_language_results"]) ? htmlspecialchars($_COOKIE["google_language_results"]) : $config->google_language_results;
|
||||||
?>">
|
?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Number of results per page</label>
|
||||||
|
<input type="number" name="google_number_of_results" value="<?php echo isset($_COOKIE["google_number_of_results"]) ? $_COOKIE["google_number_of_results"] : $config->google_number_of_results; ?>" >
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Safe search</label>
|
<label>Safe search</label>
|
||||||
<input type="checkbox" name="safe_search" <?php echo isset($_COOKIE["safe_search"]) ? "checked" : ""; ?> >
|
<input type="checkbox" name="safe_search" <?php echo isset($_COOKIE["safe_search"]) ? "checked" : ""; ?> >
|
||||||
|
|
26
static/css/catppuccin.css
Normal file
26
static/css/catppuccin.css
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
:root {
|
||||||
|
--main-bg: #1E1E2E;
|
||||||
|
--main-fg: #CDD6F4;
|
||||||
|
|
||||||
|
--result-link-fg: #89B4FA;
|
||||||
|
--result-fg: #B4B3FE;
|
||||||
|
|
||||||
|
--button-bg: #313244;
|
||||||
|
|
||||||
|
--special-result-border: opacity 50;
|
||||||
|
--special-text-background: #44475A;
|
||||||
|
--special-text-color: #CDD6F4;
|
||||||
|
|
||||||
|
--search-container-text-color: #CDD6F4;
|
||||||
|
--search-container-background-color: #313244;
|
||||||
|
--search-container-background-border: #B4BEFE;
|
||||||
|
|
||||||
|
--search-form-background-color: #181825;
|
||||||
|
|
||||||
|
--border: #B4B3FE;
|
||||||
|
|
||||||
|
--footer-fg: #A6ADC8;
|
||||||
|
--footer-bg: #313244;
|
||||||
|
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue