LibreY

- privacy respecting meta search engine
git clone git://git.acid.vegas/LibreY.git
Log | Files | Refs | Archive | README | LICENSE

commit a75a233fbdc34429f93a230bb724bab472ce622f
parent b8817a6e28d1de3de35a9f4abe9f501f6a1fe997
Author: hnhx <49120638+hnhx@users.noreply.github.com>
Date: Fri, 16 Jun 2023 10:22:04 +0000

Merge pull request #229 from codedipper/main add ~vern instance (again), fix spaceint instance, stackexchange in anonymousoverflow

Diffstat:
MREADME.md | 3++-
Minstances.json | 18++++++++++++------
Mmisc/tools.php | 11+++++++++++

3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
@@ -16,7 +16,9 @@
 | [librex.zzls.xyz](https://librex.zzls.xyz/) | [✅](http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/) | [✅](http://zzlsaymhcfla7vibo3a223bybeecu3bd5z6rmw2u4y76maqeu76q.b32.i2p) | 🇨🇱 CL |
 | [librex.me](https://librex.me/) | [✅](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/) | [✅](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/) | 🇨🇦 CA |
 | [s.dyox.in](https://s.dyox.in/) | [✅](http://ddhigxwjz7elcl2erm7qzzukda4qmovoy4cepcueahggpwrpu24mi6qd.onion/) | [✅](http://s.dyoxin.i2p/) | 🇮🇸 IS |
+| [lx.vern.cc](https://lx.vern.cc/) | [✅](http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/) | [✅](http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/) | 🇺🇸 US |
 | [search.ahwx.org](https://search.ahwx.org/) | [✅](http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/) | ❌ | 🇳🇱 NL |
+| [search.spaceint.fr](https://search.spaceint.fr/) | [✅](http://6d4nqt2rndvmhogpwrbqfvj2ur6e6nm2r6dzi7ny4wj6ai3j5hnvbhyd.onion/) | ❌ | 🇫🇷 FR |
 | [search.davidovski.xyz](https://search.davidovski.xyz/) | ❌ | ❌ | 🇬🇧 UK |
 | [search.madreyk.xyz](https://search.madreyk.xyz/) | ❌ | ❌ | 🇩🇪 DE |
 | [search.pabloferreiro.es](https://search.pabloferreiro.es/) | ❌ | ❌ | 🇩🇪 DE |
@@ -30,7 +32,6 @@
 | [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 |
 | [librex.nohost.network](https://librex.nohost.network/) | ❌ | ❌ | 🇲🇽 MX |
 <br>
diff --git a/instances.json b/instances.json
@@ -19,12 +19,24 @@
               "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/",
               "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,
@@ -103,12 +115,6 @@
               "country": "US"
           },
           {
-              "clearnet": "https://search.spaceint.fr/",
-              "tor": null,
-              "i2p": null,
-              "country": "DE"
-          },
-          {
               "clearnet": "https://lx.benike.monster/",
               "tor": null,
               "i2p": null,
diff --git a/misc/tools.php b/misc/tools.php
@@ -56,6 +56,12 @@
                 $gist_path = explode("gist.github.com", $url)[1];
                 $url = $frontend . "/gist" . $gist_path;
             }
+            else if (strpos($url, "stackexchange.com") !== false)
+            {
+                $se_domain = explode(".", explode("://", $url)[1])[0];
+                $se_path = explode("stackexchange.com", $url)[1];
+                $url = $frontend . "/exchange" . "/" . $se_domain . $se_path;
+            }
             else
             {
                 $url =  $frontend . explode($original, $url)[1];
@@ -85,6 +91,11 @@
                 $url = try_replace_with_frontend($url, $frontend, $original);
                 break;
             }
+            else if (strpos($url, "stackexchange.com"))
+            {
+                $url = try_replace_with_frontend($url, "anonymousoverflow", "stackexchange.com");
+                break;
+            }
         }
 
         return $url;