SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
utils/searx.sh & filtron.sh: misc changes from first tests (WIP)
Markus Heiser6274a54746b4
diff --git a/utils/filtron.sh b/utils/filtron.shindex 6ea001d42..d6e5b6a1b 100755--- a/utils/filtron.sh+++ b/utils/filtron.sh@@ -11,6 +11,10 @@ source_dot_config# config# ----------------------------------------------------------------------------+FILTRON_URL_PATH="${FILTRON_URL_PATH:-$(echo "${PUBLIC_URL}" \+| sed -e 's,^.*://[^/]*\(/.*\),\1,g')}"+[[ "${FILTRON_URL_PATH}" == "${PUBLIC_URL}" ]] && FILTRON_URL_PATH=/+FILTRON_ETC="/etc/filtron"FILTRON_RULES="$FILTRON_ETC/rules.json"@@ -192,7 +196,9 @@ installations that were installed with this script."wait_keyremove_userrm -r "$FILTRON_ETC" 2>&1 | prefix_stdout- wait_key+ if service_is_available "${PUBLIC_URL}"; then+ MSG="** Don't forget to remove your public site! (${PUBLIC_URL}) **" wait_key 10+ fi}install_service() {@@ -329,6 +335,7 @@ inspect_service() {sourced ${DOT_CONFIG#"$REPO_ROOT/"} :PUBLIC_URL : ${PUBLIC_URL}+ FILTRON_URL_PATH : ${FILTRON_URL_PATH}FILTRON_API : ${FILTRON_API}FILTRON_LISTEN : ${FILTRON_LISTEN}FILTRON_TARGET : ${FILTRON_TARGET}@@ -395,6 +402,7 @@ This installs a reverse proxy (ProxyPass) into apache site (${APACHE_FILTRON_SITreturnfi+ a2enmod headersa2enmod proxya2enmod proxy_httpdiff --git a/utils/lib.sh b/utils/lib.shindex e2bcd8e9d..0586b2575 100755--- a/utils/lib.sh+++ b/utils/lib.sh@@ -121,10 +121,11 @@ wait_key(){clean_stdinlocal _t=$1+ local msg="${MSG:-** press any [KEY] to continue **}"[[ ! -z $FORCE_TIMEOUT ]] && _t=$FORCE_TIMEOUT[[ ! -z $_t ]] && _t="-t $_t"# shellcheck disable=SC2086- read -r -s -n1 $_t -p "** press any [KEY] to continue **"+ read -r -s -n1 $_t -p "$msg"echoclean_stdin}@@ -436,6 +437,9 @@ service_is_available() {if [[ $exit_val = 0 ]]; theninfo_msg "got $http_code from ${URL}"fi+ case "$http_code" in+ 404|410|423) exit_val=$http_code;;+ esacreturn $exit_val}diff --git a/utils/searx.sh b/utils/searx.shindex a352c0439..b036541cf 100755--- a/utils/searx.sh+++ b/utils/searx.sh@@ -275,6 +275,9 @@ installations that were installed with this script."remove_searx_uwsgiwait_keyremove_user+ if service_is_available "${PUBLIC_URL}"; then+ MSG="** Don't forgett to remove your public site! (${PUBLIC_URL}) **" wait_key 10+ fi}user_is_available() {diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtronindex d2f5431a7..f0914e9f9 100644--- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron+++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron@@ -1,3 +1,15 @@# -*- coding: utf-8; mode: apache -*--ProxyPass "/searx" "http://127.0.0.1:4004/"+<Location ${FILTRON_URL_PATH} >++ Require all granted+ Allow from all++ Order deny,allow+ Deny from all+ #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1++ ProxyPass "http://127.0.0.1:4004"+ RequestHeader set "X-Script-Name" "${FILTRON_URL_PATH}"++</Location>