Compare commits
29 Commits
7f5950a5ff
...
bd19b6cbcf
Author | SHA1 | Date |
---|---|---|
Fijxu | bd19b6cbcf | |
Ahwx | 85ef67c798 | |
Ahwx | 28aed7d61e | |
Ahwx | dbbec941da | |
Revvy | 6d657deb2f | |
Revvy | 476fcdcd43 | |
Ahwx | 82ac92a98b | |
davidovski | 9ae13f41ad | |
davidovski | 9980f3a9e7 | |
Ahwx | e2527200c9 | |
Ahwx | 5f8bc14d73 | |
Ahwx | a6782f81df | |
davidovski | ae9d706a4b | |
davidovski | 8e8c718237 | |
davidovski | d556296c5a | |
Revvy | a8661c3de6 | |
Ahwx | 9296cb4600 | |
davidovski | 423de89bd8 | |
Ahwx | 903ec51483 | |
Revvy | f5579c1110 | |
Revvy | 677db09535 | |
Revvy | 2111fda8b8 | |
Revvy | 99a1fcb9c8 | |
Revvy | 1de1ad330c | |
Revvy | fa50117b9f | |
Revvy | ab1141f647 | |
Revvy | b19d95d5f5 | |
Revvy | bab77bd50c | |
Revvy | 127ab3d543 |
|
@ -17,11 +17,14 @@
|
|||
|
||||
> If you host using CloudFlare, this will be mentioned in the instances list.
|
||||
|
||||
You can access the full list of LibreX and LibreY instances on one of the following updated LibreY instances:
|
||||
|
||||
| Clearnet | TOR | I2P | Country |
|
||||
|-|-|-|-|
|
||||
| [search.ahwx.org](https://search.ahwx.org/) | [✅](http://hyy7rcvknwb22v4nnoar635wntiwr4uwzhiuyimemyl4fz6k7tahj5id.onion) | ❌ | 🇫🇷 FR (temp) |
|
||||
| [search.ahwx.org](https://search.ahwx.org/) | [✅](http://hyy7rcvknwb22v4nnoar635wntiwr4uwzhiuyimemyl4fz6k7tahj5id.onion) | ❌ | 🇳🇱 NL |
|
||||
| [librex.me](https://librex.me/) | [✅](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/) | [✅](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/) | 🇨🇦 CA |
|
||||
| [librex.revvy.de](https://librex.revvy.de/) | [✅](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/) | [✅](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/) | 🇨🇦 CA |
|
||||
| [search.davidovski.xyz](https://search.davidovski.xyz/) | ❌ | ❌ | 🇬🇧 GB |
|
||||
<br>
|
||||
|
||||
|
||||
|
|
5
api.php
5
api.php
|
@ -26,7 +26,10 @@
|
|||
switch ($type)
|
||||
{
|
||||
case 0:
|
||||
require "engines/google/text.php";
|
||||
$engine=$config->preferred_engines['text'];
|
||||
if (is_null($engine))
|
||||
$engine = "google";
|
||||
require "engines/$engine/text.php";
|
||||
$results = get_text_results($query, $page);
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"disable_hidden_service_search" => false,
|
||||
|
||||
// Fallback to another librex instance if google search fails
|
||||
"instance_fallback" => true,
|
||||
"instance_fallback" => false, // This might generate a 504 Gateway Timeout error, we are looking into this.
|
||||
|
||||
/*
|
||||
Preset privacy friendly frontends for users, these can be overwritten by users in the settings
|
||||
|
@ -144,7 +144,7 @@
|
|||
// CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
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", // For a normal Windows 10 PC running Firefox x64
|
||||
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:116.0) Gecko/20100101 Firefox/116.0", // For a normal Windows 10 PC running Firefox x64
|
||||
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_WHATEVER,
|
||||
CURLOPT_CUSTOMREQUEST => "GET",
|
||||
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
||||
|
|
|
@ -72,6 +72,13 @@
|
|||
curl_multi_exec($mh, $running);
|
||||
} while ($running);
|
||||
|
||||
if (curl_getinfo($google_ch)['http_code'] != '200')
|
||||
{
|
||||
require "engines/librex/text.php";
|
||||
return get_librex_results($query, $page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($special_search != 0)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
global $config;
|
||||
|
||||
$mh = curl_multi_init();
|
||||
$query_encoded = urlencode($query);
|
||||
$query_encoded = str_replace("%22", "\"", urlencode($query));
|
||||
$results = array();
|
||||
|
||||
$domain = $config->google_domain;
|
||||
|
@ -13,6 +13,7 @@
|
|||
$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&nfpr=1&start=$page";
|
||||
error_log($url);
|
||||
|
||||
if (3 > strlen($site_language) && 0 < strlen($site_language))
|
||||
$url .= "&hl=$site_language";
|
||||
|
@ -168,6 +169,9 @@
|
|||
function print_text_results($results)
|
||||
{
|
||||
|
||||
if (empty($results))
|
||||
return;
|
||||
|
||||
$special = $results[0];
|
||||
|
||||
if (array_key_exists("did_you_mean", $special))
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
{
|
||||
global $config;
|
||||
|
||||
if (isset($_REQUEST["nfb"]) && $_REQUEST["nfb"] == "1")
|
||||
return array();
|
||||
|
||||
if (!$config->instance_fallback)
|
||||
return array();
|
||||
|
||||
|
@ -24,16 +27,12 @@
|
|||
do {
|
||||
$tries++;
|
||||
|
||||
// after "too many" requests, give up
|
||||
if ($tries > 5)
|
||||
return array();
|
||||
|
||||
$instance = array_pop($instances);
|
||||
|
||||
if (parse_url($instance)["host"] == parse_url($_SERVER['HTTP_HOST'])["host"])
|
||||
continue;
|
||||
|
||||
$url = $instance . "api.php?q=$query_encoded&p=$page&t=0";
|
||||
$url = $instance . "api.php?q=$query_encoded&p=$page&t=0&nfb=1";
|
||||
|
||||
$librex_ch = curl_init($url);
|
||||
curl_setopt_array($librex_ch, $config->curl_settings);
|
||||
|
@ -44,7 +43,10 @@
|
|||
$code = curl_getinfo($librex_ch)["http_code"];
|
||||
$results = json_decode($response, true);
|
||||
|
||||
} while ( $results == null || count($results) <= 1);
|
||||
} while ( !empty($instances) && ($results == null || count($results) <= 1));
|
||||
|
||||
if (empty($instances))
|
||||
return array();
|
||||
|
||||
return array_values($results);
|
||||
}
|
||||
|
|
118
instances.json
118
instances.json
|
@ -1,26 +1,33 @@
|
|||
{
|
||||
"instances": [
|
||||
{
|
||||
"clearnet": "https://search.ahwx.org",
|
||||
"clearnet": "https://search.ahwx.org/",
|
||||
"tor": "http://hyy7rcvknwb22v4nnoar635wntiwr4uwzhiuyimemyl4fz6k7tahj5id.onion",
|
||||
"i2p": null,
|
||||
"country": "FR",
|
||||
"country": "NL",
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.me",
|
||||
"tor": "librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion",
|
||||
"i2p": "revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p",
|
||||
"clearnet": "https://librex.me/",
|
||||
"tor": "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion",
|
||||
"i2p": "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p",
|
||||
"country": "CA",
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.revvy.de",
|
||||
"tor": "librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion",
|
||||
"i2p": "revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p",
|
||||
"clearnet": "https://librex.revvy.de/",
|
||||
"tor": "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion",
|
||||
"i2p": "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p",
|
||||
"country": "CA",
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.zzls.xyz/",
|
||||
"tor": "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/",
|
||||
"i2p": "http://zzlsaymhcfla7vibo3a223bybeecu3bd5z6rmw2u4y76maqeu76q.b32.i2p/",
|
||||
"country": "CL",
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.davidovski.xyz/",
|
||||
"tor": null,
|
||||
|
@ -29,25 +36,32 @@
|
|||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.zzls.xyz/",
|
||||
"tor": "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/",
|
||||
"i2p": "http://zzlsaymhcfla7vibo3a223bybeecu3bd5z6rmw2u4y76maqeu76q.b32.i2p/",
|
||||
"country": "CL",
|
||||
"librey": false
|
||||
"clearnet": "https://librey.spaceint.fr/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "FR",
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.me/",
|
||||
"tor": "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/",
|
||||
"i2p": "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/",
|
||||
"country": "CA",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://s.dyox.in/",
|
||||
"tor": "http://ddhigxwjz7elcl2erm7qzzukda4qmovoy4cepcueahggpwrpu24mi6qd.onion/",
|
||||
"i2p": "http://s.dyoxin.i2p/",
|
||||
"clearnet": "https://librey.bloatcat.tk/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "IS",
|
||||
"librey": false
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.funami.tech/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "KR",
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.retro-hax.net/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "DE",
|
||||
"librey": true
|
||||
},
|
||||
{
|
||||
"clearnet": "https://lx.vern.cc/",
|
||||
|
@ -57,24 +71,17 @@
|
|||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.ahwx.org/",
|
||||
"tor": "http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/",
|
||||
"i2p": null,
|
||||
"country": "NL",
|
||||
"clearnet": "https://lx.owo.si/",
|
||||
"tor": "http://lx.pk47sgwhncn5cgidm7bofngmh7lc7ukjdpk5bjwfemmyp27ovl25ikyd.onion/",
|
||||
"i2p": "http://d4vi3tvfui2rfzsxr33tin4a6542heulf4mhkokdpbhbcejlg3la.b32.i2p/",
|
||||
"country": "DE",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.spaceint.fr/",
|
||||
"tor": "http://6d4nqt2rndvmhogpwrbqfvj2ur6e6nm2r6dzi7ny4wj6ai3j5hnvbhyd.onion/",
|
||||
"i2p": null,
|
||||
"country": "FR",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.madreyk.xyz/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "DE",
|
||||
"country": "FR",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
|
@ -84,13 +91,6 @@
|
|||
"country": "DE",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.pufe.org/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "NZ",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.ratakor.com/",
|
||||
"tor": null,
|
||||
|
@ -112,27 +112,6 @@
|
|||
"country": "DE",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.bloatcat.tk/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "IS",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.retro-hax.net/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "DE",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.funami.tech/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "KR",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.zeroish.xyz/",
|
||||
"tor": null,
|
||||
|
@ -147,13 +126,6 @@
|
|||
"country": "PL",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.yogeshlamichhane.com.np/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "US",
|
||||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://lx.benike.monster/",
|
||||
"tor": null,
|
||||
|
@ -169,10 +141,10 @@
|
|||
"librey": false
|
||||
},
|
||||
{
|
||||
"clearnet": "https://search.decentrala.org/",
|
||||
"clearnet": "https://librex.pardesicat.xyz/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "US",
|
||||
"country": "KR",
|
||||
"librey": false
|
||||
}
|
||||
]
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
list_instances($librey_instances);
|
||||
?>
|
||||
|
||||
<p>The following instnaces are running the older <a href="https://github.com/hnhx/librex">LibreX</a>:</p>
|
||||
<p>The following instances are running the older <a href="https://github.com/hnhx/librex">LibreX</a>:</p>
|
||||
<?php
|
||||
list_instances($librex_instances);
|
||||
?>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<title>
|
||||
<?php
|
||||
$query = htmlspecialchars(trim($_REQUEST["q"]));
|
||||
$query = trim($_REQUEST["q"]);
|
||||
echo $query;
|
||||
?> - LibreY</title>
|
||||
</head>
|
||||
|
@ -24,7 +24,7 @@
|
|||
die();
|
||||
}
|
||||
|
||||
echo "value=\"$query\"";
|
||||
echo "value=\"" . htmlspecialchars($query) . "\"";
|
||||
?>
|
||||
>
|
||||
<br>
|
||||
|
|
Loading…
Reference in New Issue