Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Fijxu 2023-05-05 12:21:44 -04:00
commit eb5f6c0f32
17 changed files with 169 additions and 75 deletions

View File

@ -13,28 +13,26 @@
| 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 |
| [search.sesu.cc](https://search.sesu.cc/) | [](http://search.swxoebbpeqiiixyhbuh3vbw53pdrmtbiaj2sqveol6kkn5rpapfi4aad.onion/) | [](http://lqbchqljxiwl3bbjt4vqe76luovk5ly6khqhg7mt5qcqfn6e4sbq.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.me](https://librex.me/) | [](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/) | [](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/) | 🇨🇦 CA |
| [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.ahwx.org](https://search.ahwx.org/) | [](http://fcnfg6avz45hqzwbneekq57u2mqbnwa7veyvjcc4dndqbatvkjlaj7yd.onion/) | ❌ | 🇳🇱 NL |
| [search.ahwx.org](https://search.ahwx.org/) | [](http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/) | ❌ | 🇳🇱 NL |
| [search.davidovski.xyz](https://search.davidovski.xyz/) | ❌ | ❌ | 🇬🇧 UK |
| [search.madreyk.xyz](https://search.madreyk.xyz/) | ❌ | ❌ | 🇩🇪 DE |
| [search.pabloferreiro.es](https://search.pabloferreiro.es/) | ❌ | ❌ | 🇩🇪 DE |
| [buscar.weblibre.org](https://buscar.weblibre.org/) | ❌ | ❌ | 🇨🇱 CL |
| [librex.pufe.org](https://librex.pufe.org/) | ❌ | ❌ | :new_zealand: NZ |
| [librex.ratakor.com](https://librex.ratakor.com/) | ❌ | ❌ | 🇫🇷 FR |
| [search.tildevarsh.in](https://search.tildevarsh.in/) | ❌ | ❌ | 🇮🇳 IN |
| [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.retro-hax.net](https://librex.retro-hax.net/) | ❌ | ❌ | 🇩🇪 DE |
| [search.funami.tech](https://search.funami.tech/) | ❌ | ❌ | 🇰🇷 KR |
| [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>
### Thanks rms

View File

@ -7,6 +7,7 @@
// Google results will be in this language
"google_language_site" => "",
"google_language_results" => "",
"google_number_of_results" => 10,
// You can set a language for results in wikipedia
"wikipedia_language" => "en",
@ -31,12 +32,6 @@
"original_name" => "YouTube",
"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(
"instance_url" => "",
"project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances",
@ -110,6 +105,18 @@
"project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances",
"original_name" => "StackOverflow",
"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"
),
"biblioreads" => array(
"instance_url" => "",
"project_url" => "https://github.com/nesaku/BiblioReads#instances",
"original_name" => "Goodreads",
"original_url" => "goodreads.com"
)
),

View File

@ -1,7 +1,7 @@
version: "2.1"
services:
librex:
image: librex:latest
image: librex/librex:latest
container_name: librex
network_mode: bridge
ports:

View File

@ -107,7 +107,6 @@ This docker image was developed with high configurability in mind, so here is th
| Variables | Default | Examples | Description |
|:----------|:-------------|:---------|:------|
| 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_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. |
@ -120,6 +119,8 @@ 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_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_SUDS | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_BIBLIOREADS | "" | string | Integration with external self-hosted apps, configure the desired host. |
<br>

View File

@ -34,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
# 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_BIBLIOGRAM=${APP_BIBLIOGRAM:-""}
export APP_RIMGO=${APP_RIMGO:-""}
export APP_SCRIBE=${APP_SCRIBE:-""}
export APP_LIBRARIAN=${APP_LIBRARIAN:-""}
@ -47,6 +46,8 @@ export APP_QUETRE=${APP_QUETRE:-""}
export APP_LIBREMDB=${APP_LIBREMDB:-""}
export APP_BREEZEWIKI=${APP_BREEZEWIKI:-""}
export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""}
export APP_SUDS=${APP_SUDS:-""}
export APP_BIBLIOREADS=${APP_BIBLIOREADS:-""}
# 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

View File

@ -18,12 +18,6 @@
"original_name" => "YouTube",
"original_url" => "youtube.com"
),
"bibliogram" => array(
"instance_url" => "${APP_BIBLIOGRAM}",
"project_url" => "https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md",
"original_name" => "Instagram",
"original_url" => "instagram.com"
),
"rimgo" => array(
"instance_url" => "${APP_RIMGO}",
"project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances",
@ -97,6 +91,18 @@
"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"
),
"biblioreads" => array(
"instance_url" => "${APP_BIBLIOREADS}",
"project_url" => "https://github.com/nesaku/BiblioReads#instances",
"original_name" => "Goodreads",
"original_url" => "goodreads.com"
)
),

View File

@ -22,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
# 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_BIBLIOGRAM=""
ENV APP_RIMGO=""
ENV APP_SCRIBE=""
ENV APP_LIBRARIAN=""
@ -35,6 +34,9 @@ ENV APP_QUETRE=""
ENV APP_LIBREMDB=""
ENV APP_BREEZEWIKI=""
ENV APP_ANONYMOUS_OVERFLOW=""
ENV APP_SUDS=""
ENV APP_BIBLIOREADS=""
# 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

View File

@ -9,11 +9,21 @@
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);
$magnet = $xpath->evaluate(".//a[2]/@href", $centered[0])[0]->textContent;
$magnet_without_tracker = explode("&tr=", $magnet)[0];
$magnet = $magnet_without_tracker . $config->bittorent_trackers;
$magnet_node = $xpath->evaluate(".//a[2]/@href", $centered[0]);
if ($magnet_node->length > 0) {
$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;
$seeders = $centered[3]->textContent;
$leechers = $centered[4]->textContent;
@ -29,7 +39,6 @@
)
);
}
return $results;
}
?>

View File

@ -10,23 +10,21 @@
$domain = $config->google_domain;
$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;
$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";
if (3 > strlen($site_language) && 0 < strlen($site_language))
{
$url .= "&hl=$site_language";
}
if (3 > strlen($results_language) && 0 < strlen($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"]))
{
$url .= "&safe=medium";
}
$google_ch = curl_init($url);
curl_setopt_array($google_ch, $config->curl_settings);

View File

@ -1,23 +1,5 @@
{
"instances": [
{
"clearnet": "https://search.femboy.hu/",
"tor": "http://search.cepyxplublbyw2f4axy4pyztfbxmf63lrt2c7uwv6wl4iixz53czload.onion/",
"i2p": null,
"country": "HU"
},
{
"clearnet": "https://lx.vern.cc/",
"tor": "http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/",
"i2p": "http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/",
"country": "US"
},
{
"clearnet": "https://search.sesu.cc/",
"tor": "http://search.swxoebbpeqiiixyhbuh3vbw53pdrmtbiaj2sqveol6kkn5rpapfi4aad.onion/",
"i2p": "http://lqbchqljxiwl3bbjt4vqe76luovk5ly6khqhg7mt5qcqfn6e4sbq.b32.i2p/",
"country": "CL"
},
{
"clearnet": "https://librex.zzls.xyz/",
"tor": "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/",
@ -25,7 +7,7 @@
"country": "CL"
},
{
"clearnet": "https://librex.revvy.de/",
"clearnet": "https://librex.me/",
"tor": "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/",
"i2p": "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/",
"country": "CA"
@ -38,7 +20,7 @@
},
{
"clearnet": "https://search.ahwx.org/",
"tor": "http://fcnfg6avz45hqzwbneekq57u2mqbnwa7veyvjcc4dndqbatvkjlaj7yd.onion/",
"tor": "http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/",
"i2p": null,
"country": "NL"
},
@ -60,12 +42,6 @@
"i2p": null,
"country": "DE"
},
{
"clearnet": "https://buscar.weblibre.org/",
"tor": null,
"i2p": null,
"country": "CL"
},
{
"clearnet": "https://librex.pufe.org/",
"tor": null,
@ -96,12 +72,6 @@
"i2p": null,
"country": "DE"
},
{
"clearnet": "https://lx.drain.win/",
"tor": null,
"i2p": null,
"country": "SG"
},
{
"clearnet": "https://librex.bloatcat.tk/",
"tor": null,
@ -131,6 +101,24 @@
"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"
}
]
}

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

@ -30,12 +30,6 @@
else if (!empty($frontends[$frontend]["instance_url"]))
$frontend = $frontends[$frontend]["instance_url"];
if ($original == "instagram.com")
{
if (!strpos($url, "/p/"))
$frontend .= "/u";
}
if (empty(trim($frontend)))
return $url;
@ -57,6 +51,11 @@
$url = $frontend . "/" . $wiki_name . explode($original, $url)[1];
}
}
else if (strpos($url, "gist.github.com") !== false)
{
$gist_path = explode("gist.github.com", $url)[1];
$url = $frontend . "/gist" . $gist_path;
}
else
{
$url = $frontend . explode($original, $url)[1];

View File

@ -48,7 +48,7 @@
continue;
}
echo "<a " . (($category_index == $type) ? "class=\"active\"" : "") . "href=\"/search.php?q=" . $query . "&p=0&t=" . $category_index . "\"><img src=\"static/images/" . $category . "_result.png\" alt=\"" . $category . " result\" />" . ucfirst($category) . "</a>";
echo "<a " . (($category_index == $type) ? "class=\"active\" " : "") . "href=\"/search.php?q=" . $query . "&p=0&t=" . $category_index . "\"><img src=\"static/images/" . $category . "_result.png\" alt=\"" . $category . " result\" />" . ucfirst($category) . "</a>";
}
?>
</div>

View File

@ -61,7 +61,10 @@
<option value=\"google\">Google Dark</option>
<option value=\"startpage\">Startpage Dark</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>
<option value=\"ubuntu\">Ubuntu</option>
<option value=\"tokyo_night\">Tokyo night</option>";
if (isset($_COOKIE["theme"]))
{
@ -114,6 +117,10 @@
echo isset($_COOKIE["google_language_results"]) ? htmlspecialchars($_COOKIE["google_language_results"]) : $config->google_language_results;
?>">
</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>
<label>Safe search</label>
<input type="checkbox" name="safe_search" <?php echo isset($_COOKIE["safe_search"]) ? "checked" : ""; ?> >

26
static/css/catppuccin.css Normal file
View 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;
}

View File

@ -0,0 +1,26 @@
:root {
--main-bg: #24283b;
--main-fg: #cfc9c2;
--result-link-fg: #bb9af7;
--result-fg: #a2a08e;
--button-bg: #343b58;
--special-result-border: border 0;
--special-text-background: #1a1b26;
--special-text-color: #c0caf5;
--search-container-text-color: #f2efd3;
--search-container-background-color: #565f89;
--search-container-background-border: #bb9af7;
--search-form-background-color: #1a1b26;
--border: #565f89;
--footer-fg: #f2efd3;
--footer-bg: #1a1b26;
color-scheme: dark;
}

26
static/css/ubuntu.css Normal file
View File

@ -0,0 +1,26 @@
:root {
--main-bg: #2C001E;
--main-fg: #FFFFFF;
--result-link-fg: #84de32;
--result-fg: #a2a08e;
--button-bg: #5E2750;
--special-result-border: border 0;
--special-text-background: #333333;
--special-text-color: #FFFFFF;
--search-container-text-color: #f2efd3;
--search-container-background-color: #77216F;
--search-container-background-border: #E95420;
--search-form-background-color: #333333;
--border: #77216F;
--footer-fg: #f2efd3;
--footer-bg: #5E2750;
color-scheme: dark;
}