From 7fb8b2adfd840bba7ec2a345c8868508337b2412 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 6 Jun 2024 08:56:17 +0000 Subject: customize --- .gitignore | 1 + README.md | 4 +- api.txt | 2 +- banner/4get-default.png | Bin 21969 -> 0 bytes data/config.php | 3 +- docker-compose.yaml | 2 +- docs/apache2.md | 16 ++++---- docs/configure.md | 4 +- docs/docker.md | 14 +++---- icons/lolcat.ca.png | Bin lib/backend.php | 2 +- lib/frontend.php | 12 +++--- robots.txt | 4 +- settings.php | 24 ++++++------ static/style.css | 100 ++++++++++++++++++++++++------------------------ template/about.html | 4 +- template/home.html | 2 +- 17 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 banner/4get-default.png mode change 100644 => 100755 icons/lolcat.ca.png diff --git a/.gitignore b/.gitignore index 6c541bd..830f343 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ banner/* data/captcha/birds/ data/captcha/fumo_plushies/ data/captcha/minecraft/ +icons/* !banner/*default* ======= banner/* diff --git a/README.md b/README.md index 6cc82a7..114e6e8 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ **4get** is a proxy search engine that doesn't suck. ## About 4get -https://4get.ca/about +https://searx.itinerariummentis.org/about ## Try it out -https://4get.ca +https://searx.itinerariummentis.org ## Totally unbiased comparison between alternatives diff --git a/api.txt b/api.txt index a64873e..019ef14 100644 --- a/api.txt +++ b/api.txt @@ -277,7 +277,7 @@ URL should return a valid HTTP audio stream. To access the endpoint, you must add the following prefix in your request, like so: - https://4get.ca/audio/?s= + https://searx.itinerariummentis.org/audio/?s= + /favicon diff --git a/banner/4get-default.png b/banner/4get-default.png deleted file mode 100644 index c075175..0000000 Binary files a/banner/4get-default.png and /dev/null differ diff --git a/data/config.php b/data/config.php index 13be0f4..450b6cc 100644 --- a/data/config.php +++ b/data/config.php @@ -8,7 +8,7 @@ class config{ const VERSION = 8; // Will be shown pretty much everywhere. - const SERVER_NAME = "4get"; + const SERVER_NAME = "4get.itmens"; // Will be shown in tag on home page const SERVER_SHORT_DESCRIPTION = "They live in our walls!"; @@ -81,6 +81,7 @@ class config{ // To appear in the list of an instance, contact the host and if everyone added // eachother your serber should appear everywhere. const INSTANCES = [ + "https://searx.itinerariummentis.org", "https://4get.ca", "https://4get.zzls.xyz", "https://4getus.zzls.xyz", diff --git a/docker-compose.yaml b/docker-compose.yaml index df41b23..6038758 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,7 +7,7 @@ services: restart: unless-stopped environment: - FOURGET_VERSION=6 - - FOURGET_SERVER_NAME=4get.ca + - FOURGET_SERVER_NAME=searx.itinerariummentis.org ports: - "80:80" diff --git a/docs/apache2.md b/docs/apache2.md index e746a7e..d7d2fad 100644 --- a/docs/apache2.md +++ b/docs/apache2.md @@ -35,8 +35,8 @@ Now, edit the following file: `/etc/apache2/sites-available/000-default.conf`, r 1. The `VirtualHost` here instructs apache2 to redirect all **HTTP** traffic that specify an unknown `Host` header be redirected to a specific domain of your choice. Configuring this is not required but highly recommended. ```xml - # no domain = go to 4get.ca - RedirectMatch 301 ^(.*)$ https://4get.ca$1 + # no domain = go to searx.itinerariummentis.org + RedirectMatch 301 ^(.*)$ https://searx.itinerariummentis.org$1 ``` @@ -95,7 +95,7 @@ Now, edit the file `/etc/apache2/sites-available/default-ssl.conf`, remove every This ruleset will redirect all clients that specify an unknown `Host` to the domain of our choice. I recommend you uncomment the `ErrorLog` directive while setting things up in case a problem occurs with PHP. Don't worry about the invalid SSL paths, we will generate our certificates later; Just make sure you specify the right domains in there: ```xml - RedirectMatch 301 ^(.*)$ https://4get.ca$1 + RedirectMatch 301 ^(.*)$ https://searx.itinerariummentis.org$1 ServerAdmin will@lolcat.ca #ErrorLog ${APACHE_LOG_DIR}/error.log @@ -116,15 +116,15 @@ This ruleset will redirect all clients that specify an unknown `Host` to the dom AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/css - SSLCertificateFile /etc/letsencrypt/live/4get.ca/fullchain.pem - SSLCertificateKeyFile /etc/letsencrypt/live/4get.ca/privkey.pem + SSLCertificateFile /etc/letsencrypt/live/searx.itinerariummentis.org/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/searx.itinerariummentis.org/privkey.pem ``` -This ruleset tells apache2 where 4get is located (`/var/www/4get`), ensures that `4get.ca/settings` resolves to `4get.ca/settings.php` internally and that we deny access to `/data/*`, which may contain files you might want to keep private. +This ruleset tells apache2 where 4get is located (`/var/www/4get`), ensures that `searx.itinerariummentis.org/settings` resolves to `searx.itinerariummentis.org/settings.php` internally and that we deny access to `/data/*`, which may contain files you might want to keep private. ```xml - ServerName 4get.ca + ServerName searx.itinerariummentis.org DocumentRoot /var/www/4get @@ -201,7 +201,7 @@ service apache2 stop Now, run `certbot`, and specify all of your domains by prepending `-d` every time. Make sure the first domain you specify is your main domain, and the same domain you specified in the configuration above! We use ECDSA encryption here as it's better than RSA. ```sh -certbot certonly --standalone --key-type ecdsa -d 4get.ca -d www.4get.ca -d lolcat.ca -d www.lolcat.ca +certbot certonly --standalone --key-type ecdsa -d searx.itinerariummentis.org -d www.searx.itinerariummentis.org -d lolcat.ca -d www.lolcat.ca ``` Certbot should ask you a few questions, just play along. At the end of the setup, certbot should tell you about the location of the certificates. Double check to make sure they correspond to the paths we specified in `default-ssl.conf`. Your certificates should now update every 2-3 months automatically. diff --git a/docs/configure.md b/docs/configure.md index 7cc4175..bd3c904 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -39,10 +39,10 @@ sudo cp /usr/local/lib/libcurl-impersonate-ff.so /usr/lib/x86_64-linux-gnu/libcu Make sure to restart your webserver and/or PHP daemon, otherwise it will keep using the old library. You should now be able to bypass Cloudflare's shitty checks!! # Robots.txt -Make sure you configure this right to optimize your search engine presence! Head over to `/robots.txt` and change the 4get.ca domain to your own domain. +Make sure you configure this right to optimize your search engine presence! Head over to `/robots.txt` and change the searx.itinerariummentis.org domain to your own domain. # Server listing -To be listed on https://4get.ca/instances , you must contact *any* of the people in the server list and ask them to add you to their list of instances in their configuration. The instance list is distributed, and I don't have control over it. +To be listed on https://searx.itinerariummentis.org/instances , you must contact *any* of the people in the server list and ask them to add you to their list of instances in their configuration. The instance list is distributed, and I don't have control over it. If you see spammy entries in your instances list, simply remove the instance from your list that pushes the offending entries. diff --git a/docs/docker.md b/docs/docker.md index e56b5ca..cbc2758 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -5,7 +5,7 @@ When using docker container any environment variables prefixed with `FOURGET_` w When lists of data is expected in [data/config.php](../data/config.php), such as `INSTANCES`, you can pass in a comma separated string via environment variable. Example: -`FOURGET_INSTANCES="https://4get.ca,https://domain.tld"` +`FOURGET_INSTANCES="https://searx.itinerariummentis.org,https://domain.tld"` #### Special environment variables @@ -47,13 +47,13 @@ For more information on configuration view [data/config.php](../data/config.php) You can start 4get with ``` -docker run -d -p 80:80 -e FOURGET_SERVER_NAME="4get.ca" -e FOURGET_PROTO="http" luuul/4get:latest +docker run -d -p 80:80 -e FOURGET_SERVER_NAME="searx.itinerariummentis.org" -e FOURGET_PROTO="http" luuul/4get:latest ``` ...Or with SSL: ``` -docker run -d -p 443:443 -e FOURGET_SERVER_NAME="4get.ca" -e FOURGET_PROTO="https" -v /etc/letsencrypt/live/domain.tld:/etc/4get/certs luuul/4get:latest +docker run -d -p 443:443 -e FOURGET_SERVER_NAME="searx.itinerariummentis.org" -e FOURGET_PROTO="https" -v /etc/letsencrypt/live/domain.tld:/etc/4get/certs luuul/4get:latest ``` @@ -74,7 +74,7 @@ services: environment: - FOURGET_VERSION=6 - FOURGET_PROTO=http - - FOURGET_SERVER_NAME=4get.ca + - FOURGET_SERVER_NAME=searx.itinerariummentis.org ports: - "80:80" @@ -93,7 +93,7 @@ services: environment: - FOURGET_VERSION=6 - FOURGET_PROTO=https - - FOURGET_SERVER_NAME=4get.ca + - FOURGET_SERVER_NAME=searx.itinerariummentis.org ports: - "80:80" @@ -119,7 +119,7 @@ services: environment: - FOURGET_VERSION=6 - FOURGET_PROTO=http - - FOURGET_SERVER_NAME=4get.ca + - FOURGET_SERVER_NAME=searx.itinerariummentis.org - FOURGET_BOT_PROTECTION=1 ports: @@ -142,7 +142,7 @@ services: environment: - FOURGET_VERSION=6 - FOURGET_PROTO=http - - FOURGET_SERVER_NAME=4get.ca + - FOURGET_SERVER_NAME=searx.itinerariummentis.org ports: - "80:80" diff --git a/icons/lolcat.ca.png b/icons/lolcat.ca.png old mode 100644 new mode 100755 diff --git a/lib/backend.php b/lib/backend.php index cfb04a9..5b990a9 100644 --- a/lib/backend.php +++ b/lib/backend.php @@ -50,7 +50,7 @@ class backend{ switch($type){ case "raw_ip": - return; + curl_setopt($curlproc, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); break; case "http": diff --git a/lib/frontend.php b/lib/frontend.php index 1c3eb09..ae703fc 100644 --- a/lib/frontend.php +++ b/lib/frontend.php @@ -919,12 +919,12 @@ class frontend{ $filters["scraper"] = [ "display" => "Scraper", "option" => [ - "ddg" => "DuckDuckGo", "brave" => "Brave", - "yandex" => "Yandex", "google" => "Google", + "yandex" => "Yandex", "qwant" => "Qwant", "yep" => "Yep", + "ddg" => "DuckDuckGo", "greppr" => "Greppr", "crowdview" => "Crowdview", "mwmbl" => "Mwmbl", @@ -940,10 +940,10 @@ class frontend{ $filters["scraper"] = [ "display" => "Scraper", "option" => [ - "ddg" => "DuckDuckGo", - "yandex" => "Yandex", "brave" => "Brave", "google" => "Google", + "ddg" => "DuckDuckGo", + "yandex" => "Yandex", "qwant" => "Qwant", "yep" => "Yep", //"pinterest" => "Pinterest", @@ -972,10 +972,10 @@ class frontend{ $filters["scraper"] = [ "display" => "Scraper", "option" => [ - "ddg" => "DuckDuckGo", - "brave" => "Brave", "google" => "Google", + "brave" => "Brave", "qwant" => "Qwant", + "ddg" => "DuckDuckGo", "yep" => "Yep", "mojeek" => "Mojeek" ] diff --git a/robots.txt b/robots.txt index 6c10c2a..32c9a5c 100644 --- a/robots.txt +++ b/robots.txt @@ -23,6 +23,4 @@ # ⢀⠢⡑⡀⢂⢊⠠⠁⡂⡐⠀⠅⡈⠪⠪⠪⠣⠫⠑⡁⢔⠕⣜⣜⢦⡰⡎⡯⡾⡽ User-agent: * -Disallow: -Host: 4get.ca -Sitemap: https://4get.ca/sitemap +Disallow: / diff --git a/settings.php b/settings.php index 33185e9..9d210c8 100644 --- a/settings.php +++ b/settings.php @@ -105,6 +105,10 @@ $settings = [ "description" => "Web", "parameter" => "scraper_web", "options" => [ + [ + "value" => "google", + "text" => "Google" + ], [ "value" => "ddg", "text" => "DuckDuckGo" @@ -117,10 +121,6 @@ $settings = [ "value" => "yandex", "text" => "Yandex" ], - [ - "value" => "google", - "text" => "Google" - ], [ "value" => "qwant", "text" => "Qwant" @@ -163,6 +163,10 @@ $settings = [ "description" => "Images", "parameter" => "scraper_images", "options" => [ + [ + "value" => "google", + "text" => "Google" + ], [ "value" => "ddg", "text" => "DuckDuckGo" @@ -175,10 +179,6 @@ $settings = [ "value" => "brave", "text" => "Brave" ], - [ - "value" => "google", - "text" => "Google" - ], [ "value" => "qwant", "text" => "Qwant" @@ -235,6 +235,10 @@ $settings = [ "description" => "News", "parameter" => "scraper_news", "options" => [ + [ + "value" => "google", + "text" => "Google" + ], [ "value" => "ddg", "text" => "DuckDuckGo" @@ -243,10 +247,6 @@ $settings = [ "value" => "brave", "text" => "Brave" ], - [ - "value" => "google", - "text" => "Google" - ], [ "value" => "qwant", "text" => "Qwant" diff --git a/static/style.css b/static/style.css index 1e0a1da..3fa27d7 100644 --- a/static/style.css +++ b/static/style.css @@ -1,14 +1,14 @@ :root{ /* background */ - --1d2021: #1d2021; + --background: black; --282828: #282828; --3c3836: #3c3836; --504945: #504945; /* font */ - --928374: #928374; - --a89984: #a89984; - --bdae93: #bdae93; + --url: #999; + --body: #AAA; + --heading-and-links: #91a5a8; --8ec07c: #8ec07c; --ebdbb2: #ebdbb2; @@ -43,8 +43,8 @@ body,html{ } body{ - background:var(--1d2021); - color:var(--a89984); + background:var(--background); + color:var(--body); font-size:16px; box-sizing:border-box; font-family:sans-serif; @@ -64,7 +64,7 @@ body{ } .navigation a{ - color:var(--bdae93); + color:var(--heading-and-links); text-decoration:none; } @@ -83,7 +83,7 @@ h1,h2,h3,h4,h5,h6{ padding:0; margin:0 0 7px 0; line-height:initial; - color:var(--bdae93); + color:var(--heading-and-links); } h3,h4,h5,h6{ @@ -118,7 +118,7 @@ h3,h4,h5,h6{ } .searchbox input[type="text"]::placeholder{ - color:var(--928374); + color:var(--url); } .searchbox input[type="submit"]{ @@ -136,11 +136,11 @@ h3,h4,h5,h6{ line-height:36px; box-sizing:border-box; height:36px; - color:var(--bdae93); + color:var(--heading-and-links); } .searchbox:focus-within{ - border:1px solid var(--928374); + border:1px solid var(--url); } .autocomplete{ @@ -150,7 +150,7 @@ h3,h4,h5,h6{ left:-1px; right:-1px; background:var(--282828); - border:1px solid var(--928374); + border:1px solid var(--url); border-top:none; border-radius:0 0 2px 2px; z-index:10; @@ -186,7 +186,7 @@ h3,h4,h5,h6{ .tabs .tab{ text-decoration:none; - color:var(--bdae93); + color:var(--heading-and-links); padding:4px 10px; display:inline-block; } @@ -196,7 +196,7 @@ h3,h4,h5,h6{ } .tabs .tab.selected{ - border-bottom:2px solid var(--bdae93); + border-bottom:2px solid var(--heading-and-links); } /* Filters */ @@ -258,7 +258,7 @@ h3,h4,h5,h6{ font-family:Times; width:100%; height:100%; - background:var(--282828); + background: transparent !important; display:block; object-fit:contain; } @@ -295,7 +295,7 @@ h3,h4,h5,h6{ position:relative; max-width:400px; margin:17px auto 0; - border:1px solid var(--928374); + border:1px solid var(--url); } .captcha{ @@ -386,7 +386,7 @@ h3,h4,h5,h6{ } .infobox a{ - color:var(--bdae93); + color:var(--heading-and-links); } .infobox a:hover{ @@ -403,7 +403,7 @@ h3,h4,h5,h6{ } .web .type{ - border:1px solid var(--928374); + border:1px solid var(--url); background:var(--282828); padding:0 4px; border-radius:2px; @@ -420,7 +420,7 @@ h3,h4,h5,h6{ .web .url .part{ font-size:15px; text-decoration:none; - color:var(--928374); + color:var(--url); } .web .separator::before{ @@ -437,7 +437,7 @@ h3,h4,h5,h6{ .web .hover{ display:block; text-decoration:none; - color:var(--a89984); + color:var(--body); overflow:hidden; clear:left; padding-top:7px; @@ -445,12 +445,12 @@ h3,h4,h5,h6{ .web .text-result .title{ font-size:18px; - color:var(--bdae93); + color:var(--heading-and-links); margin-bottom:7px; } .web .text-result a:visited .title{ - color:var(--928374) !important; + color:var(--heading-and-links) !important; } .theme-white .web .text-result a:visited .title{ @@ -504,7 +504,7 @@ h3,h4,h5,h6{ .favicon-dropdown a{ text-decoration:none; - color:var(--bdae93); + color:var(--heading-and-links); display:block; padding:2px 7px 2px 5px; font-size:13px; @@ -590,7 +590,7 @@ h3,h4,h5,h6{ border:1px solid var(--504945); border-radius:2px; text-decoration:none; - color:var(--bdae93); + color:var(--heading-and-links); } .nextpage:hover{ @@ -642,7 +642,7 @@ table tr td:first-child{ table a{ display:block; text-decoration:none; - color:var(--a89984); + color:var(--body); padding:0 10px 0 0; } @@ -657,7 +657,7 @@ table tr a:last-child{ .related a{ padding-bottom:10px; - color:var(--bdae93); + color:var(--heading-and-links); } .related a:hover{ @@ -680,13 +680,13 @@ table tr a:last-child{ bottom:0; width:100%; height:17px; - background:linear-gradient(transparent, var(--1d2021)); + background:linear-gradient(transparent, var(--background)); pointer-events:none; } .web .answer-title{ text-decoration:none; - color:var(--a89984); + color:var(--body); } .web .answer-title a:hover{ @@ -732,7 +732,7 @@ table tr a:last-child{ .web .info-table{ margin:10px 0; font-size:15px; - color:var(--928374); + color:var(--url); background:var(--282828); border:1px dashed var(--504945); } @@ -745,17 +745,17 @@ table tr a:last-child{ width:1%; white-space:nowrap; padding-right:17px; - color:var(--a89984); + color:var(--body); } .web .info-table tr:nth-child(even){ - background:var(--1d2021); + background:var(--background); } .web .sublinks{ padding:17px 10px 0; font-size:15px; - color:var(--#928374); + color:var(--#url); } .web .sublinks table td{ @@ -791,7 +791,7 @@ table tr a:last-child{ .web .wiki-head table, .about table{ margin-top:17px; border:1px dashed var(--504945); - background:var(--1d2021); + background:var(--background); } .web .wiki-head td, .about table td{ @@ -818,7 +818,7 @@ table tr a:last-child{ height:80px; padding-right:4px; float:left; - color:var(--bdae93); + color:var(--heading-and-links); text-decoration:none; display:table; } @@ -864,7 +864,7 @@ table tr a:last-child{ white-space:pre; font-family:monospace; background:var(--3c3836); - color:var(--bdae93); + color:var(--heading-and-links); padding:7px; margin:4px 0 13px 0; overflow-x:auto; @@ -876,8 +876,8 @@ table tr a:last-child{ display:inline; font-family:monospace; background:var(--282828); - color:var(--bdae93); - border:1px solid var(--928374); + color:var(--heading-and-links); + border:1px solid var(--url); padding:0 4px; border-radius:2px; } @@ -893,7 +893,7 @@ table tr a:last-child{ } .web .wiki-head a{ - color:var(--bdae93); + color:var(--heading-and-links); } .quote{ @@ -1035,7 +1035,7 @@ table tr a:last-child{ } #popup-image{ - border:1px solid var(--928374); + border:1px solid var(--url); display:block; margin:0 auto; pointer-events:all; @@ -1052,13 +1052,13 @@ table tr a:last-child{ left:0; width:100%; height:35px; - background:var(--1d2021); - border-bottom:1px solid var(--928374); + background:var(--background); + border-bottom:1px solid var(--url); z-index:4; } #popup-bg{ - background:var(--1d2021); + background:var(--background); opacity:.5; position:fixed; top:0; @@ -1133,14 +1133,14 @@ table tr a:last-child{ .web .settings-submit a{ margin-right:17px; - color:var(--bdae93); + color:var(--heading-and-links); } /* About page */ .about a{ - color:var(--bdae93); + color:var(--heading-and-links); } .about h1, .about h2{ @@ -1185,7 +1185,7 @@ table tr a:last-child{ } .instances a{ - color:var(--bdae93); + color:var(--heading-and-links); } .instances tbody tr:nth-child(even){ @@ -1193,7 +1193,7 @@ table tr a:last-child{ } .instances thead{ - outline:1px solid var(--928374); + outline:1px solid var(--url); outline-offset:-1px; background:var(--3c3836); user-select:none; @@ -1230,13 +1230,13 @@ table tr a:last-child{ width:0; height:0; border:6px solid transparent; - border-top:10px solid var(--bdae93); + border-top:10px solid var(--heading-and-links); } .instances .arrow.up{ top:0; border:6px solid transparent; - border-bottom:10px solid var(--bdae93); + border-bottom:10px solid var(--heading-and-links); } .instances th, .instances td{ @@ -1267,7 +1267,7 @@ table tr a:last-child{ } .instances .popup{ - border:1px solid var(--928374); + border:1px solid var(--url); background:var(--282828); padding:7px 10px; pointer-events:initial; @@ -1362,7 +1362,7 @@ table tr a:last-child{ font-size:24px; font-weight:bold; margin-bottom:17px; - color:var(--bdae93); + color:var(--heading-and-links); } .web .answer{ diff --git a/template/about.html b/template/about.html index 6398884..ed2c2b7 100644 --- a/template/about.html +++ b/template/about.html @@ -24,7 +24,7 @@ Once you're there, click the pencil on the last entry under "Search engines" (it URL with %s in place of query - https://4get.ca/web?s=%s + https://searx.itinerariummentis.org/web?s=%s @@ -72,6 +72,6 @@ I don't know about that second part but if you want to talk to me, just drop me Click here to contact me!

- + Valid W3C HTML 4.01 diff --git a/template/home.html b/template/home.html index 28799f2..cb194ac 100644 --- a/template/home.html +++ b/template/home.html @@ -30,7 +30,7 @@ SettingsInstancesNewsAPIAboutSourceDonate
- ClearnetTorReport a problem
+ ClearnetTorReport a problem
Running on v{%version%}!!
-- cgit v1.2.3