0
0

SearXNG: updated settings.yml

This commit is contained in:
Opnxng 2024-06-08 00:43:19 +08:00
parent bfacb260c0
commit 8315894be3
2 changed files with 146 additions and 88 deletions

View File

@ -16,8 +16,6 @@ They are deployed with [Compose files](templates/compose) and load balanced acco
Our caddy server blocks IP ranges that have been involved in mass spams. The [block range file](https://github.com/ProjectSegfault/ansible/blob/master/privfrontends/blocked-ranges.yaml) is created by [ProjectSegfault](https://projectsegfau.lt/). Thanks to their team. Our caddy server blocks IP ranges that have been involved in mass spams. The [block range file](https://github.com/ProjectSegfault/ansible/blob/master/privfrontends/blocked-ranges.yaml) is created by [ProjectSegfault](https://projectsegfau.lt/). Thanks to their team.
Our SearXNG instance uses a custom [settings.yml](templates/conf/settings.yml.j2). It is updated by hand with reference to [Pussthecat.org's configuration](https://github.com/PussTheCat-org/PussTheCat.org-Configs/tree/master/Services/SearXNG). Thanks to [TheFrenchGhosty](https://github.com/PussTheCat-org).
Data of our Privatebin, Etherpad, and Gitea instances are backed up periodically. Data of our Privatebin, Etherpad, and Gitea instances are backed up periodically.
Passwords and other sensitive data are kept locally as encrypted variables in [secrets.yaml](vars/secrets.example.yaml). We host an Authelia and Firefox stack that is restricted to specific users only. Their related files are also kept locally. Passwords and other sensitive data are kept locally as encrypted variables in [secrets.yaml](vars/secrets.example.yaml). We host an Authelia and Firefox stack that is restricted to specific users only. Their related files are also kept locally.

View File

@ -73,16 +73,14 @@ search:
- html - html
server: server:
# If you change port, bind_address or base_url don't forget to rebuild # Is overwritten by ${SEARXNG_PORT} and ${SEARXNG_BIND_ADDRESS}
# instance's environment (make buildenv). Is overwritten by ${SEARXNG_PORT}
# and ${SEARXNG_BIND_ADDRESS}
port: 8080 port: 8080
bind_address: "0.0.0.0" bind_address: "0.0.0.0"
# public URL of the instance, to ensure correct inbound links. Is overwritten # public URL of the instance, to ensure correct inbound links. Is overwritten
# by ${SEARXNG_URL}. # by ${SEARXNG_URL}.
base_url: "https://opnxng.com" base_url: "https://opnxng.com"
limiter: true # rate limit the number of request on the instance, block some bots limiter: true # rate limit the number of request on the instance, block some bots
public_instance: true public_instance: true # enable features designed only for public instances
# If your instance owns a /etc/searxng/settings.yml file, then set the following # If your instance owns a /etc/searxng/settings.yml file, then set the following
# values there. # values there.
@ -95,7 +93,10 @@ server:
# problems when using Firefox containers # problems when using Firefox containers
method: "POST" method: "POST"
default_http_headers: default_http_headers:
# X-Content-Type-Options: nosniff
X-Download-Options: noopen X-Download-Options: noopen
# X-Robots-Tag: noindex, nofollow
# Referrer-Policy: no-referrer
redis: redis:
# URL to connect redis database. Is overwritten by ${SEARXNG_REDIS_URL}. # URL to connect redis database. Is overwritten by ${SEARXNG_REDIS_URL}.
@ -190,6 +191,19 @@ outgoing:
- socks5://{{ oracle4_private_ip }}:8870 - socks5://{{ oracle4_private_ip }}:8870
- socks5h://{{ oracle4_private_ip }}:8870 - socks5h://{{ oracle4_private_ip }}:8870
# using_tor_proxy: true
#
# Extra seconds to add in order to account for the time taken by the proxy
#
# extra_proxy_timeout: 10
#
# uncomment below section only if you have more than one network interface
# which can be the source of outgoing search requests
#
# source_ips:
# - 1.1.1.1
# - 1.1.1.2
# - fe80::/126
# External plugin configuration, for more details see # External plugin configuration, for more details see
# https://docs.searxng.org/dev/plugins.html # https://docs.searxng.org/dev/plugins.html
@ -249,7 +263,6 @@ hostnames:
'(.*\.)?stackapps\.com$': 'code.whatever.social/exchange/stackapps.com' '(.*\.)?stackapps\.com$': 'code.whatever.social/exchange/stackapps.com'
'(.*\.)?askubuntu\.com$': 'code.whatever.social/exchange/askubuntu.com' '(.*\.)?askubuntu\.com$': 'code.whatever.social/exchange/askubuntu.com'
remove: remove:
- '(.*\.)?facebook.com$'
- 'com\.de' - 'com\.de'
- '(.*\.)?codegrepper\.com' - '(.*\.)?codegrepper\.com'
- '(.*\.)?w3schools\.com' - '(.*\.)?w3schools\.com'
@ -461,7 +474,6 @@ hostnames:
# high_priority: # high_priority:
# - '(.*\.)?wikipedia.org$' # - '(.*\.)?wikipedia.org$'
checker: checker:
# disable checker when in debug mode # disable checker when in debug mode
off_when_debug: true off_when_debug: true
@ -671,33 +683,20 @@ engines:
shortcut: bt shortcut: bt
disabled: true disabled: true
- name: ccc-tv
engine: xpath
paging: false
search_url: https://media.ccc.de/search/?q={query}
url_xpath: //div[@class="caption"]/h3/a/@href
title_xpath: //div[@class="caption"]/h3/a/text()
content_xpath: //div[@class="caption"]/h4/@title
categories: videos
disabled: true
shortcut: c3tv
about:
website: https://media.ccc.de/
wikidata_id: Q80729951
official_api_documentation: https://github.com/voc/voctoweb
use_official_api: false
require_api_key: false
results: HTML
# We don't set language: de here because media.ccc.de is not just
# for a German audience. It contains many English videos and many
# German videos have English subtitles.
- name: openverse - name: openverse
engine: openverse engine: openverse
categories: images categories: images
shortcut: opv shortcut: opv
disabled: true disabled: true
- name: media.ccc.de
engine: ccc_media
shortcut: c3tv
# We don't set language: de here because media.ccc.de is not just
# for a German audience. It contains many English videos and many
# German videos have English subtitles.
disabled: true
- name: chefkoch - name: chefkoch
engine: chefkoch engine: chefkoch
shortcut: chef shortcut: chef
@ -743,6 +742,7 @@ engines:
shortcut: yep shortcut: yep
categories: general categories: general
search_type: web search_type: web
timeout: 5
disabled: true disabled: true
- name: yep images - name: yep images
@ -812,7 +812,6 @@ engines:
test: test:
- unique_results - unique_results
- name: deezer - name: deezer
engine: deezer engine: deezer
shortcut: dz shortcut: dz
@ -979,6 +978,11 @@ engines:
shortcut: fd shortcut: fd
disabled: true disabled: true
- name: findthatmeme
engine: findthatmeme
shortcut: ftm
disabled: true
- name: flickr - name: flickr
categories: images categories: images
shortcut: fl shortcut: fl
@ -1024,7 +1028,7 @@ engines:
- name: genius - name: genius
engine: genius engine: genius
shortcut: gen shortcut: gen
disabled: true categories: music
- name: gentoo - name: gentoo
engine: gentoo engine: gentoo
@ -1057,26 +1061,18 @@ engines:
shortcut: gh shortcut: gh
categories: [it, q&a] categories: [it, q&a]
# This a Gitea service. If you would like to use a different instance,
# change codeberg.org to URL of the desired Gitea host. Or you can create a
# new engine by copying this and changing the name, shortcut and search_url.
- name: codeberg - name: codeberg
engine: json_engine # https://docs.searxng.org/dev/engines/online/gitea.html
search_url: https://codeberg.org/api/v1/repos/search?q={query}&limit=10 engine: gitea
url_query: html_url base_url: https://codeberg.org
title_query: name
content_query: description
categories: [it, repos]
shortcut: cb shortcut: cb
disabled: true disabled: true
about:
website: https://codeberg.org/ - name: gitea.com
wikidata_id: engine: gitea
official_api_documentation: https://try.gitea.io/api/swagger base_url: https://gitea.com
use_official_api: false shortcut: gitea
require_api_key: false disabled: true
results: JSON
{% endraw %} {% endraw %}
@ -1191,6 +1187,20 @@ engines:
shortcut: hn shortcut: hn
disabled: true disabled: true
- name: hex
engine: hex
shortcut: hex
disabled: true
# Valid values: name inserted_at updated_at total_downloads recent_downloads
sort_criteria: "recent_downloads"
page_size: 10
- name: crates.io
engine: crates
shortcut: crates
disabled: true
timeout: 6.0
- name: hoogle - name: hoogle
engine: xpath engine: xpath
search_url: https://hoogle.haskell.org/?hoogle={query} search_url: https://hoogle.haskell.org/?hoogle={query}
@ -1319,6 +1329,16 @@ engines:
categories: images categories: images
disabled: true disabled: true
- name: libretranslate
engine: libretranslate
# https://github.com/LibreTranslate/LibreTranslate?tab=readme-ov-file#mirrors
base_url:
- https://translate.terraprint.co
- https://trans.zillyhuhn.com
# api_key: abc123
shortcut: lt
disabled: true
- name: lingva - name: lingva
engine: lingva engine: lingva
shortcut: lv shortcut: lv
@ -1345,25 +1365,6 @@ engines:
require_api_key: false require_api_key: false
results: HTML results: HTML
- name: azlyrics
shortcut: lyrics
engine: xpath
timeout: 4.0
disabled: true
categories: [music, lyrics]
paging: true
search_url: https://search.azlyrics.com/search.php?q={query}&w=lyrics&p={pageno}
url_xpath: //td[@class="text-left visitedlyr"]/a/@href
title_xpath: //span/b/text()
content_xpath: //td[@class="text-left visitedlyr"]/a/small
about:
website: https://azlyrics.com
wikidata_id: Q66372542
official_api_documentation:
use_official_api: false
require_api_key: false
results: HTML
- name: mastodon users - name: mastodon users
engine: mastodon engine: mastodon
mastodon_type: accounts mastodon_type: accounts
@ -1836,6 +1837,20 @@ engines:
# engine: scanr_structures # engine: scanr_structures
# disabled: true # disabled: true
- name: searchmysite
engine: xpath
shortcut: sms
categories: general
paging: true
search_url: https://searchmysite.net/search/?q={query}&page={pageno}
results_xpath: //div[contains(@class,'search-result')]
url_xpath: .//a[contains(@class,'result-link')]/@href
title_xpath: .//span[contains(@class,'result-title-txt')]/text()
content_xpath: ./p[@id='result-hightlight']
disabled: true
about:
website: https://searchmysite.net
- name: sepiasearch - name: sepiasearch
engine: sepiasearch engine: sepiasearch
shortcut: sep shortcut: sep
@ -1861,7 +1876,7 @@ engines:
- name: internetarchivescholar - name: internetarchivescholar
engine: internet_archive_scholar engine: internet_archive_scholar
shortcut: ias shortcut: ias
timeout: 5.0 timeout: 15.0
disabled: true disabled: true
- name: superuser - name: superuser
@ -1870,6 +1885,27 @@ engines:
api_site: 'superuser' api_site: 'superuser'
categories: [it, q&a] categories: [it, q&a]
- name: discuss.python
engine: discourse
shortcut: dpy
base_url: 'https://discuss.python.org'
categories: [it, q&a]
disabled: true
- name: caddy.community
engine: discourse
shortcut: caddy
base_url: 'https://caddy.community'
categories: [it, q&a]
disabled: true
- name: pi-hole.community
engine: discourse
shortcut: pi
categories: [it, q&a]
base_url: 'https://discourse.pi-hole.net'
disabled: true
- name: searchcode code - name: searchcode code
engine: searchcode_code engine: searchcode_code
shortcut: scc shortcut: scc
@ -2204,6 +2240,28 @@ engines:
engine: wikicommons engine: wikicommons
shortcut: wc shortcut: wc
categories: images categories: images
search_type: images
number_of_results: 10
- name: wikicommons.videos
engine: wikicommons
shortcut: wcv
categories: videos
search_type: videos
number_of_results: 10
- name: wikicommons.audio
engine: wikicommons
shortcut: wca
categories: music
search_type: audio
number_of_results: 10
- name: wikicommons.files
engine: wikicommons
shortcut: wcf
categories: files
search_type: files
number_of_results: 10 number_of_results: 10
- name: wolframalpha - name: wolframalpha
@ -2270,26 +2328,25 @@ engines:
- name: mojeek - name: mojeek
shortcut: mjk shortcut: mjk
engine: xpath engine: mojeek
paging: true
categories: [general, web] categories: [general, web]
search_url: https://www.mojeek.com/search?q={query}&s={pageno}&lang={lang}&lb={lang}
results_xpath: //ul[@class="results-standard"]/li/a[@class="ob"]
url_xpath: ./@href
title_xpath: ../h2/a
content_xpath: ..//p[@class="s"]
suggestion_xpath: //div[@class="top-info"]/p[@class="top-info spell"]/em/a
first_page_num: 0
page_size: 10
max_page: 100
disabled: true disabled: true
about:
website: https://www.mojeek.com/ - name: mojeek images
wikidata_id: Q60747299 shortcut: mjkimg
official_api_documentation: https://www.mojeek.com/services/api.html/ engine: mojeek
use_official_api: false categories: [images, web]
require_api_key: false search_type: images
results: HTML paging: false
disabled: true
- name: mojeek news
shortcut: mjknews
engine: mojeek
categories: [news, web]
search_type: news
paging: false
disabled: true
- name: moviepilot - name: moviepilot
engine: moviepilot engine: moviepilot
@ -2357,7 +2414,11 @@ engines:
engine: yacy engine: yacy
categories: general categories: general
search_type: text search_type: text
base_url: https://yacy.searchlab.eu base_url:
- https://yacy.searchlab.eu
- https://search.lomig.me
- https://yacy.ecosys.eu
- https://search.webproject.link
shortcut: ya shortcut: ya
disabled: true disabled: true
# required if you aren't using HTTPS for your local yacy instance # required if you aren't using HTTPS for your local yacy instance
@ -2370,7 +2431,6 @@ engines:
engine: yacy engine: yacy
categories: images categories: images
search_type: image search_type: image
base_url: https://yacy.searchlab.eu
shortcut: yai shortcut: yai
disabled: true disabled: true