Openyx commited on
Commit
37c87e8
·
verified ·
1 Parent(s): 047378c

Upload 954 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .coveragerc +11 -0
  2. .devcontainer/Dockerfile +22 -0
  3. .devcontainer/devcontainer.json +35 -0
  4. .dir-locals-template.el +163 -0
  5. .dockerignore +24 -0
  6. .editorconfig +72 -0
  7. .gitattributes +13 -35
  8. .github/ISSUE_TEMPLATE/bug-report.md +50 -0
  9. .github/ISSUE_TEMPLATE/config.yml +5 -0
  10. .github/ISSUE_TEMPLATE/engine-request.md +46 -0
  11. .github/ISSUE_TEMPLATE/feature-request.md +32 -0
  12. .github/dependabot.yml +75 -0
  13. .github/workflows/container.yml +200 -0
  14. .github/workflows/data-update.yml +87 -0
  15. .github/workflows/documentation.yml +68 -0
  16. .github/workflows/integration.yml +100 -0
  17. .github/workflows/l10n.yml +140 -0
  18. .github/workflows/security.yml +46 -0
  19. .gitignore +29 -0
  20. .nvmrc +1 -0
  21. .pylintrc +408 -0
  22. .vscode/launch.json +23 -0
  23. .vscode/settings.json +11 -0
  24. .vscode/tasks.json +36 -0
  25. .weblate +3 -0
  26. .yamllint.yml +16 -0
  27. AI_POLICY.rst +20 -0
  28. AUTHORS.rst +181 -0
  29. CHANGELOG.rst +14 -0
  30. CONTRIBUTING.rst +98 -0
  31. Dockerfile +30 -0
  32. LICENSE +661 -0
  33. Makefile +93 -0
  34. PULL_REQUEST_TEMPLATE.md +34 -0
  35. README.rst +62 -0
  36. SECURITY.md +10 -0
  37. babel.cfg +6 -0
  38. client/simple/.gitignore +2 -0
  39. client/simple/.stylelintrc.json +19 -0
  40. client/simple/README.rst +24 -0
  41. client/simple/biome.json +169 -0
  42. client/simple/generated/pygments.less +177 -0
  43. client/simple/package-lock.json +0 -0
  44. client/simple/package.json +49 -0
  45. client/simple/src/brand/img_load_error.svg +0 -0
  46. client/simple/src/brand/searxng-wordmark.svg +0 -0
  47. client/simple/src/brand/searxng.svg +0 -0
  48. client/simple/src/js/Plugin.ts +66 -0
  49. client/simple/src/js/index.ts +4 -0
  50. client/simple/src/js/loader.ts +36 -0
.coveragerc ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [run]
2
+ branch = True
3
+ source = searx
4
+
5
+ [report]
6
+ show_missing = True
7
+ exclude_lines =
8
+ if __name__ == .__main__.:
9
+
10
+ [html]
11
+ directory = coverage
.devcontainer/Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG DEBIAN_CODENAME="bookworm"
2
+
3
+ FROM mcr.microsoft.com/devcontainers/base:$DEBIAN_CODENAME
4
+
5
+ ARG DEBIAN_CODENAME="bookworm"
6
+
7
+ RUN cat <<EOF > /etc/apt/sources.list.d/debian.sources
8
+ Types: deb
9
+ URIs: http://deb.debian.org/debian
10
+ Suites: $DEBIAN_CODENAME $DEBIAN_CODENAME-updates $DEBIAN_CODENAME-backports
11
+ Components: main
12
+ Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
13
+
14
+ Types: deb
15
+ URIs: http://security.debian.org/debian-security
16
+ Suites: $DEBIAN_CODENAME-security
17
+ Components: main
18
+ Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
19
+ EOF
20
+
21
+ RUN apt-get update && \
22
+ apt-get -y install python3 python3-venv valkey-server firefox-esr graphviz imagemagick librsvg2-bin fonts-dejavu shellcheck
.devcontainer/devcontainer.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "build": {
3
+ "args": {
4
+ "DEBIAN_CODENAME": "bookworm",
5
+ },
6
+ "dockerfile": "Dockerfile"
7
+ },
8
+ "features": {
9
+ "ghcr.io/devcontainers/features/github-cli": {},
10
+ "ghcr.io/devcontainers/features/docker-in-docker": {}
11
+ },
12
+ "customizations": {
13
+ "vscode": {
14
+ "extensions": [
15
+ "ms-python.python",
16
+ "ms-azuretools.vscode-docker"
17
+ ],
18
+ "remote.otherPortsAttributes": {
19
+ "protocol": "https"
20
+ },
21
+ "settings": {
22
+ "files.autoSave": "off",
23
+ "python.defaultInterpreterPath": "/workspaces/searxng/local/py3/bin/python3",
24
+ "python.formatting.blackPath": "/workspaces/searxng/local/py3/bin/black",
25
+ "python.linting.pylintPath": "/workspaces/searxng/local/py3/bin/pylint"
26
+ }
27
+ }
28
+ },
29
+ "forwardPorts": [8000, 8888],
30
+ "portsAttributes": {
31
+ "8000": {"label": "Sphinx documentation"},
32
+ "8888": {"label": "SearXNG"}
33
+ },
34
+ "postCreateCommand": "git pull && make install"
35
+ }
.dir-locals-template.el ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;;; .dir-locals.el
2
+ ;;
3
+ ;; Per-Directory Local Variables:
4
+ ;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
5
+ ;;
6
+ ;; For full fledge developer tools install emacs packages:
7
+ ;;
8
+ ;; M-x package-install ...
9
+ ;;
10
+ ;; magit gitconfig
11
+ ;; nvm lsp-mode lsp-pyright lsp-eslint
12
+ ;; pyvenv pylint pip-requirements
13
+ ;; jinja2-mode
14
+ ;; json-mode
15
+ ;; company company-jedi company-quickhelp company-shell
16
+ ;; realgud
17
+ ;; sphinx-doc markdown-mode graphviz-dot-mode
18
+ ;; apache-mode nginx-mode
19
+ ;;
20
+ ;; To setup a developer environment, build target::
21
+ ;;
22
+ ;; $ make node.env.dev pyenv.install
23
+ ;;
24
+ ;; Some buffer locals are referencing the project environment:
25
+ ;;
26
+ ;; - prj-root --> <repo>/
27
+ ;; - nvm-dir --> <repo>/.nvm
28
+ ;; - python-environment-directory --> <repo>/local
29
+ ;; - python-environment-default-root-name --> py3
30
+ ;; - python-shell-virtualenv-root --> <repo>/local/py3
31
+ ;; When this variable is set with the path of the virtualenv to use,
32
+ ;; `process-environment' and `exec-path' get proper values in order to run
33
+ ;; shells inside the specified virtualenv, example::
34
+ ;; (setq python-shell-virtualenv-root "/path/to/env/")
35
+ ;; - python-shell-interpreter --> <repo>/local/py3/bin/python
36
+ ;;
37
+ ;; Python development:
38
+ ;;
39
+ ;; Jedi, flycheck & other python stuff should use the 'python-shell-interpreter'
40
+ ;; from the local py3 environment.
41
+ ;;
42
+
43
+ ((nil
44
+ . ((fill-column . 80)
45
+ (indent-tabs-mode . nil)
46
+ (eval . (progn
47
+
48
+ (add-to-list 'auto-mode-alist '("\\.html\\'" . jinja2-mode))
49
+
50
+ ;; project root folder is where the `.dir-locals.el' is located
51
+ (setq-local prj-root
52
+ (locate-dominating-file default-directory ".dir-locals.el"))
53
+
54
+ (setq-local python-environment-directory
55
+ (expand-file-name "./local" prj-root))
56
+
57
+ ;; to get in use of NVM environment, install https://github.com/rejeep/nvm.el
58
+ (setq-local nvm-dir (expand-file-name "./.nvm" prj-root))
59
+
60
+ ;; use nodejs from the (local) NVM environment (see nvm-dir)
61
+ (nvm-use-for-buffer)
62
+ (ignore-errors (require 'lsp))
63
+ (setq-local lsp-server-install-dir (car (cdr nvm-current-version)))
64
+ (setq-local lsp-enable-file-watchers nil)
65
+
66
+ ;; use 'py3' environment as default
67
+ (setq-local python-environment-default-root-name
68
+ "py3")
69
+
70
+ (setq-local python-shell-virtualenv-root
71
+ (expand-file-name
72
+ python-environment-default-root-name python-environment-directory))
73
+
74
+ (setq-local python-shell-interpreter
75
+ (expand-file-name
76
+ "bin/python" python-shell-virtualenv-root))))))
77
+ (makefile-gmake-mode
78
+ . ((indent-tabs-mode . t)))
79
+
80
+ (yaml-mode
81
+ . ((eval . (progn
82
+
83
+ ;; flycheck should use the local py3 environment
84
+ (setq-local flycheck-yaml-yamllint-executable
85
+ (expand-file-name "bin/yamllint" python-shell-virtualenv-root))
86
+
87
+ (setq-local flycheck-yamllintrc
88
+ (expand-file-name ".yamllint.yml" prj-root))
89
+
90
+ (flycheck-checker . yaml-yamllint)))))
91
+
92
+ (json-mode
93
+ . ((eval . (progn
94
+ (setq-local js-indent-level 4)
95
+ (flycheck-checker . json-python-json)))))
96
+
97
+ (js-mode
98
+ . ((eval . (progn
99
+ (ignore-errors (require 'lsp-eslint))
100
+ (setq-local js-indent-level 2)
101
+ ;; flycheck should use the eslint checker from developer tools
102
+ (setq-local flycheck-javascript-eslint-executable
103
+ (expand-file-name "node_modules/.bin/eslint" prj-root))
104
+ ;; (flycheck-mode)
105
+
106
+ (if (featurep 'lsp-eslint)
107
+ (lsp))
108
+ ))))
109
+
110
+ (python-mode
111
+ . ((eval . (progn
112
+ (ignore-errors (require 'jedi-core))
113
+ (ignore-errors (require 'lsp-pyright))
114
+ (ignore-errors (sphinx-doc-mode))
115
+ (setq-local python-environment-virtualenv
116
+ (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
117
+ ;;"--system-site-packages"
118
+ "--quiet"))
119
+
120
+ (setq-local pylint-command
121
+ (expand-file-name "bin/pylint" python-shell-virtualenv-root))
122
+
123
+ (if (featurep 'lsp-pyright)
124
+ (lsp))
125
+
126
+ ;; pylint will find the '.pylintrc' file next to the CWD
127
+ ;; https://pylint.readthedocs.io/en/latest/user_guide/run.html#command-line-options
128
+ (setq-local flycheck-pylintrc
129
+ ".pylintrc")
130
+
131
+ ;; flycheck & other python stuff should use the local py3 environment
132
+ (setq-local flycheck-python-pylint-executable
133
+ python-shell-interpreter)
134
+
135
+ ;; use 'M-x jedi:show-setup-info' and 'M-x epc:controller' to inspect jedi server
136
+ ;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-root -- You
137
+ ;; can specify a full path instead of a name (relative path). In that case,
138
+ ;; python-environment-directory is ignored and Python virtual environment
139
+ ;; is created at the specified path.
140
+ (setq-local jedi:environment-root
141
+ python-shell-virtualenv-root)
142
+
143
+ ;; https://tkf.github.io/emacs-jedi/latest/#jedi:server-command
144
+ (setq-local jedi:server-command
145
+ (list python-shell-interpreter
146
+ jedi:server-script))
147
+
148
+ ;; jedi:environment-virtualenv --> see above 'python-environment-virtualenv'
149
+ ;; is set buffer local! No need to setup jedi:environment-virtualenv:
150
+ ;;
151
+ ;; Virtualenv command to use. A list of string. If it is nil,
152
+ ;; python-environment-virtualenv is used instead. You must set non-nil
153
+ ;; value to jedi:environment-root in order to make this setting work.
154
+ ;;
155
+ ;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-virtualenv
156
+ ;;
157
+ ;; (setq-local jedi:environment-virtualenv
158
+ ;; (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
159
+ ;; "--python"
160
+ ;; "/usr/bin/python3.4"
161
+ ;; ))
162
+ ))))
163
+ )
.dockerignore ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ *.pyd
5
+ .Python
6
+ build/
7
+ dist/
8
+ *.egg-info
9
+ .git/
10
+ .github/
11
+ .env
12
+ venv/
13
+ __pycache__/
14
+
15
+ # Allow SearXNG app files and Docker deployment files
16
+ !.dockerignore
17
+ !Dockerfile
18
+ !setup.py
19
+ !requirements.txt
20
+ !requirements-dev.txt
21
+ !searx/**
22
+ !searxng_extra/**
23
+ !manage
24
+ !utils/**
.editorconfig ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # https://editorconfig.org/
2
+
3
+ root = true
4
+
5
+ [*]
6
+ indent_style = space
7
+ indent_size = 4
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ end_of_line = lf
11
+ charset = utf-8
12
+
13
+ [{*.py,*.pyi}]
14
+ # code formatter accepts length of 120, but editor should prefer 80
15
+ max_line_length = 80
16
+
17
+ [{*.sh,manage}]
18
+ indent_style = space
19
+ indent_size = 4
20
+
21
+ # shfmt options
22
+ shell_variant = bash
23
+ switch_case_indent = true
24
+
25
+ [*.html]
26
+ # in the jinja templates we use indent size of 2 and we do not use tabs
27
+ indent_size = 2
28
+ indent_style = space
29
+
30
+ [*.css]
31
+ indent_size = 2
32
+
33
+ [*.less]
34
+ indent_size = 2
35
+
36
+ [*.js]
37
+ indent_size = 2
38
+
39
+ [*.ts]
40
+ indent_size = 2
41
+
42
+ [*.json]
43
+ indent_size = 2
44
+ insert_final_newline = ignore
45
+
46
+ [*.map]
47
+ indent_size = ignore
48
+ insert_final_newline = ignore
49
+
50
+ # Minified JavaScript files shouldn't be changed
51
+ [*.min.js]
52
+ indent_style = ignore
53
+ insert_final_newline = ignore
54
+
55
+ # Minified CSS files shouldn't be changed
56
+ [*.min.css]
57
+ indent_style = ignore
58
+ insert_final_newline = ignore
59
+
60
+ # Makefiles always use tabs for indentation
61
+ [Makefile]
62
+ indent_style = tab
63
+
64
+ # Batch files use tabs for indentation
65
+ [*.bat]
66
+ indent_style = tab
67
+
68
+ [docs/**.rst]
69
+ max_line_length = 79
70
+
71
+ [*.yml]
72
+ indent_size = 2
.gitattributes CHANGED
@@ -1,35 +1,13 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ *.gif -diff
2
+ *.png -diff
3
+ *.min.css -diff
4
+ *.min.js -diff
5
+ *.css.map -diff
6
+ *.js.map -diff
7
+ *.eot -diff
8
+ *.svg -diff
9
+ *.ttf -diff
10
+ *.woff -diff
11
+ *.woff2 -diff
12
+ messages.mo -diff
13
+ searx/data/lid.176.ftz filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.github/ISSUE_TEMPLATE/bug-report.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: "Bug report"
3
+ about: Report a bug in SearXNG"
4
+ labels: ["bug"]
5
+ type: "bug"
6
+ ---
7
+
8
+ _Replace this placeholder with a meaningful and precise description of the bug._
9
+
10
+ <!-- FILL IN THESE FIELDS .. and delete the comments after reading.
11
+
12
+ Use Markdown for formatting -> https://www.markdowntools.io/cheat-sheet
13
+ -->
14
+
15
+ ### How To Reproduce?
16
+
17
+ <!-- How can we reproduce this issue? (as minimally and as precisely as
18
+ possible) -->
19
+
20
+ ### Expected behavior
21
+
22
+ <!-- A clear and concise description of what you expected to happen. -->
23
+
24
+ ### Screenshots & Logs
25
+
26
+ <!-- If applicable, add screenshots, logs to help explain your problem. -->
27
+
28
+ ### Version of SearXNG
29
+
30
+ <!-- Commit number if you are using on master branch and stipulate if you forked
31
+ SearXNG -->
32
+
33
+ <!-- Look at the bottom of the SearXNG page and check for the version after
34
+ "Powered by SearXNG" If you are using a forked version of SearXNG include a
35
+ link to the fork source code. -->
36
+
37
+ ### How did you install SearXNG?
38
+
39
+ <!-- Did you install SearXNG using the official documentation or using
40
+ searxng-docker? -->
41
+
42
+ ### Additional context
43
+
44
+ <!-- Add any other context about the problem here. -->
45
+
46
+ ### Code of Conduct
47
+
48
+ [AI Policy]: https://github.com/searxng/searxng/blob/master/AI_POLICY.rst
49
+
50
+ - [ ] I read the [AI Policy] and hereby confirm that this issue conforms with the policy.
.github/ISSUE_TEMPLATE/config.yml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Questions & Answers (Q&A)
4
+ url: https://github.com/searxng/searxng/discussions/categories/q-a
5
+ about: Ask questions and find answers
.github/ISSUE_TEMPLATE/engine-request.md ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Engine request"
3
+ about: Request a new engine in SearXNG"
4
+ labels: ["engine request"]
5
+ type: "feature"
6
+ ---
7
+
8
+ <!-- FILL IN THESE FIELDS .. and delete the comments after reading.
9
+
10
+ Use Markdown for formatting -> https://www.markdowntools.io/cheat-sheet
11
+ -->
12
+
13
+ ### Working URL to the engine
14
+
15
+ <!-- Please check if the engine is responding correctly before submitting -->
16
+
17
+ ### Why do you want to add this engine?
18
+
19
+ <!-- What's special about this engine? -->
20
+
21
+ ### Features of this engine
22
+
23
+ <!-- Features of this engine: Serves special content, is fast, is easy to
24
+ integrate, ... ? -->
25
+
26
+ ### How can SearXNG fetch results from this engine?
27
+
28
+ <!-- List API URL, example code and more that could be useful for the developers
29
+ in order to implement this engine. If you don't know what to write, let
30
+ this part blank. -->
31
+
32
+ ### Applicable category of this engine
33
+
34
+ <!-- Where should this new engine fit in SearXNG? Current categories in
35
+ SearXNG: general, files, images, it, map, music, news, science, social
36
+ media and videos. -->
37
+
38
+ ### Additional context
39
+
40
+ <!-- Add any other context about the problem here. -->
41
+
42
+ ### Code of Conduct
43
+
44
+ [AI Policy]: https://github.com/searxng/searxng/blob/master/AI_POLICY.rst
45
+
46
+ - [ ] I read the [AI Policy] and hereby confirm that this issue conforms with the policy.
.github/ISSUE_TEMPLATE/feature-request.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: "Feature request"
3
+ about: "Request a new feature in SearXNG"
4
+ labels: ["new feature"]
5
+ type: "feature"
6
+ ---
7
+
8
+ _Replace this placeholder with a concise description of the feature._
9
+
10
+ <!-- FILL IN THESE FIELDS .. and delete the comments after reading.
11
+
12
+ Use Markdown for formatting -> https://www.markdowntools.io/cheat-sheet
13
+ -->
14
+
15
+ ### Is your feature request related to a problem?
16
+
17
+ <!-- A clear and concise description of what the problem is. Ex. I'm always
18
+ frustrated when [...] -->
19
+
20
+ ### Describe the solution you'd like
21
+
22
+ <!-- A clear and concise description of what you want to happen. -->
23
+
24
+ ### Describe alternatives you've considered
25
+
26
+ <!-- A clear and concise description of any alternative solutions or features you've considered. -->
27
+
28
+ ### Code of Conduct
29
+
30
+ [AI Policy]: https://github.com/searxng/searxng/blob/master/AI_POLICY.rst
31
+
32
+ - [ ] I read the [AI Policy] and hereby confirm that this issue conforms with the policy.
.github/dependabot.yml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: "pip"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "friday"
9
+ open-pull-requests-limit: 5
10
+ target-branch: "master"
11
+ commit-message:
12
+ prefix: "[upd] pypi:"
13
+ groups:
14
+ minor:
15
+ applies-to: version-updates
16
+ update-types:
17
+ - "minor"
18
+ - "patch"
19
+
20
+ - package-ecosystem: "npm"
21
+ directory: "/client/simple"
22
+ schedule:
23
+ interval: "weekly"
24
+ day: "friday"
25
+ open-pull-requests-limit: 5
26
+ target-branch: "master"
27
+ commit-message:
28
+ prefix: "[upd] web-client (simple):"
29
+ groups:
30
+ minor:
31
+ applies-to: version-updates
32
+ update-types:
33
+ - "minor"
34
+ - "patch"
35
+
36
+ - package-ecosystem: "npm"
37
+ directory: "/"
38
+ schedule:
39
+ interval: "weekly"
40
+ day: "friday"
41
+ open-pull-requests-limit: 5
42
+ target-branch: "master"
43
+ commit-message:
44
+ prefix: "[upd] searxng.org/devtools (Node.js):"
45
+ groups:
46
+ minor:
47
+ applies-to: version-updates
48
+ update-types:
49
+ - "minor"
50
+ - "patch"
51
+
52
+ - package-ecosystem: "gomod"
53
+ directory: "/"
54
+ schedule:
55
+ interval: "weekly"
56
+ day: "friday"
57
+ open-pull-requests-limit: 5
58
+ target-branch: "master"
59
+ commit-message:
60
+ prefix: "[upd] searxng.org/devtools (Go):"
61
+ groups:
62
+ minor:
63
+ applies-to: version-updates
64
+ update-types:
65
+ - "minor"
66
+ - "patch"
67
+
68
+ - package-ecosystem: "github-actions"
69
+ directory: "/"
70
+ schedule:
71
+ interval: "weekly"
72
+ day: "friday"
73
+ target-branch: "master"
74
+ commit-message:
75
+ prefix: "[upd] github-actions:"
.github/workflows/container.yml ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Container
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ workflow_dispatch:
7
+ workflow_run:
8
+ workflows:
9
+ - Integration
10
+ types:
11
+ - completed
12
+ branches:
13
+ - master
14
+
15
+ concurrency:
16
+ group: ${{ github.workflow }}
17
+ cancel-in-progress: false
18
+
19
+ permissions:
20
+ contents: read
21
+ packages: read
22
+
23
+ env:
24
+ PYTHON_VERSION: "3.14"
25
+
26
+ jobs:
27
+ build:
28
+ if: github.repository_owner == 'searxng' || github.event_name == 'workflow_dispatch'
29
+ name: Build (${{ matrix.arch }})
30
+ runs-on: ${{ matrix.os }}
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ include:
35
+ - arch: amd64
36
+ march: amd64
37
+ os: ubuntu-24.04
38
+ emulation: false
39
+ - arch: arm64
40
+ march: arm64
41
+ os: ubuntu-24.04-arm
42
+ emulation: false
43
+ - arch: armv7
44
+ march: arm64
45
+ os: ubuntu-24.04-arm
46
+ emulation: true
47
+
48
+ permissions:
49
+ packages: write
50
+
51
+ outputs:
52
+ docker_tag: ${{ steps.build.outputs.docker_tag }}
53
+ git_url: ${{ steps.build.outputs.git_url }}
54
+
55
+ steps:
56
+ # yamllint disable rule:line-length
57
+ - name: Setup podman
58
+ env:
59
+ PODMAN_VERSION: "v5.7.1"
60
+ run: |
61
+ sudo apt-get purge -y podman runc crun conmon
62
+
63
+ curl -fsSLO "https://github.com/mgoltzsche/podman-static/releases/download/${{ env.PODMAN_VERSION }}/podman-linux-${{ matrix.march }}.tar.gz"
64
+ curl -fsSLO "https://github.com/mgoltzsche/podman-static/releases/download/${{ env.PODMAN_VERSION }}/podman-linux-${{ matrix.march }}.tar.gz.asc"
65
+ gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 0CCF102C4F95D89E583FF1D4F8B5AF50344BB503
66
+ gpg --batch --verify "podman-linux-${{ matrix.march }}.tar.gz.asc" "podman-linux-${{ matrix.march }}.tar.gz"
67
+
68
+ tar -xzf "podman-linux-${{ matrix.march }}.tar.gz"
69
+ sudo cp -rfv ./podman-linux-${{ matrix.march }}/etc/. /etc/
70
+ sudo cp -rfv ./podman-linux-${{ matrix.march }}/usr/. /usr/
71
+
72
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
73
+ # yamllint enable rule:line-length
74
+
75
+ - name: Setup Python
76
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
77
+ with:
78
+ python-version: "${{ env.PYTHON_VERSION }}"
79
+
80
+ - name: Checkout
81
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
82
+ with:
83
+ persist-credentials: "false"
84
+ fetch-depth: "0"
85
+
86
+ - name: Setup cache Python
87
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
88
+ with:
89
+ key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
90
+ restore-keys: |
91
+ python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-
92
+ path: "./local/"
93
+
94
+ - name: Get date
95
+ id: date
96
+ run: echo "date=$(date +'%Y%m%d')" >>$GITHUB_OUTPUT
97
+
98
+ - name: Setup cache container
99
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
100
+ with:
101
+ key: "container-${{ matrix.arch }}-${{ steps.date.outputs.date }}-${{ hashFiles('./requirements*.txt') }}"
102
+ restore-keys: |
103
+ container-${{ matrix.arch }}-${{ steps.date.outputs.date }}-
104
+ container-${{ matrix.arch }}-
105
+ path: "/var/tmp/buildah-cache-*/*"
106
+
107
+ - if: ${{ matrix.emulation }}
108
+ name: Setup QEMU
109
+ uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
110
+
111
+ - name: Login to GHCR
112
+ uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
113
+ with:
114
+ registry: "ghcr.io"
115
+ username: "${{ github.repository_owner }}"
116
+ password: "${{ secrets.GITHUB_TOKEN }}"
117
+
118
+ - name: Build
119
+ id: build
120
+ env:
121
+ OVERRIDE_ARCH: "${{ matrix.arch }}"
122
+ run: make podman.build
123
+
124
+ test:
125
+ name: Test (${{ matrix.arch }})
126
+ runs-on: ${{ matrix.os }}
127
+ needs: build
128
+ strategy:
129
+ fail-fast: false
130
+ matrix:
131
+ include:
132
+ - arch: amd64
133
+ os: ubuntu-24.04
134
+ emulation: false
135
+ - arch: arm64
136
+ os: ubuntu-24.04-arm
137
+ emulation: false
138
+ - arch: armv7
139
+ os: ubuntu-24.04-arm
140
+ emulation: true
141
+
142
+ steps:
143
+ - name: Checkout
144
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
145
+ with:
146
+ persist-credentials: "false"
147
+
148
+ - if: ${{ matrix.emulation }}
149
+ name: Setup QEMU
150
+ uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
151
+
152
+ - name: Login to GHCR
153
+ uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
154
+ with:
155
+ registry: "ghcr.io"
156
+ username: "${{ github.repository_owner }}"
157
+ password: "${{ secrets.GITHUB_TOKEN }}"
158
+
159
+ - name: Test
160
+ env:
161
+ OVERRIDE_ARCH: "${{ matrix.arch }}"
162
+ GIT_URL: "${{ needs.build.outputs.git_url }}"
163
+ run: make container.test
164
+
165
+ release:
166
+ if: github.repository_owner == 'searxng' && github.ref_name == 'master'
167
+ name: Release
168
+ runs-on: ubuntu-24.04-arm
169
+ needs:
170
+ - build
171
+ - test
172
+
173
+ permissions:
174
+ packages: write
175
+
176
+ steps:
177
+ - name: Checkout
178
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
179
+ with:
180
+ persist-credentials: "false"
181
+
182
+ - name: Login to GHCR
183
+ uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
184
+ with:
185
+ registry: "ghcr.io"
186
+ username: "${{ github.repository_owner }}"
187
+ password: "${{ secrets.GITHUB_TOKEN }}"
188
+
189
+ - name: Login to Docker Hub
190
+ uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
191
+ with:
192
+ registry: "docker.io"
193
+ username: "${{ secrets.DOCKER_USER }}"
194
+ password: "${{ secrets.DOCKER_TOKEN }}"
195
+
196
+ - name: Release
197
+ env:
198
+ GIT_URL: "${{ needs.build.outputs.git_url }}"
199
+ DOCKER_TAG: "${{ needs.build.outputs.docker_tag }}"
200
+ run: make container.push
.github/workflows/data-update.yml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Update searx.data
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ workflow_dispatch:
7
+ schedule:
8
+ - cron: "59 23 28 * *"
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}
12
+ cancel-in-progress: false
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ env:
18
+ PYTHON_VERSION: "3.14"
19
+
20
+ jobs:
21
+ data:
22
+ if: github.repository_owner == 'searxng'
23
+ name: ${{ matrix.fetch }}
24
+ runs-on: ubuntu-24.04-arm
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ fetch:
29
+ - update_ahmia_blacklist.py
30
+ - update_currencies.py
31
+ - update_external_bangs.py
32
+ - update_firefox_version.py
33
+ - update_engine_traits.py
34
+ - update_wikidata_units.py
35
+ - update_engine_descriptions.py
36
+ - update_gsa_useragents.py
37
+
38
+ permissions:
39
+ contents: write
40
+ pull-requests: write
41
+
42
+ steps:
43
+ - name: Setup Python
44
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
45
+ with:
46
+ python-version: "${{ env.PYTHON_VERSION }}"
47
+
48
+ - name: Checkout
49
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
50
+ with:
51
+ persist-credentials: "false"
52
+
53
+ - name: Setup cache Python
54
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
55
+ with:
56
+ key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
57
+ restore-keys: |
58
+ python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-
59
+ path: "./local/"
60
+
61
+ - name: Setup venv
62
+ run: make V=1 install
63
+
64
+ - name: Fetch data
65
+ run: V=1 ./manage pyenv.cmd python "./searxng_extra/update/${{ matrix.fetch }}"
66
+
67
+ - name: Create PR
68
+ id: cpr
69
+ uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
70
+ with:
71
+ author: "searxng-bot <searxng-bot@users.noreply.github.com>"
72
+ committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
73
+ title: "[data] update searx.data - ${{ matrix.fetch }}"
74
+ commit-message: "[data] update searx.data - ${{ matrix.fetch }}"
75
+ branch: "update_data_${{ matrix.fetch }}"
76
+ delete-branch: "true"
77
+ draft: "false"
78
+ signoff: "false"
79
+ body: |
80
+ [data] update searx.data - ${{ matrix.fetch }}
81
+ labels: |
82
+ data
83
+
84
+ - name: Display information
85
+ run: |
86
+ echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
87
+ echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
.github/workflows/documentation.yml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Documentation
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ workflow_dispatch:
7
+ push:
8
+ branches:
9
+ - master
10
+ pull_request:
11
+ branches:
12
+ - master
13
+
14
+ concurrency:
15
+ group: ${{ github.workflow }}
16
+ cancel-in-progress: false
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ env:
22
+ PYTHON_VERSION: "3.14"
23
+
24
+ jobs:
25
+ release:
26
+ if: github.repository_owner == 'searxng' || github.event_name == 'workflow_dispatch'
27
+ name: Release
28
+ runs-on: ubuntu-24.04-arm
29
+ permissions:
30
+ # for JamesIves/github-pages-deploy-action to push
31
+ contents: write
32
+
33
+ steps:
34
+ - name: Setup Python
35
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
36
+ with:
37
+ python-version: "${{ env.PYTHON_VERSION }}"
38
+
39
+ - name: Checkout
40
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41
+ with:
42
+ persist-credentials: "false"
43
+ fetch-depth: "0"
44
+
45
+ - name: Setup cache Python
46
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
47
+ with:
48
+ key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
49
+ restore-keys: |
50
+ python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-
51
+ path: "./local/"
52
+
53
+ - name: Setup venv
54
+ run: make V=1 install
55
+
56
+ - name: Build documentation
57
+ run: make V=1 docs.clean docs.html
58
+
59
+ - if: github.ref_name == 'master'
60
+ name: Release
61
+ uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
62
+ with:
63
+ folder: "dist/docs"
64
+ branch: "gh-pages"
65
+ commit-message: "[doc] build from commit ${{ github.sha }}"
66
+ # Automatically remove deleted files from the deploy branch
67
+ clean: "true"
68
+ single-commit: "true"
.github/workflows/integration.yml ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Integration
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
+ branches:
11
+ - master
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref_name }}
15
+ cancel-in-progress: false
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ env:
21
+ PYTHON_VERSION: "3.14"
22
+
23
+ jobs:
24
+ test:
25
+ name: Python ${{ matrix.python-version }}
26
+ runs-on: ubuntu-24.04
27
+ strategy:
28
+ matrix:
29
+ python-version:
30
+ - "3.11"
31
+ - "3.12"
32
+ - "3.13"
33
+ - "3.14"
34
+
35
+ steps:
36
+ - name: Setup Python
37
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
38
+ with:
39
+ python-version: "${{ matrix.python-version }}"
40
+
41
+ - name: Checkout
42
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43
+ with:
44
+ persist-credentials: "false"
45
+
46
+ - name: Setup cache Python
47
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
48
+ with:
49
+ key: "python-${{ matrix.python-version }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
50
+ restore-keys: |
51
+ python-${{ matrix.python-version }}-${{ runner.arch }}-
52
+ path: "./local/"
53
+
54
+ - name: Setup venv
55
+ run: make V=1 install
56
+
57
+ - name: Run tests
58
+ run: make V=1 ci.test
59
+
60
+ theme:
61
+ name: Theme
62
+ runs-on: ubuntu-24.04-arm
63
+ steps:
64
+ - name: Setup Python
65
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
66
+ with:
67
+ python-version: "${{ env.PYTHON_VERSION }}"
68
+
69
+ - name: Checkout
70
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
71
+ with:
72
+ persist-credentials: "false"
73
+
74
+ - name: Setup Node.js
75
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
76
+ with:
77
+ node-version-file: "./.nvmrc"
78
+
79
+ - name: Setup cache Node.js
80
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
81
+ with:
82
+ key: "nodejs-${{ runner.arch }}-${{ hashFiles('./.nvmrc', './package.json') }}"
83
+ path: "./client/simple/node_modules/"
84
+
85
+ - name: Setup cache Python
86
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
87
+ with:
88
+ key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
89
+ restore-keys: |
90
+ python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-
91
+ path: "./local/"
92
+
93
+ - name: Setup venv
94
+ run: make V=1 install
95
+
96
+ - name: Lint
97
+ run: make themes.lint
98
+
99
+ - name: Build
100
+ run: make themes.all
.github/workflows/l10n.yml ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Translation
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ workflow_dispatch:
7
+ workflow_run:
8
+ workflows:
9
+ - Integration
10
+ types:
11
+ - completed
12
+ branches:
13
+ - master
14
+ schedule:
15
+ - cron: "05 07 * * 5"
16
+
17
+ concurrency:
18
+ group: ${{ github.workflow }}
19
+ cancel-in-progress: false
20
+
21
+ permissions:
22
+ contents: read
23
+
24
+ env:
25
+ PYTHON_VERSION: "3.14"
26
+
27
+ jobs:
28
+ update:
29
+ if: github.repository_owner == 'searxng' && github.event.workflow_run.conclusion == 'success'
30
+ name: Update
31
+ runs-on: ubuntu-24.04-arm
32
+ permissions:
33
+ # For "make V=1 weblate.push.translations"
34
+ contents: write
35
+
36
+ steps:
37
+ - name: Setup Python
38
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
39
+ with:
40
+ python-version: "${{ env.PYTHON_VERSION }}"
41
+
42
+ - name: Checkout
43
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
44
+ with:
45
+ token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
46
+ fetch-depth: "0"
47
+
48
+ - name: Setup cache Python
49
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
50
+ with:
51
+ key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
52
+ restore-keys: |
53
+ python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-
54
+ path: "./local/"
55
+
56
+ - name: Setup venv
57
+ run: make V=1 install
58
+
59
+ - name: Setup Weblate
60
+ run: |
61
+ mkdir -p ~/.config
62
+ echo "${{ secrets.WEBLATE_CONFIG }}" > ~/.config/weblate
63
+
64
+ - name: Setup Git
65
+ run: |
66
+ git config --global user.email "searxng-bot@users.noreply.github.com"
67
+ git config --global user.name "searxng-bot"
68
+
69
+ - name: Update translations
70
+ run: make V=1 weblate.push.translations
71
+
72
+ pr:
73
+ if: |
74
+ github.repository_owner == 'searxng'
75
+ && (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
76
+ name: Pull Request
77
+ runs-on: ubuntu-24.04-arm
78
+ permissions:
79
+ # For "make V=1 weblate.translations.commit"
80
+ contents: write
81
+ # For action "peter-evans/create-pull-request"
82
+ pull-requests: write
83
+
84
+ steps:
85
+ - name: Setup Python
86
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
87
+ with:
88
+ python-version: "${{ env.PYTHON_VERSION }}"
89
+
90
+ - name: Checkout
91
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
92
+ with:
93
+ token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
94
+ fetch-depth: "0"
95
+
96
+ - name: Setup cache Python
97
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
98
+ with:
99
+ key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
100
+ restore-keys: |
101
+ python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-
102
+ path: "./local/"
103
+
104
+ - name: Setup venv
105
+ run: make V=1 install
106
+
107
+ - name: Setup Weblate
108
+ run: |
109
+ mkdir -p ~/.config
110
+ echo "${{ secrets.WEBLATE_CONFIG }}" > ~/.config/weblate
111
+
112
+ - name: Setup Git
113
+ run: |
114
+ git config --global user.email "searxng-bot@users.noreply.github.com"
115
+ git config --global user.name "searxng-bot"
116
+
117
+ - name: Merge and push translation updates
118
+ run: make V=1 weblate.translations.commit
119
+
120
+ - name: Create PR
121
+ id: cpr
122
+ uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
123
+ with:
124
+ author: "searxng-bot <searxng-bot@users.noreply.github.com>"
125
+ committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
126
+ title: "[l10n] update translations from Weblate"
127
+ commit-message: "[l10n] update translations from Weblate"
128
+ branch: "translations_update"
129
+ delete-branch: "true"
130
+ draft: "false"
131
+ signoff: "false"
132
+ body: |
133
+ [l10n] update translations from Weblate
134
+ labels: |
135
+ area:i18n
136
+
137
+ - name: Display information
138
+ run: |
139
+ echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
140
+ echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
.github/workflows/security.yml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Security
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ workflow_dispatch:
7
+ schedule:
8
+ - cron: "42 05 * * *"
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}
12
+ cancel-in-progress: false
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ container:
19
+ if: github.repository_owner == 'searxng'
20
+ name: Container
21
+ runs-on: ubuntu-24.04-arm
22
+ permissions:
23
+ security-events: write
24
+
25
+ steps:
26
+ - name: Checkout
27
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28
+ with:
29
+ persist-credentials: "false"
30
+
31
+ - name: Sync GHCS from Docker Scout
32
+ uses: docker/scout-action@bacf462e8d090c09660de30a6ccc718035f961e3 # v1.20.4
33
+ with:
34
+ organization: "searxng"
35
+ dockerhub-user: "${{ secrets.DOCKER_USER }}"
36
+ dockerhub-password: "${{ secrets.DOCKER_TOKEN }}"
37
+ image: "registry://ghcr.io/searxng/searxng:latest"
38
+ command: "cves"
39
+ sarif-file: "./scout.sarif"
40
+ exit-code: "false"
41
+ write-comment: "false"
42
+
43
+ - name: Upload SARIFs
44
+ uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
45
+ with:
46
+ sarif_file: "./scout.sarif"
.gitignore ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # to sync with .dockerignore & pyrightconfig.json
2
+
3
+ *.pyc
4
+ */*.pyc
5
+ *~
6
+ *.swp
7
+ geckodriver.log
8
+
9
+ .coverage
10
+ coverage/
11
+
12
+ .govm/
13
+ .nvm/
14
+ cache/
15
+ build/
16
+ dist/
17
+ local/
18
+ gh-pages/
19
+ *.egg-info/
20
+
21
+ /package-lock.json
22
+ /node_modules/
23
+
24
+ .idea/
25
+
26
+ searx/version_frozen.py
27
+ .dir-locals.el
28
+
29
+ .python-version
.nvmrc ADDED
@@ -0,0 +1 @@
 
 
1
+ 25
.pylintrc ADDED
@@ -0,0 +1,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8; mode: conf-unix -*-
2
+ # lint Python modules using external checkers.
3
+ #
4
+ # This is the main checker controlling the other ones and the reports
5
+ # generation. It is itself both a raw checker and an astng checker in order
6
+ # to:
7
+ # * handle message activation / deactivation at the module level
8
+ # * handle some basic but necessary stats'data (number of classes, methods...)
9
+ #
10
+ [MASTER]
11
+
12
+ # A comma-separated list of package or module names from where C extensions may
13
+ # be loaded. Extensions are loading into the active Python interpreter and may
14
+ # run arbitrary code
15
+ extension-pkg-whitelist=lxml.etree
16
+
17
+ # Add files or directories to the blacklist. They should be base names, not
18
+ # paths.
19
+ ignore=CVS, .git, .svn
20
+
21
+ # Add files or directories matching the regex patterns to the blacklist. The
22
+ # regex matches against base names, not paths.
23
+ ignore-patterns=
24
+
25
+ # Python code to execute, usually for sys.path manipulation such as
26
+ # pygtk.require().
27
+ #init-hook=
28
+
29
+ # Use multiple processes to speed up Pylint.
30
+ jobs=0
31
+
32
+ # List of plugins (as comma separated values of python modules names) to load,
33
+ # usually to register additional checkers.
34
+ load-plugins=
35
+
36
+ # Pickle collected data for later comparisons.
37
+ persistent=yes
38
+
39
+ # Specify a configuration file.
40
+ #rcfile=
41
+
42
+ # Allow loading of arbitrary C extensions. Extensions are imported into the
43
+ # active Python interpreter and may run arbitrary code.
44
+ unsafe-load-any-extension=no
45
+
46
+
47
+ [MESSAGES CONTROL]
48
+
49
+ # Only show warnings with the listed confidence levels. Leave empty to show
50
+ # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
51
+ confidence=
52
+
53
+ # Disable the message, report, category or checker with the given id(s). You
54
+ # can either give multiple identifiers separated by comma (,) or put this
55
+ # option multiple times (only on the command line, not in the configuration
56
+ # file where it should appear only once).You can also use "--disable=all" to
57
+ # disable everything first and then reenable specific checks. For example, if
58
+ # you want to run only the similarities checker, you can use "--disable=all
59
+ # --enable=similarities". If you want to run only the classes checker, but have
60
+ # no Warning level messages displayed, use"--disable=all --enable=classes
61
+ # --disable=W"
62
+ disable=duplicate-code,
63
+ missing-function-docstring,
64
+ consider-using-f-string,
65
+
66
+ # Enable the message, report, category or checker with the given id(s). You can
67
+ # either give multiple identifier separated by comma (,) or put this option
68
+ # multiple time (only on the command line, not in the configuration file where
69
+ # it should appear only once). See also the "--disable" option for examples.
70
+ enable=
71
+
72
+
73
+ [REPORTS]
74
+
75
+ # Python expression which should return a note less than 10 (10 is the highest
76
+ # note). You have access to the variables errors warning, statement which
77
+ # respectively contain the number of errors / warnings messages and the total
78
+ # number of statements analyzed. This is used by the global evaluation report
79
+ # (RP0004).
80
+ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
81
+
82
+ # Template used to display messages. This is a python new-style format string
83
+ # used to format the message information. See doc for all details
84
+
85
+ # HINT: do not set this here, use argument --msg-template=...
86
+ #msg-template={path}:{line}: [{msg_id}({symbol}),{obj}] {msg}
87
+
88
+ # Set the output format. Available formats are text, parseable, colorized, json
89
+ # and msvs (visual studio).You can also give a reporter class, eg
90
+ # mypackage.mymodule.MyReporterClass.
91
+
92
+ # HINT: do not set this here, use argument --output-format=...
93
+ #output-format=text
94
+
95
+ # Tells whether to display a full report or only the messages
96
+ reports=no
97
+
98
+ # Activate the evaluation score.
99
+ score=yes
100
+
101
+
102
+ [REFACTORING]
103
+
104
+ # Maximum number of nested blocks for function / method body
105
+ max-nested-blocks=5
106
+
107
+
108
+ [BASIC]
109
+
110
+ # Regular expression matching correct argument names
111
+ argument-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
112
+
113
+ # Regular expression matching correct attribute names
114
+ attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*)|([A-Z0-9_]*))$
115
+
116
+ # Bad variable names which should always be refused, separated by a comma
117
+ bad-names=foo,bar,baz,toto,tutu,tata
118
+
119
+ # Regular expression matching correct class attribute names
120
+ class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
121
+
122
+ # Regular expression matching correct class names
123
+ class-rgx=[A-Z_][a-zA-Z0-9]+$
124
+
125
+ # Regular expression matching correct constant names
126
+ const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
127
+ #const-rgx=[f]?[A-Z_][a-zA-Z0-9_]{2,30}$
128
+
129
+ # Minimum line length for functions/classes that require docstrings, shorter
130
+ # ones are exempt.
131
+ docstring-min-length=-1
132
+
133
+ # Regular expression matching correct function names
134
+ function-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
135
+
136
+ # Good variable names which should always be accepted, separated by a comma
137
+ good-names=i,j,k,ex,Run,_,log,cfg,id
138
+
139
+ # Include a hint for the correct naming format with invalid-name
140
+ include-naming-hint=no
141
+
142
+ # Regular expression matching correct inline iteration names
143
+ inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
144
+
145
+ # Regular expression matching correct method names
146
+ method-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
147
+
148
+ # Regular expression matching correct module names
149
+ #module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
150
+ module-rgx=([a-z_][a-z0-9_]*)$
151
+
152
+ # Colon-delimited sets of names that determine each other's naming style when
153
+ # the name regexes allow several styles.
154
+ name-group=
155
+
156
+ # Regular expression which should only match function or class names that do
157
+ # not require a docstring.
158
+ no-docstring-rgx=^_
159
+
160
+ # List of decorators that produce properties, such as abc.abstractproperty. Add
161
+ # to this list to register other decorators that produce valid properties.
162
+ property-classes=abc.abstractproperty
163
+
164
+ # Regular expression matching correct variable names
165
+ variable-rgx=([a-zA-Z0-9_]*)$
166
+
167
+
168
+ [FORMAT]
169
+
170
+ # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
171
+ expected-line-ending-format=
172
+
173
+ # Regexp for a line that is allowed to be longer than the limit.
174
+ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
175
+
176
+ # Number of spaces of indent required inside a hanging or continued line.
177
+ indent-after-paren=4
178
+
179
+ # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
180
+ # tab).
181
+ indent-string=' '
182
+
183
+ # Maximum number of characters on a single line.
184
+ max-line-length=120
185
+
186
+ # Maximum number of lines in a module
187
+ max-module-lines=2000
188
+
189
+ # Allow the body of a class to be on the same line as the declaration if body
190
+ # contains single statement.No config file found, using default configuration
191
+
192
+ single-line-class-stmt=no
193
+
194
+ # Allow the body of an if to be on the same line as the test if there is no
195
+ # else.
196
+ single-line-if-stmt=no
197
+
198
+
199
+ [LOGGING]
200
+
201
+ # Logging modules to check that the string format arguments are in logging
202
+ # function parameter format
203
+ logging-modules=logging
204
+
205
+
206
+ [MISCELLANEOUS]
207
+
208
+ # List of note tags to take in consideration, separated by a comma.
209
+ notes=FIXME,XXX,TODO
210
+
211
+
212
+ [SIMILARITIES]
213
+
214
+ # Ignore comments when computing similarities.
215
+ ignore-comments=yes
216
+
217
+ # Ignore docstrings when computing similarities.
218
+ ignore-docstrings=yes
219
+
220
+ # Ignore imports when computing similarities.
221
+ ignore-imports=no
222
+
223
+ # Minimum lines number of a similarity.
224
+ min-similarity-lines=4
225
+
226
+
227
+ [SPELLING]
228
+
229
+ # Spelling dictionary name. Available dictionaries: none. To make it working
230
+ # install python-enchant package.
231
+ spelling-dict=
232
+
233
+ # List of comma separated words that should not be checked.
234
+ spelling-ignore-words=
235
+
236
+ # A path to a file that contains private dictionary; one word per line.
237
+ spelling-private-dict-file=
238
+
239
+ # Tells whether to store unknown words to indicated private dictionary in
240
+ # --spelling-private-dict-file option instead of raising a message.
241
+ spelling-store-unknown-words=no
242
+
243
+
244
+ [TYPECHECK]
245
+
246
+ # List of decorators that produce context managers, such as
247
+ # contextlib.contextmanager. Add to this list to register other decorators that
248
+ # produce valid context managers.
249
+ contextmanager-decorators=contextlib.contextmanager
250
+
251
+ # List of members which are set dynamically and missed by pylint inference
252
+ # system, and so shouldn't trigger E1101 when accessed. Python regular
253
+ # expressions are accepted.
254
+ generated-members=
255
+
256
+ # Tells whether missing members accessed in mixin class should be ignored. A
257
+ # mixin class is detected if its name ends with "mixin" (case insensitive).
258
+ ignore-mixin-members=yes
259
+
260
+ # This flag controls whether pylint should warn about no-member and similar
261
+ # checks whenever an opaque object is returned when inferring. The inference
262
+ # can return multiple potential results while evaluating a Python object, but
263
+ # some branches might not be evaluated, which results in partial inference. In
264
+ # that case, it might be useful to still emit no-member and other checks for
265
+ # the rest of the inferred objects.
266
+ ignore-on-opaque-inference=yes
267
+
268
+ # List of class names for which member attributes should not be checked (useful
269
+ # for classes with dynamically set attributes). This supports the use of
270
+ # qualified names.
271
+ ignored-classes=optparse.Values,thread._local,_thread._local
272
+
273
+ # List of module names for which member attributes should not be checked
274
+ # (useful for modules/projects where namespaces are manipulated during runtime
275
+ # and thus existing member attributes cannot be deduced by static analysis. It
276
+ # supports qualified module names, as well as Unix pattern matching.
277
+ ignored-modules=
278
+
279
+ # Show a hint with possible names when a member name was not found. The aspect
280
+ # of finding the hint is based on edit distance.
281
+ missing-member-hint=yes
282
+
283
+ # The minimum edit distance a name should have in order to be considered a
284
+ # similar match for a missing member name.
285
+ missing-member-hint-distance=1
286
+
287
+ # The total number of similar names that should be taken in consideration when
288
+ # showing a hint for a missing member.
289
+ missing-member-max-choices=1
290
+
291
+
292
+ [VARIABLES]
293
+
294
+ # List of additional names supposed to be defined in builtins. Remember that
295
+ # you should avoid to define new builtins when possible.
296
+ additional-builtins=
297
+
298
+ # Tells whether unused global variables should be treated as a violation.
299
+ allow-global-unused-variables=yes
300
+
301
+ # List of strings which can identify a callback function by name. A callback
302
+ # name must start or end with one of those strings.
303
+ callbacks=cb_,_cb
304
+
305
+ # A regular expression matching the name of dummy variables (i.e. expectedly
306
+ # not used).
307
+ dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
308
+
309
+ # Argument names that match this expression will be ignored. Default to name
310
+ # with leading underscore
311
+ ignored-argument-names=_.*|^ignored_|^unused_
312
+
313
+ # Tells whether we should check for unused import in __init__ files.
314
+ init-import=yes
315
+
316
+ # List of qualified module names which can have objects that can redefine
317
+ # builtins.
318
+ redefining-builtins-modules=six.moves,future.builtins
319
+
320
+
321
+ [CLASSES]
322
+
323
+ # List of method names used to declare (i.e. assign) instance attributes.
324
+ defining-attr-methods=__init__,__new__,setUp
325
+
326
+ # List of member names, which should be excluded from the protected access
327
+ # warning.
328
+ exclude-protected=_asdict,_fields,_replace,_source,_make
329
+
330
+ # List of valid names for the first argument in a class method.
331
+ valid-classmethod-first-arg=cls
332
+
333
+ # List of valid names for the first argument in a metaclass class method.
334
+ valid-metaclass-classmethod-first-arg=mcs
335
+
336
+
337
+ [DESIGN]
338
+
339
+ # Maximum number of arguments for function / method
340
+ max-args=8
341
+ max-positional-arguments=14
342
+
343
+ # Maximum number of attributes for a class (see R0902).
344
+ max-attributes=20
345
+
346
+ # Maximum number of boolean expressions in a if statement
347
+ max-bool-expr=5
348
+
349
+ # Maximum number of branch for function / method body
350
+ max-branches=12
351
+
352
+ # Maximum number of locals for function / method body
353
+ max-locals=20
354
+
355
+ # Maximum number of parents for a class (see R0901).
356
+ max-parents=7
357
+
358
+ # Maximum number of public methods for a class (see R0904).
359
+ max-public-methods=20
360
+
361
+ # Maximum number of return / yield for function / method body
362
+ max-returns=6
363
+
364
+ # Maximum number of statements in function / method body
365
+ max-statements=50
366
+
367
+ # Minimum number of public methods for a class (see R0903).
368
+ min-public-methods=2
369
+
370
+
371
+ [IMPORTS]
372
+
373
+ # Allow wildcard imports from modules that define __all__.
374
+ allow-wildcard-with-all=no
375
+
376
+ # Analyse import fallback blocks. This can be used to support both Python 2 and
377
+ # 3 compatible code, which means that the block might have code that exists
378
+ # only in one or another interpreter, leading to false positives when analysed.
379
+ analyse-fallback-blocks=no
380
+
381
+ # Deprecated modules which should not be used, separated by a comma
382
+ deprecated-modules=optparse,tkinter.tix
383
+
384
+ # Create a graph of external dependencies in the given file (report RP0402 must
385
+ # not be disabled)
386
+ ext-import-graph=
387
+
388
+ # Create a graph of every (i.e. internal and external) dependencies in the
389
+ # given file (report RP0402 must not be disabled)
390
+ import-graph=
391
+
392
+ # Create a graph of internal dependencies in the given file (report RP0402 must
393
+ # not be disabled)
394
+ int-import-graph=
395
+
396
+ # Force import order to recognize a module as part of the standard
397
+ # compatibility libraries.
398
+ known-standard-library=
399
+
400
+ # Force import order to recognize a module as part of a third party library.
401
+ known-third-party=enchant
402
+
403
+
404
+ [EXCEPTIONS]
405
+
406
+ # Exceptions that will emit a warning when being caught. Defaults to
407
+ # "Exception"
408
+ overgeneral-exceptions=builtins.Exception
.vscode/launch.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?linkid=830387
3
+ "version": "0.2.0",
4
+ "configurations": [
5
+ {
6
+ "name": "SearXNG",
7
+ "type": "python",
8
+ "request": "launch",
9
+ "module": "searx.webapp",
10
+ "env": {
11
+ "FLASK_APP": "webapp",
12
+ "FLASK_DEBUG": "1",
13
+ "SEARXNG_DEBUG": "1",
14
+ },
15
+ "args": [
16
+ "run"
17
+ ],
18
+ "jinja": true,
19
+ "justMyCode": true,
20
+ "python": "${workspaceFolder}/local/py3/bin/python",
21
+ }
22
+ ]
23
+ }
.vscode/settings.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "python.testing.unittestArgs": [
3
+ "-v",
4
+ "-s",
5
+ "./tests",
6
+ "-p",
7
+ "test_*.py"
8
+ ],
9
+ "python.testing.pytestEnabled": false,
10
+ "python.testing.unittestEnabled": true,
11
+ }
.vscode/tasks.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+ // for the documentation about the tasks.json format
4
+ "version": "2.0.0",
5
+ "tasks": [
6
+ {
7
+ "label": "make run",
8
+ "type": "shell",
9
+ "command": "make run",
10
+ "problemMatcher": [],
11
+ "isBackground": true,
12
+ "presentation": {
13
+ "reveal": "always",
14
+ "panel": "dedicated"
15
+ },
16
+ "group": {
17
+ "kind": "build",
18
+ "isDefault": true
19
+ }
20
+ },
21
+ {
22
+ "label": "make docs.live",
23
+ "type": "shell",
24
+ "command": "make docs.live",
25
+ "problemMatcher": [],
26
+ "isBackground": true,
27
+ "presentation": {
28
+ "reveal": "always",
29
+ "panel": "dedicated"
30
+ },
31
+ "group": {
32
+ "kind": "build"
33
+ }
34
+ }
35
+ ]
36
+ }
.weblate ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [weblate]
2
+ url = https://translate.codeberg.org/api/
3
+ translation = searxng/searxng
.yamllint.yml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends: default
2
+
3
+ rules:
4
+
5
+ indentation:
6
+ spaces: 2
7
+
8
+ # 120 chars should be enough, but don't fail if a line is longer
9
+ line-length:
10
+ max: 120
11
+ level: warning
12
+ allow-non-breakable-words: true
13
+
14
+ # we don't have multiple document per file
15
+ document-start: disable
16
+ document-end: disable
AI_POLICY.rst ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ AI Policy
4
+ =========
5
+
6
+ Restrictions on Generative AI Usage
7
+ -----------------------------------
8
+ - **All AI usage in any form must be disclosed.** You must state the tool you used (e.g. Claude Code, Cursor, Amp) along with the extent that the work was AI-assisted.
9
+ - **The human-in-the-loop must fully understand all code.** If you use generative AI tools as an aid in developing code or documentation changes, ensure that you fully understand the proposed changes and can explain why they are the correct approach.
10
+ - **AI should never be the main author of the PR.** AI may be used as a tool to help with developing, but the human contribution to the code changes should always be reasonably larger than the part written by AI. For example, you should be the one that decides about the structure of the PR, not the LLM.
11
+ - **Issues and PR descriptions must be fully human-written.** Do not post output from Large Language Models or similar generative AI as comments on any of our discussion forums (e.g. GitHub Issues, Matrix, ...), as such comments tend to be formulaic and low content. If you're a not a native English speaker, using AI for translating self-written issue texts to English is okay, but please keep the wording as close as possible to the original wording.
12
+ - **Bad AI drivers will be denounced.** People who produce bad contributions that are clearly AI (slop) will be blocked for all future contributions.
13
+
14
+ There are Humans Here
15
+ ---------------------
16
+ Every discussion, issue, and pull request is read and reviewed by humans. It is a boundary point at which people interact with each other and the work done. It is rude and disrespectful to approach this boundary with low-effort, unqualified work, since it puts the burden of validation on the maintainer.
17
+
18
+ It takes a lot of maintainer time and energy to review AI-generated contributions! Sending the output of an LLM to open source project maintainers extracts work from them in the form of design and code review, so we call this kind of contribution an "extractive contribution".
19
+
20
+ The *golden rule* is that a contribution should be worth more to the project than the time it takes to review it, which is usually not the case if large parts of your PR were written by LLMs.
AUTHORS.rst ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ searxng is a fork from `searx <https://github.com/searx/searx>`_ and is
2
+ maintained by Markus Heiser (`@return42 <https://github.com/return42>`_)
3
+
4
+ People who have submitted patches/translations, reported bugs, consulted
5
+ features or generally made SearXNG better:
6
+
7
+ - Adam Tauber `@asciimoo <https://github.com/asciimoo>`_
8
+ - Matej Cotman `@matejc <https://github.com/matejc>`_
9
+ - Émilien Devos `@unixfox <https://github.com/unixfox>`_
10
+ - Thomas Pointhuber `pointhi <https://github.com/pointhi>`_
11
+ - Noémi Ványi `@kvch <https://github.com/kvch>`_
12
+ - `@Cqoicebordel <https://github.com/Cqoicebordel>`_
13
+ - Marc Abonce Seguin `@MarcAbonce <https://github.com/MarcAbonce>`_
14
+ - `@pofilo <https://github.com/pofilo>`_
15
+
16
+ - Laszlo Hammerl
17
+ - Stefan Marsiske
18
+ - Gabor Nagy
19
+ - @pw3t
20
+ - @rhapsodhy
21
+ - András Veres-Szentkirályi
22
+ - Benjamin Sonntag
23
+ - @HLFH
24
+ - @TheRadialActive
25
+ - @Okhin
26
+ - André Koot
27
+ - Alejandro León Aznar
28
+ - rike
29
+ - dp
30
+ - Martin Zimmermann
31
+ - @courgette
32
+ - @kernc
33
+ - @Reventl0v
34
+ - Caner Başaran
35
+ - Benjamin Sonntag
36
+ - @opi
37
+ - @dimqua
38
+ - Giorgos Logiotatidis
39
+ - Luc Didry
40
+ - Niklas Haas
41
+ - @underr
42
+ - Emmanuel Benazera
43
+ - @GreenLunar
44
+ - Kang-min Liu
45
+ - Kirill Isakov
46
+ - Guilhem Bonnefille
47
+ - @jibe-b
48
+ - Christian Pietsch @pietsch
49
+ - @Maxqia
50
+ - Ashutosh Das @pyprism
51
+ - YuLun Shih @imZack
52
+ - Dmitry Mikhirev @mikhirev
53
+ - David A Roberts `@davidar <https://github.com/davidar>`_
54
+ - Jan Verbeek @blyxxyz
55
+ - Ammar Najjar @ammarnajjar
56
+ - @stepshal
57
+ - François Revol @mmuman
58
+ - Harry Wood @harry-wood
59
+ - Thomas Renard @threnard
60
+ - Pydo `<https://github.com/pydo>`_
61
+ - Athemis `<https://github.com/Athemis>`_
62
+ - Stefan Antoni `<http://stefan.antoni.io>`
63
+ - @firebovine
64
+ - Lorenzo J. Lucchini @luccoj
65
+ - @eig8phei
66
+ - @maxigas
67
+ - Jannik Winkel @kiney
68
+ - @juanitobananas
69
+ - Vache Asatryan @vachi
70
+ - Luca CPZ @lcpz
71
+ - @nikaiw
72
+ - Thirnearez
73
+ - Hypolite Petovan @MrPetovan
74
+ - @woorst
75
+ - @Apply55gx
76
+ - @pyrrh0n1c
77
+ - @cclauss
78
+ - QGW @moon2l
79
+ - Pierre-Alain Toret @daftaupe
80
+ - Matthew Olmsted @icegiant
81
+ - Michael Tran @trankmichael
82
+ - Joseph Nuthalapati @josephkiranbabu
83
+ - @maiki
84
+ - Richard Didier @zeph33
85
+ - Michael Vieria @Themimitoof
86
+ - Richard Nespithal @rndevfx
87
+ - Stanislas @angristan
88
+ - @rinpatch
89
+ - g. s. @usernameisntallowed
90
+ - Léo Bourrel @bourrel
91
+ - @cy8aer
92
+ - @Popolon
93
+ - Alice Ferrazzi @aliceinwire
94
+ - @LiquidLemon
95
+ - @dadosch
96
+ - Václav Zouzalík @Venca24
97
+ - @ZEROF
98
+ - Ivan Skytte Jørgensen @isj-privacore
99
+ - @miicha
100
+ - Étienne Deparis @milouse
101
+ - @pelag0s
102
+ - Denis Wernert @d-tux
103
+ - Robin Hallabro-Kokko @hallabro
104
+ - Jonas Zohren @jfowl
105
+ - Elias Ojala @theel0ja
106
+ - @brunob
107
+ - Nick Espig @nachtalb
108
+ - Rachmadani Haryono @rachmadaniHaryono
109
+ - Frank de Lange @yetangitu
110
+ - Nicolas Gelot @nfk
111
+ - @volth
112
+ - Mathieu Brunot @madmath03
113
+ - @lorddavidiii
114
+ - @x250
115
+ - Robby O'Connor @robbyoconnor
116
+ - Finn @0xhtml
117
+ - @tmikaeld
118
+ - @hobbestigrou
119
+ - Vipul @finn0
120
+ - @CaffeinatedTech
121
+ - Robin Schneider @ypid
122
+ - @splintah
123
+ - Lukas van den Berk @lukasvdberk
124
+ - @piplongrun
125
+ - Jason Kaltsikis @jjasonkal
126
+ - Sion Kazama @KazamaSion
127
+ - @resynth1943
128
+ - Mostafa Ahangarha @ahangarha
129
+ - @gordon-quad
130
+ - Sophie Tauchert @999eagle
131
+ - @bauruine
132
+ - Michael Ilsaas `<https://mikeri.net>`_
133
+ - @renyhp
134
+ - rachmadani haryono @rachmadaniHaryono
135
+ - Mohamad Safadieh @msafadieh
136
+ - @gardouille
137
+ - @resynth1943
138
+ - @Eliesemoule
139
+ - @gardouille
140
+ - @GazoilKerozen
141
+ - Lukáš Kucharczyk @KucharczykL
142
+ - Lynda Lopez @lyndalopez544
143
+ - M. Efe Çetin @efectn
144
+ - Nícholas Kegler @nicholasks
145
+ - @pierrechtux
146
+ - Scott Wallace @scottwallacesh
147
+ - @Singustromo
148
+ - @TheEvilSkeleton
149
+ - @Wonderfall
150
+ - @mrwormo
151
+ - Xiaoyu WEI @xywei
152
+ - @joshu9h
153
+ - Daniel Hones
154
+ - @cyclaero
155
+ - @thezeroalpha
156
+ - @Tobi823
157
+ - @archiecodes
158
+ - @BBaoVanC
159
+ - @datagram1
160
+ - @lucky13820
161
+ - @jhigginbotham
162
+ - @xenrox
163
+ - @OliveiraHermogenes
164
+ - Paul Alcock @Guilvareux
165
+ - Sam A. `<https://samsapti.dev>`_
166
+ - @XavierHorwood
167
+ - Ahmad Alkadri `<https://github.com/ahmad-alkadri>`_
168
+ - Milad Laly @Milad-Laly
169
+ - @llmII
170
+ - @blob42 `<https://blob42.xyz>`_
171
+ - Paolo Basso `<https://github.com/paolobasso99>`
172
+ - Bernie Huang `<https://github.com/BernieHuang2008>`
173
+ - Austin Olacsi `<https://github.com/Austin-Olacsi>`
174
+ - @micsthepick
175
+ - Daniel Kukula `<https://github.com/dkuku>`
176
+ - Patrick Evans `https://github.com/holysoles`
177
+ - Daniel Mowitz `<https://daniel.mowitz.rocks>`
178
+ - `Bearz314 <https://github.com/bearz314>`_
179
+ - Tommaso Colella `<https://github.com/gioleppe>`
180
+ - @AgentScrubbles
181
+ - Filip Mikina `<https://github.com/fiffek>`
CHANGELOG.rst ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ =======
2
+ SearXNG
3
+ =======
4
+
5
+ SearXNG development has been started in the middle of 2021 as a fork of the
6
+ searx project. Since it beginning its a rolling release pulled from SearXNG's
7
+ master branch:
8
+
9
+ - The CHANGELOG_ is replaced by the commit history of the master branch.
10
+ - Since merged PR-229_, the version number is based on the git commit
11
+
12
+ .. _CHANGELOG: https://github.com/searxng/searxng/commits/master
13
+ .. _PR-229: https://github.com/searxng/searxng/pull/229
14
+
CONTRIBUTING.rst ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ .. _Quickstart guide: https://docs.searxng.org/dev/quickstart.html
4
+ .. _Commits guide: https://docs.searxng.org/dev/commits.html
5
+ .. _AI Policy: https://github.com/searxng/searxng/blob/master/AI_POLICY.rst
6
+ .. _Weblate: https://translate.codeberg.org/projects/searxng/searxng/
7
+ .. _GitHub Codespaces: https://docs.github.com/en/codespaces/overview
8
+ .. _120 hours per month: https://github.com/settings/billing
9
+ .. _list of existing Codespaces: https://github.com/codespaces
10
+
11
+ Thank you for your interest in SearXNG.
12
+
13
+ Have a look at our `Quickstart guide`_, it's very easy to contribute.
14
+
15
+ Further information on *how-to* can be found
16
+ `here <https://docs.searxng.org/dev/index.html>`_.
17
+
18
+ Translations
19
+ ============
20
+
21
+ Help translate SearXNG at `Weblate`_.
22
+
23
+ .. image:: https://translate.codeberg.org/widget/searxng/searxng/horizontal-auto.svg
24
+ :target: https://translate.codeberg.org/engage/searxng/
25
+ :alt: Weblate
26
+ :width: 768px
27
+
28
+ Cloud development
29
+ =================
30
+
31
+ You can contribute from your browser using `GitHub Codespaces`_:
32
+
33
+ - Fork the repository.
34
+ - Click on the ``<> Code`` green button.
35
+ - Click on the ``Codespaces`` tab instead of ``Local``.
36
+ - Click on ``Create codespace on master``.
37
+ - VSCode is going to start in the browser.
38
+ - Wait for ``git pull && make install`` to appear and then disappear.
39
+ - You have `120 hours per month`_ (see also your `list of existing Codespaces`_).
40
+ - You can start SearXNG using ``make run`` in the terminal or by pressing ``Ctrl+Shift+B``.
41
+
42
+ How-to contribute
43
+ =================
44
+
45
+ Submitting pull requests
46
+ ------------------------
47
+
48
+ Please follow the provided PR template when writing a description for your
49
+ changes.
50
+
51
+ Do not take criticism personally. When you get feedback, it is about your work,
52
+ not your character or personality. Keep in mind we all want to make SearXNG
53
+ better.
54
+
55
+ When something is not clear, please ask questions to clear things up.
56
+
57
+ If you would like to introduce a big architectural change or do a refactor,
58
+ either in the codebase or the development tooling, please open an issue with a
59
+ proposal first. This way we can think together about the problem and probably
60
+ come up with a better solution.
61
+
62
+ Coding conventions and guidelines
63
+ ---------------------------------
64
+
65
+ Commit messages
66
+ ~~~~~~~~~~~~~~~
67
+
68
+ - Always write descriptive commit messages *("fix bug" is not acceptable)*.
69
+ - Use the present tense *("Add feature", not "Added feature")*.
70
+ - Use the imperative mood *("Move cursor to...", not "Moves cursor to...")*.
71
+ - Limit the first line (commit title) to 72 characters or less.
72
+
73
+ See `Commits guide`_ for more details.
74
+
75
+ Coding guidelines
76
+ ~~~~~~~~~~~~~~~~~
77
+
78
+ As a Python project, we must follow `PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_
79
+ and `PEP 20 <https://www.python.org/dev/peps/pep-0020/>`_ guidelines.
80
+
81
+ Furthermore, follow Clean Code conventions. The most important
82
+ rules in this project are:
83
+
84
+ - Simpler is better. `KISS principle <https://en.wikipedia.org/wiki/KISS_principle>`_
85
+ - Be consistent.
86
+ - Every function must do one thing.
87
+ - Use descriptive names for functions and variables.
88
+ - Always look for the root cause.
89
+ - Keep configurable data high level.
90
+ - Avoid negative conditionals.
91
+ - Prefer fewer arguments.
92
+ - Do not add obvious comments to code.
93
+ - Do not comment out code, delete lines instead.
94
+
95
+ AI Policy
96
+ ~~~~~~~~~
97
+
98
+ For our policy on the use of AI tools, please read `AI Policy`_.
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.13-slim
2
+
3
+ ENV PYTHONUNBUFFERED=1 \
4
+ PIP_NO_CACHE_DIR=1 \
5
+ SEARXNG_BIND_ADDRESS=0.0.0.0 \
6
+ SEARXNG_PORT=8080
7
+
8
+ WORKDIR /app
9
+
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ build-essential \
12
+ libxml2-dev \
13
+ libxslt1-dev \
14
+ libffi-dev \
15
+ libssl-dev \
16
+ git \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ COPY requirements.txt requirements-dev.txt setup.py ./
20
+ COPY searx/ searx/
21
+ COPY searxng_extra/ searxng_extra/
22
+ COPY manage ./
23
+ COPY utils/ utils/
24
+
25
+ RUN python -m pip install --upgrade pip setuptools wheel
26
+ RUN pip install -r requirements.txt
27
+ RUN pip install -e .
28
+
29
+ EXPOSE 8080
30
+ CMD ["python", "-m", "searx.webapp"]
LICENSE ADDED
@@ -0,0 +1,661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU Affero General Public License is a free, copyleft license for
11
+ software and other kinds of works, specifically designed to ensure
12
+ cooperation with the community in the case of network server software.
13
+
14
+ The licenses for most software and other practical works are designed
15
+ to take away your freedom to share and change the works. By contrast,
16
+ our General Public Licenses are intended to guarantee your freedom to
17
+ share and change all versions of a program--to make sure it remains free
18
+ software for all its users.
19
+
20
+ When we speak of free software, we are referring to freedom, not
21
+ price. Our General Public Licenses are designed to make sure that you
22
+ have the freedom to distribute copies of free software (and charge for
23
+ them if you wish), that you receive source code or can get it if you
24
+ want it, that you can change the software or use pieces of it in new
25
+ free programs, and that you know you can do these things.
26
+
27
+ Developers that use our General Public Licenses protect your rights
28
+ with two steps: (1) assert copyright on the software, and (2) offer
29
+ you this License which gives you legal permission to copy, distribute
30
+ and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that
33
+ improvements made in alternate versions of the program, if they
34
+ receive widespread use, become available for other developers to
35
+ incorporate. Many developers of free software are heartened and
36
+ encouraged by the resulting cooperation. However, in the case of
37
+ software used on network servers, this result may fail to come about.
38
+ The GNU General Public License permits making a modified version and
39
+ letting the public access it on a server without ever releasing its
40
+ source code to the public.
41
+
42
+ The GNU Affero General Public License is designed specifically to
43
+ ensure that, in such cases, the modified source code becomes available
44
+ to the community. It requires the operator of a network server to
45
+ provide the source code of the modified version running there to the
46
+ users of that server. Therefore, public use of a modified version, on
47
+ a publicly accessible server, gives the public access to the source
48
+ code of the modified version.
49
+
50
+ An older license, called the Affero General Public License and
51
+ published by Affero, was designed to accomplish similar goals. This is
52
+ a different license, not a version of the Affero GPL, but Affero has
53
+ released a new version of the Affero GPL which permits relicensing under
54
+ this license.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ TERMS AND CONDITIONS
60
+
61
+ 0. Definitions.
62
+
63
+ "This License" refers to version 3 of the GNU Affero General Public License.
64
+
65
+ "Copyright" also means copyright-like laws that apply to other kinds of
66
+ works, such as semiconductor masks.
67
+
68
+ "The Program" refers to any copyrightable work licensed under this
69
+ License. Each licensee is addressed as "you". "Licensees" and
70
+ "recipients" may be individuals or organizations.
71
+
72
+ To "modify" a work means to copy from or adapt all or part of the work
73
+ in a fashion requiring copyright permission, other than the making of an
74
+ exact copy. The resulting work is called a "modified version" of the
75
+ earlier work or a work "based on" the earlier work.
76
+
77
+ A "covered work" means either the unmodified Program or a work based
78
+ on the Program.
79
+
80
+ To "propagate" a work means to do anything with it that, without
81
+ permission, would make you directly or secondarily liable for
82
+ infringement under applicable copyright law, except executing it on a
83
+ computer or modifying a private copy. Propagation includes copying,
84
+ distribution (with or without modification), making available to the
85
+ public, and in some countries other activities as well.
86
+
87
+ To "convey" a work means any kind of propagation that enables other
88
+ parties to make or receive copies. Mere interaction with a user through
89
+ a computer network, with no transfer of a copy, is not conveying.
90
+
91
+ An interactive user interface displays "Appropriate Legal Notices"
92
+ to the extent that it includes a convenient and prominently visible
93
+ feature that (1) displays an appropriate copyright notice, and (2)
94
+ tells the user that there is no warranty for the work (except to the
95
+ extent that warranties are provided), that licensees may convey the
96
+ work under this License, and how to view a copy of this License. If
97
+ the interface presents a list of user commands or options, such as a
98
+ menu, a prominent item in the list meets this criterion.
99
+
100
+ 1. Source Code.
101
+
102
+ The "source code" for a work means the preferred form of the work
103
+ for making modifications to it. "Object code" means any non-source
104
+ form of a work.
105
+
106
+ A "Standard Interface" means an interface that either is an official
107
+ standard defined by a recognized standards body, or, in the case of
108
+ interfaces specified for a particular programming language, one that
109
+ is widely used among developers working in that language.
110
+
111
+ The "System Libraries" of an executable work include anything, other
112
+ than the work as a whole, that (a) is included in the normal form of
113
+ packaging a Major Component, but which is not part of that Major
114
+ Component, and (b) serves only to enable use of the work with that
115
+ Major Component, or to implement a Standard Interface for which an
116
+ implementation is available to the public in source code form. A
117
+ "Major Component", in this context, means a major essential component
118
+ (kernel, window system, and so on) of the specific operating system
119
+ (if any) on which the executable work runs, or a compiler used to
120
+ produce the work, or an object code interpreter used to run it.
121
+
122
+ The "Corresponding Source" for a work in object code form means all
123
+ the source code needed to generate, install, and (for an executable
124
+ work) run the object code and to modify the work, including scripts to
125
+ control those activities. However, it does not include the work's
126
+ System Libraries, or general-purpose tools or generally available free
127
+ programs which are used unmodified in performing those activities but
128
+ which are not part of the work. For example, Corresponding Source
129
+ includes interface definition files associated with source files for
130
+ the work, and the source code for shared libraries and dynamically
131
+ linked subprograms that the work is specifically designed to require,
132
+ such as by intimate data communication or control flow between those
133
+ subprograms and other parts of the work.
134
+
135
+ The Corresponding Source need not include anything that users
136
+ can regenerate automatically from other parts of the Corresponding
137
+ Source.
138
+
139
+ The Corresponding Source for a work in source code form is that
140
+ same work.
141
+
142
+ 2. Basic Permissions.
143
+
144
+ All rights granted under this License are granted for the term of
145
+ copyright on the Program, and are irrevocable provided the stated
146
+ conditions are met. This License explicitly affirms your unlimited
147
+ permission to run the unmodified Program. The output from running a
148
+ covered work is covered by this License only if the output, given its
149
+ content, constitutes a covered work. This License acknowledges your
150
+ rights of fair use or other equivalent, as provided by copyright law.
151
+
152
+ You may make, run and propagate covered works that you do not
153
+ convey, without conditions so long as your license otherwise remains
154
+ in force. You may convey covered works to others for the sole purpose
155
+ of having them make modifications exclusively for you, or provide you
156
+ with facilities for running those works, provided that you comply with
157
+ the terms of this License in conveying all material for which you do
158
+ not control copyright. Those thus making or running the covered works
159
+ for you must do so exclusively on your behalf, under your direction
160
+ and control, on terms that prohibit them from making any copies of
161
+ your copyrighted material outside their relationship with you.
162
+
163
+ Conveying under any other circumstances is permitted solely under
164
+ the conditions stated below. Sublicensing is not allowed; section 10
165
+ makes it unnecessary.
166
+
167
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168
+
169
+ No covered work shall be deemed part of an effective technological
170
+ measure under any applicable law fulfilling obligations under article
171
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172
+ similar laws prohibiting or restricting circumvention of such
173
+ measures.
174
+
175
+ When you convey a covered work, you waive any legal power to forbid
176
+ circumvention of technological measures to the extent such circumvention
177
+ is effected by exercising rights under this License with respect to
178
+ the covered work, and you disclaim any intention to limit operation or
179
+ modification of the work as a means of enforcing, against the work's
180
+ users, your or third parties' legal rights to forbid circumvention of
181
+ technological measures.
182
+
183
+ 4. Conveying Verbatim Copies.
184
+
185
+ You may convey verbatim copies of the Program's source code as you
186
+ receive it, in any medium, provided that you conspicuously and
187
+ appropriately publish on each copy an appropriate copyright notice;
188
+ keep intact all notices stating that this License and any
189
+ non-permissive terms added in accord with section 7 apply to the code;
190
+ keep intact all notices of the absence of any warranty; and give all
191
+ recipients a copy of this License along with the Program.
192
+
193
+ You may charge any price or no price for each copy that you convey,
194
+ and you may offer support or warranty protection for a fee.
195
+
196
+ 5. Conveying Modified Source Versions.
197
+
198
+ You may convey a work based on the Program, or the modifications to
199
+ produce it from the Program, in the form of source code under the
200
+ terms of section 4, provided that you also meet all of these conditions:
201
+
202
+ a) The work must carry prominent notices stating that you modified
203
+ it, and giving a relevant date.
204
+
205
+ b) The work must carry prominent notices stating that it is
206
+ released under this License and any conditions added under section
207
+ 7. This requirement modifies the requirement in section 4 to
208
+ "keep intact all notices".
209
+
210
+ c) You must license the entire work, as a whole, under this
211
+ License to anyone who comes into possession of a copy. This
212
+ License will therefore apply, along with any applicable section 7
213
+ additional terms, to the whole of the work, and all its parts,
214
+ regardless of how they are packaged. This License gives no
215
+ permission to license the work in any other way, but it does not
216
+ invalidate such permission if you have separately received it.
217
+
218
+ d) If the work has interactive user interfaces, each must display
219
+ Appropriate Legal Notices; however, if the Program has interactive
220
+ interfaces that do not display Appropriate Legal Notices, your
221
+ work need not make them do so.
222
+
223
+ A compilation of a covered work with other separate and independent
224
+ works, which are not by their nature extensions of the covered work,
225
+ and which are not combined with it such as to form a larger program,
226
+ in or on a volume of a storage or distribution medium, is called an
227
+ "aggregate" if the compilation and its resulting copyright are not
228
+ used to limit the access or legal rights of the compilation's users
229
+ beyond what the individual works permit. Inclusion of a covered work
230
+ in an aggregate does not cause this License to apply to the other
231
+ parts of the aggregate.
232
+
233
+ 6. Conveying Non-Source Forms.
234
+
235
+ You may convey a covered work in object code form under the terms
236
+ of sections 4 and 5, provided that you also convey the
237
+ machine-readable Corresponding Source under the terms of this License,
238
+ in one of these ways:
239
+
240
+ a) Convey the object code in, or embodied in, a physical product
241
+ (including a physical distribution medium), accompanied by the
242
+ Corresponding Source fixed on a durable physical medium
243
+ customarily used for software interchange.
244
+
245
+ b) Convey the object code in, or embodied in, a physical product
246
+ (including a physical distribution medium), accompanied by a
247
+ written offer, valid for at least three years and valid for as
248
+ long as you offer spare parts or customer support for that product
249
+ model, to give anyone who possesses the object code either (1) a
250
+ copy of the Corresponding Source for all the software in the
251
+ product that is covered by this License, on a durable physical
252
+ medium customarily used for software interchange, for a price no
253
+ more than your reasonable cost of physically performing this
254
+ conveying of source, or (2) access to copy the
255
+ Corresponding Source from a network server at no charge.
256
+
257
+ c) Convey individual copies of the object code with a copy of the
258
+ written offer to provide the Corresponding Source. This
259
+ alternative is allowed only occasionally and noncommercially, and
260
+ only if you received the object code with such an offer, in accord
261
+ with subsection 6b.
262
+
263
+ d) Convey the object code by offering access from a designated
264
+ place (gratis or for a charge), and offer equivalent access to the
265
+ Corresponding Source in the same way through the same place at no
266
+ further charge. You need not require recipients to copy the
267
+ Corresponding Source along with the object code. If the place to
268
+ copy the object code is a network server, the Corresponding Source
269
+ may be on a different server (operated by you or a third party)
270
+ that supports equivalent copying facilities, provided you maintain
271
+ clear directions next to the object code saying where to find the
272
+ Corresponding Source. Regardless of what server hosts the
273
+ Corresponding Source, you remain obligated to ensure that it is
274
+ available for as long as needed to satisfy these requirements.
275
+
276
+ e) Convey the object code using peer-to-peer transmission, provided
277
+ you inform other peers where the object code and Corresponding
278
+ Source of the work are being offered to the general public at no
279
+ charge under subsection 6d.
280
+
281
+ A separable portion of the object code, whose source code is excluded
282
+ from the Corresponding Source as a System Library, need not be
283
+ included in conveying the object code work.
284
+
285
+ A "User Product" is either (1) a "consumer product", which means any
286
+ tangible personal property which is normally used for personal, family,
287
+ or household purposes, or (2) anything designed or sold for incorporation
288
+ into a dwelling. In determining whether a product is a consumer product,
289
+ doubtful cases shall be resolved in favor of coverage. For a particular
290
+ product received by a particular user, "normally used" refers to a
291
+ typical or common use of that class of product, regardless of the status
292
+ of the particular user or of the way in which the particular user
293
+ actually uses, or expects or is expected to use, the product. A product
294
+ is a consumer product regardless of whether the product has substantial
295
+ commercial, industrial or non-consumer uses, unless such uses represent
296
+ the only significant mode of use of the product.
297
+
298
+ "Installation Information" for a User Product means any methods,
299
+ procedures, authorization keys, or other information required to install
300
+ and execute modified versions of a covered work in that User Product from
301
+ a modified version of its Corresponding Source. The information must
302
+ suffice to ensure that the continued functioning of the modified object
303
+ code is in no case prevented or interfered with solely because
304
+ modification has been made.
305
+
306
+ If you convey an object code work under this section in, or with, or
307
+ specifically for use in, a User Product, and the conveying occurs as
308
+ part of a transaction in which the right of possession and use of the
309
+ User Product is transferred to the recipient in perpetuity or for a
310
+ fixed term (regardless of how the transaction is characterized), the
311
+ Corresponding Source conveyed under this section must be accompanied
312
+ by the Installation Information. But this requirement does not apply
313
+ if neither you nor any third party retains the ability to install
314
+ modified object code on the User Product (for example, the work has
315
+ been installed in ROM).
316
+
317
+ The requirement to provide Installation Information does not include a
318
+ requirement to continue to provide support service, warranty, or updates
319
+ for a work that has been modified or installed by the recipient, or for
320
+ the User Product in which it has been modified or installed. Access to a
321
+ network may be denied when the modification itself materially and
322
+ adversely affects the operation of the network or violates the rules and
323
+ protocols for communication across the network.
324
+
325
+ Corresponding Source conveyed, and Installation Information provided,
326
+ in accord with this section must be in a format that is publicly
327
+ documented (and with an implementation available to the public in
328
+ source code form), and must require no special password or key for
329
+ unpacking, reading or copying.
330
+
331
+ 7. Additional Terms.
332
+
333
+ "Additional permissions" are terms that supplement the terms of this
334
+ License by making exceptions from one or more of its conditions.
335
+ Additional permissions that are applicable to the entire Program shall
336
+ be treated as though they were included in this License, to the extent
337
+ that they are valid under applicable law. If additional permissions
338
+ apply only to part of the Program, that part may be used separately
339
+ under those permissions, but the entire Program remains governed by
340
+ this License without regard to the additional permissions.
341
+
342
+ When you convey a copy of a covered work, you may at your option
343
+ remove any additional permissions from that copy, or from any part of
344
+ it. (Additional permissions may be written to require their own
345
+ removal in certain cases when you modify the work.) You may place
346
+ additional permissions on material, added by you to a covered work,
347
+ for which you have or can give appropriate copyright permission.
348
+
349
+ Notwithstanding any other provision of this License, for material you
350
+ add to a covered work, you may (if authorized by the copyright holders of
351
+ that material) supplement the terms of this License with terms:
352
+
353
+ a) Disclaiming warranty or limiting liability differently from the
354
+ terms of sections 15 and 16 of this License; or
355
+
356
+ b) Requiring preservation of specified reasonable legal notices or
357
+ author attributions in that material or in the Appropriate Legal
358
+ Notices displayed by works containing it; or
359
+
360
+ c) Prohibiting misrepresentation of the origin of that material, or
361
+ requiring that modified versions of such material be marked in
362
+ reasonable ways as different from the original version; or
363
+
364
+ d) Limiting the use for publicity purposes of names of licensors or
365
+ authors of the material; or
366
+
367
+ e) Declining to grant rights under trademark law for use of some
368
+ trade names, trademarks, or service marks; or
369
+
370
+ f) Requiring indemnification of licensors and authors of that
371
+ material by anyone who conveys the material (or modified versions of
372
+ it) with contractual assumptions of liability to the recipient, for
373
+ any liability that these contractual assumptions directly impose on
374
+ those licensors and authors.
375
+
376
+ All other non-permissive additional terms are considered "further
377
+ restrictions" within the meaning of section 10. If the Program as you
378
+ received it, or any part of it, contains a notice stating that it is
379
+ governed by this License along with a term that is a further
380
+ restriction, you may remove that term. If a license document contains
381
+ a further restriction but permits relicensing or conveying under this
382
+ License, you may add to a covered work material governed by the terms
383
+ of that license document, provided that the further restriction does
384
+ not survive such relicensing or conveying.
385
+
386
+ If you add terms to a covered work in accord with this section, you
387
+ must place, in the relevant source files, a statement of the
388
+ additional terms that apply to those files, or a notice indicating
389
+ where to find the applicable terms.
390
+
391
+ Additional terms, permissive or non-permissive, may be stated in the
392
+ form of a separately written license, or stated as exceptions;
393
+ the above requirements apply either way.
394
+
395
+ 8. Termination.
396
+
397
+ You may not propagate or modify a covered work except as expressly
398
+ provided under this License. Any attempt otherwise to propagate or
399
+ modify it is void, and will automatically terminate your rights under
400
+ this License (including any patent licenses granted under the third
401
+ paragraph of section 11).
402
+
403
+ However, if you cease all violation of this License, then your
404
+ license from a particular copyright holder is reinstated (a)
405
+ provisionally, unless and until the copyright holder explicitly and
406
+ finally terminates your license, and (b) permanently, if the copyright
407
+ holder fails to notify you of the violation by some reasonable means
408
+ prior to 60 days after the cessation.
409
+
410
+ Moreover, your license from a particular copyright holder is
411
+ reinstated permanently if the copyright holder notifies you of the
412
+ violation by some reasonable means, this is the first time you have
413
+ received notice of violation of this License (for any work) from that
414
+ copyright holder, and you cure the violation prior to 30 days after
415
+ your receipt of the notice.
416
+
417
+ Termination of your rights under this section does not terminate the
418
+ licenses of parties who have received copies or rights from you under
419
+ this License. If your rights have been terminated and not permanently
420
+ reinstated, you do not qualify to receive new licenses for the same
421
+ material under section 10.
422
+
423
+ 9. Acceptance Not Required for Having Copies.
424
+
425
+ You are not required to accept this License in order to receive or
426
+ run a copy of the Program. Ancillary propagation of a covered work
427
+ occurring solely as a consequence of using peer-to-peer transmission
428
+ to receive a copy likewise does not require acceptance. However,
429
+ nothing other than this License grants you permission to propagate or
430
+ modify any covered work. These actions infringe copyright if you do
431
+ not accept this License. Therefore, by modifying or propagating a
432
+ covered work, you indicate your acceptance of this License to do so.
433
+
434
+ 10. Automatic Licensing of Downstream Recipients.
435
+
436
+ Each time you convey a covered work, the recipient automatically
437
+ receives a license from the original licensors, to run, modify and
438
+ propagate that work, subject to this License. You are not responsible
439
+ for enforcing compliance by third parties with this License.
440
+
441
+ An "entity transaction" is a transaction transferring control of an
442
+ organization, or substantially all assets of one, or subdividing an
443
+ organization, or merging organizations. If propagation of a covered
444
+ work results from an entity transaction, each party to that
445
+ transaction who receives a copy of the work also receives whatever
446
+ licenses to the work the party's predecessor in interest had or could
447
+ give under the previous paragraph, plus a right to possession of the
448
+ Corresponding Source of the work from the predecessor in interest, if
449
+ the predecessor has it or can get it with reasonable efforts.
450
+
451
+ You may not impose any further restrictions on the exercise of the
452
+ rights granted or affirmed under this License. For example, you may
453
+ not impose a license fee, royalty, or other charge for exercise of
454
+ rights granted under this License, and you may not initiate litigation
455
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
456
+ any patent claim is infringed by making, using, selling, offering for
457
+ sale, or importing the Program or any portion of it.
458
+
459
+ 11. Patents.
460
+
461
+ A "contributor" is a copyright holder who authorizes use under this
462
+ License of the Program or a work on which the Program is based. The
463
+ work thus licensed is called the contributor's "contributor version".
464
+
465
+ A contributor's "essential patent claims" are all patent claims
466
+ owned or controlled by the contributor, whether already acquired or
467
+ hereafter acquired, that would be infringed by some manner, permitted
468
+ by this License, of making, using, or selling its contributor version,
469
+ but do not include claims that would be infringed only as a
470
+ consequence of further modification of the contributor version. For
471
+ purposes of this definition, "control" includes the right to grant
472
+ patent sublicenses in a manner consistent with the requirements of
473
+ this License.
474
+
475
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
476
+ patent license under the contributor's essential patent claims, to
477
+ make, use, sell, offer for sale, import and otherwise run, modify and
478
+ propagate the contents of its contributor version.
479
+
480
+ In the following three paragraphs, a "patent license" is any express
481
+ agreement or commitment, however denominated, not to enforce a patent
482
+ (such as an express permission to practice a patent or covenant not to
483
+ sue for patent infringement). To "grant" such a patent license to a
484
+ party means to make such an agreement or commitment not to enforce a
485
+ patent against the party.
486
+
487
+ If you convey a covered work, knowingly relying on a patent license,
488
+ and the Corresponding Source of the work is not available for anyone
489
+ to copy, free of charge and under the terms of this License, through a
490
+ publicly available network server or other readily accessible means,
491
+ then you must either (1) cause the Corresponding Source to be so
492
+ available, or (2) arrange to deprive yourself of the benefit of the
493
+ patent license for this particular work, or (3) arrange, in a manner
494
+ consistent with the requirements of this License, to extend the patent
495
+ license to downstream recipients. "Knowingly relying" means you have
496
+ actual knowledge that, but for the patent license, your conveying the
497
+ covered work in a country, or your recipient's use of the covered work
498
+ in a country, would infringe one or more identifiable patents in that
499
+ country that you have reason to believe are valid.
500
+
501
+ If, pursuant to or in connection with a single transaction or
502
+ arrangement, you convey, or propagate by procuring conveyance of, a
503
+ covered work, and grant a patent license to some of the parties
504
+ receiving the covered work authorizing them to use, propagate, modify
505
+ or convey a specific copy of the covered work, then the patent license
506
+ you grant is automatically extended to all recipients of the covered
507
+ work and works based on it.
508
+
509
+ A patent license is "discriminatory" if it does not include within
510
+ the scope of its coverage, prohibits the exercise of, or is
511
+ conditioned on the non-exercise of one or more of the rights that are
512
+ specifically granted under this License. You may not convey a covered
513
+ work if you are a party to an arrangement with a third party that is
514
+ in the business of distributing software, under which you make payment
515
+ to the third party based on the extent of your activity of conveying
516
+ the work, and under which the third party grants, to any of the
517
+ parties who would receive the covered work from you, a discriminatory
518
+ patent license (a) in connection with copies of the covered work
519
+ conveyed by you (or copies made from those copies), or (b) primarily
520
+ for and in connection with specific products or compilations that
521
+ contain the covered work, unless you entered into that arrangement,
522
+ or that patent license was granted, prior to 28 March 2007.
523
+
524
+ Nothing in this License shall be construed as excluding or limiting
525
+ any implied license or other defenses to infringement that may
526
+ otherwise be available to you under applicable patent law.
527
+
528
+ 12. No Surrender of Others' Freedom.
529
+
530
+ If conditions are imposed on you (whether by court order, agreement or
531
+ otherwise) that contradict the conditions of this License, they do not
532
+ excuse you from the conditions of this License. If you cannot convey a
533
+ covered work so as to satisfy simultaneously your obligations under this
534
+ License and any other pertinent obligations, then as a consequence you may
535
+ not convey it at all. For example, if you agree to terms that obligate you
536
+ to collect a royalty for further conveying from those to whom you convey
537
+ the Program, the only way you could satisfy both those terms and this
538
+ License would be to refrain entirely from conveying the Program.
539
+
540
+ 13. Remote Network Interaction; Use with the GNU General Public License.
541
+
542
+ Notwithstanding any other provision of this License, if you modify the
543
+ Program, your modified version must prominently offer all users
544
+ interacting with it remotely through a computer network (if your version
545
+ supports such interaction) an opportunity to receive the Corresponding
546
+ Source of your version by providing access to the Corresponding Source
547
+ from a network server at no charge, through some standard or customary
548
+ means of facilitating copying of software. This Corresponding Source
549
+ shall include the Corresponding Source for any work covered by version 3
550
+ of the GNU General Public License that is incorporated pursuant to the
551
+ following paragraph.
552
+
553
+ Notwithstanding any other provision of this License, you have
554
+ permission to link or combine any covered work with a work licensed
555
+ under version 3 of the GNU General Public License into a single
556
+ combined work, and to convey the resulting work. The terms of this
557
+ License will continue to apply to the part which is the covered work,
558
+ but the work with which it is combined will remain governed by version
559
+ 3 of the GNU General Public License.
560
+
561
+ 14. Revised Versions of this License.
562
+
563
+ The Free Software Foundation may publish revised and/or new versions of
564
+ the GNU Affero General Public License from time to time. Such new versions
565
+ will be similar in spirit to the present version, but may differ in detail to
566
+ address new problems or concerns.
567
+
568
+ Each version is given a distinguishing version number. If the
569
+ Program specifies that a certain numbered version of the GNU Affero General
570
+ Public License "or any later version" applies to it, you have the
571
+ option of following the terms and conditions either of that numbered
572
+ version or of any later version published by the Free Software
573
+ Foundation. If the Program does not specify a version number of the
574
+ GNU Affero General Public License, you may choose any version ever published
575
+ by the Free Software Foundation.
576
+
577
+ If the Program specifies that a proxy can decide which future
578
+ versions of the GNU Affero General Public License can be used, that proxy's
579
+ public statement of acceptance of a version permanently authorizes you
580
+ to choose that version for the Program.
581
+
582
+ Later license versions may give you additional or different
583
+ permissions. However, no additional obligations are imposed on any
584
+ author or copyright holder as a result of your choosing to follow a
585
+ later version.
586
+
587
+ 15. Disclaimer of Warranty.
588
+
589
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597
+
598
+ 16. Limitation of Liability.
599
+
600
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608
+ SUCH DAMAGES.
609
+
610
+ 17. Interpretation of Sections 15 and 16.
611
+
612
+ If the disclaimer of warranty and limitation of liability provided
613
+ above cannot be given local legal effect according to their terms,
614
+ reviewing courts shall apply local law that most closely approximates
615
+ an absolute waiver of all civil liability in connection with the
616
+ Program, unless a warranty or assumption of liability accompanies a
617
+ copy of the Program in return for a fee.
618
+
619
+ END OF TERMS AND CONDITIONS
620
+
621
+ How to Apply These Terms to Your New Programs
622
+
623
+ If you develop a new program, and you want it to be of the greatest
624
+ possible use to the public, the best way to achieve this is to make it
625
+ free software which everyone can redistribute and change under these terms.
626
+
627
+ To do so, attach the following notices to the program. It is safest
628
+ to attach them to the start of each source file to most effectively
629
+ state the exclusion of warranty; and each file should have at least
630
+ the "copyright" line and a pointer to where the full notice is found.
631
+
632
+ <one line to give the program's name and a brief idea of what it does.>
633
+ Copyright (C) <year> <name of author>
634
+
635
+ This program is free software: you can redistribute it and/or modify
636
+ it under the terms of the GNU Affero General Public License as published by
637
+ the Free Software Foundation, either version 3 of the License, or
638
+ (at your option) any later version.
639
+
640
+ This program is distributed in the hope that it will be useful,
641
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
642
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643
+ GNU Affero General Public License for more details.
644
+
645
+ You should have received a copy of the GNU Affero General Public License
646
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
647
+
648
+ Also add information on how to contact you by electronic and paper mail.
649
+
650
+ If your software can interact with users remotely through a computer
651
+ network, you should also make sure that it provides a way for users to
652
+ get its source. For example, if your program is a web application, its
653
+ interface could display a "Source" link that leads users to an archive
654
+ of the code. There are many ways you could offer source, and different
655
+ solutions will be better for different programs; see section 13 for the
656
+ specific requirements.
657
+
658
+ You should also get your employer (if you work as a programmer) or school,
659
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
660
+ For more information on this, and how to apply and follow the GNU AGPL, see
661
+ <http://www.gnu.org/licenses/>.
Makefile ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8; mode: makefile-gmake -*-
2
+ # SPDX-License-Identifier: AGPL-3.0-or-later
3
+
4
+ .DEFAULT_GOAL=help
5
+ export MTOOLS=./manage
6
+
7
+ include utils/makefile.include
8
+
9
+ all: clean install
10
+
11
+ PHONY += help
12
+
13
+ help:
14
+ @./manage --help
15
+ @echo '----'
16
+ @echo 'run - run developer instance'
17
+ @echo 'install - developer install of SearxNG into virtualenv'
18
+ @echo 'uninstall - uninstall developer installation'
19
+ @echo 'clean - clean up working tree'
20
+ @echo 'test - run shell & CI tests'
21
+ @echo 'test.shell - test shell scripts'
22
+ @echo 'ci.test - run CI tests'
23
+
24
+
25
+ PHONY += run
26
+ run: install
27
+ $(Q)./manage webapp.run
28
+
29
+ PHONY += install uninstall
30
+ install uninstall:
31
+ $(Q)./manage pyenv.$@
32
+
33
+ PHONY += clean
34
+ clean: py.clean docs.clean node.clean nvm.clean go.clean test.clean
35
+ $(Q)./manage build_msg CLEAN "common files"
36
+ $(Q)find . -name '*.orig' -exec rm -f {} +
37
+ $(Q)find . -name '*.rej' -exec rm -f {} +
38
+ $(Q)find . -name '*~' -exec rm -f {} +
39
+ $(Q)find . -name '*.bak' -exec rm -f {} +
40
+
41
+
42
+ PHONY += test ci.test test.shell
43
+ test: test.yamllint test.black test.pyright_modified test.pylint test.unit test.robot test.rst test.shell test.shfmt
44
+ ci.test: test test.pybabel
45
+ test.shell:
46
+ $(Q)shellcheck -x -s dash \
47
+ container/entrypoint.sh
48
+ $(Q)shellcheck -x -s bash \
49
+ utils/brand.sh \
50
+ $(MTOOLS) \
51
+ utils/lib.sh \
52
+ utils/lib_sxng*.sh \
53
+ utils/lib_govm.sh \
54
+ utils/lib_nvm.sh \
55
+ utils/lib_redis.sh \
56
+ utils/lib_valkey.sh \
57
+ utils/searxng.sh
58
+ $(Q)$(MTOOLS) build_msg TEST "$@ OK"
59
+
60
+ PHONY += format
61
+ format: format.python format.shell
62
+
63
+ # wrap ./manage script
64
+
65
+ MANAGE += weblate.translations.commit weblate.push.translations
66
+ MANAGE += data.all data.traits data.useragents data.gsa_useragents data.locales data.currencies
67
+ MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
68
+ MANAGE += podman.build
69
+ MANAGE += docker.build docker.buildx
70
+ MANAGE += container.build container.test container.push
71
+ MANAGE += gecko.driver
72
+ MANAGE += node.env node.env.dev node.clean
73
+ MANAGE += py.build py.clean
74
+ MANAGE += pyenv pyenv.install pyenv.uninstall
75
+ MANAGE += format.python format.shell
76
+ MANAGE += test.yamllint test.pylint test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean test.themes test.pyright test.pyright_modified test.shfmt
77
+ MANAGE += themes.all themes.simple themes.simple.analyze themes.fix themes.lint themes.test
78
+ MANAGE += static.build.commit static.build.drop static.build.restore
79
+ MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs
80
+ MANAGE += go.env.dev go.clean
81
+
82
+ PHONY += $(MANAGE)
83
+
84
+ $(MANAGE):
85
+ $(Q)$(MTOOLS) $@
86
+
87
+ # short hands of selected targets
88
+
89
+ PHONY += docs container themes
90
+
91
+ docs: docs.html
92
+ container: container.build
93
+ themes: themes.all
PULL_REQUEST_TEMPLATE.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- FILL IN THESE FIELDS .. and delete the comments after reading.
2
+
3
+ Use Markdown for formatting -> https://www.markdowntools.io/cheat-sheet
4
+ -->
5
+
6
+ ### What does this PR do?
7
+
8
+ <!-- Explain the motivation and changes in your pull request. -->
9
+
10
+ ### How to test this PR locally?
11
+
12
+ <!-- Commands to run the tests or instructions to test the changes. Are there
13
+ any edge cases (environment, language, or other contexts) to take into
14
+ account? -->
15
+
16
+ ### Related issues
17
+
18
+ <!--
19
+ Closes: #234
20
+ -->
21
+
22
+ ### Code of Conduct
23
+
24
+ <!-- ⚠️ Bad AI drivers will be denounced: People who produce bad contributions
25
+ that are clearly AI (slop) will be blocked for all future contributions.
26
+ -->
27
+
28
+ [AI Policy]: https://github.com/searxng/searxng/blob/master/AI_POLICY.rst
29
+
30
+ - [ ] **I hereby confirm that this PR conforms with the [AI Policy].**
31
+
32
+ If I have used AI tools for working on the changes in this PR, I will
33
+ attach a list of all AI tools I used and how I used them. I hereby confirm
34
+ that I haven't used any other tools than the ones I mention below.
README.rst ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ .. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
4
+ .. _Installation guide: https://docs.searxng.org/admin/installation.html
5
+ .. _Configuration guide: https://docs.searxng.org/admin/settings/index.html
6
+ .. _CONTRIBUTING: https://github.com/searxng/searxng/blob/master/CONTRIBUTING.rst
7
+ .. _LICENSE: https://github.com/searxng/searxng/blob/master/LICENSE
8
+
9
+ .. figure:: https://raw.githubusercontent.com/searxng/searxng/master/client/simple/src/brand/searxng.svg
10
+ :target: https://searxng.org
11
+ :alt: SearXNG
12
+ :width: 512px
13
+
14
+
15
+ SearXNG is a `metasearch engine`_. Users are neither tracked nor profiled.
16
+
17
+ .. image:: https://img.shields.io/badge/organization-3050ff?style=flat-square&logo=searxng&logoColor=fff&cacheSeconds=86400
18
+ :target: https://github.com/searxng
19
+ :alt: Organization
20
+
21
+ .. image:: https://img.shields.io/badge/documentation-3050ff?style=flat-square&logo=readthedocs&logoColor=fff&cacheSeconds=86400
22
+ :target: https://docs.searxng.org
23
+ :alt: Documentation
24
+
25
+ .. image:: https://img.shields.io/github/license/searxng/searxng?style=flat-square&label=license&color=3050ff&cacheSeconds=86400
26
+ :target: https://github.com/searxng/searxng/blob/master/LICENSE
27
+ :alt: License
28
+
29
+ .. image:: https://img.shields.io/github/commit-activity/y/searxng/searxng/master?style=flat-square&label=commits&color=3050ff&cacheSeconds=3600
30
+ :target: https://github.com/searxng/searxng/commits/master/
31
+ :alt: Commits
32
+
33
+ .. image:: https://img.shields.io/weblate/progress/searxng?server=https%3A%2F%2Ftranslate.codeberg.org&style=flat-square&label=translated&color=3050ff&cacheSeconds=86400
34
+ :target: https://translate.codeberg.org/projects/searxng/
35
+ :alt: Translated
36
+
37
+ Setup
38
+ =====
39
+
40
+ To install SearXNG, see `Installation guide`_.
41
+
42
+ To fine-tune SearXNG, see `Configuration guide`_.
43
+
44
+ Further information on *how-to* can be found `here <https://docs.searxng.org/admin/index.html>`_.
45
+
46
+ Connect
47
+ =======
48
+
49
+ If you have questions or want to connect with others in the community:
50
+
51
+ - `#searxng:matrix.org <https://matrix.to/#/#searxng:matrix.org>`_
52
+
53
+ Contributing
54
+ ============
55
+
56
+ See CONTRIBUTING_ for more details.
57
+
58
+ License
59
+ =======
60
+
61
+ This project is licensed under the GNU Affero General Public License (AGPL-3.0).
62
+ See LICENSE_ for more details.
SECURITY.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # Security Policy
2
+
3
+ We love responsible reports of (potential) security issues in SearXNG.
4
+
5
+ You can contact us at security@searxng.org.
6
+
7
+ Be sure to provide as much information as possible and if found
8
+ also reproduction steps of the identified vulnerability. Also
9
+ add the specific URL of the project as well as code you found
10
+ the issue in to your report.
babel.cfg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ [extractors]
2
+ searxng_msg = searx.babel_extract.extract
3
+ [ignore: **/node_modules/**]
4
+ [python: **.py]
5
+ [jinja2: **/templates/**.html]
6
+ [searxng_msg: **/searxng.msg]
client/simple/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ dist
2
+ node_modules
client/simple/.stylelintrc.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json.schemastore.org/stylelintrc.json",
3
+ "plugins": ["stylelint-prettier"],
4
+ "extends": ["stylelint-config-standard-less"],
5
+ "rules": {
6
+ "at-rule-no-vendor-prefix": null,
7
+ "at-rule-prelude-no-invalid": null,
8
+ "declaration-empty-line-before": null,
9
+ "declaration-property-value-no-unknown": null,
10
+ "no-invalid-position-at-import-rule": null,
11
+ "prettier/prettier": true,
12
+ "property-no-vendor-prefix": null,
13
+ "selector-attribute-quotes": null,
14
+ "selector-class-pattern": null,
15
+ "selector-id-pattern": null,
16
+ "selector-no-vendor-prefix": null,
17
+ "shorthand-property-no-redundant-values": null
18
+ }
19
+ }
client/simple/README.rst ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ =====================
2
+ MEMO vite development
3
+ =====================
4
+
5
+ Local install::
6
+
7
+ # in folder ./client/simple/
8
+ $ npm install
9
+
10
+ Start development server::
11
+
12
+ $ ./manage vite.simple.dev
13
+
14
+ # in folder ./client/simple/
15
+ $ npm exec -- vite
16
+
17
+ Fix source code::
18
+
19
+ # in folder ./client/simple/
20
+ $ npm run fix
21
+
22
+ Fix & Build::
23
+
24
+ $ ./manage vite.simple.build
client/simple/biome.json ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3
+ "files": {
4
+ "ignoreUnknown": true,
5
+ "includes": ["**", "!node_modules"]
6
+ },
7
+ "assist": {
8
+ "enabled": true,
9
+ "actions": {
10
+ "recommended": true,
11
+ "source": {
12
+ "useSortedAttributes": "on",
13
+ "useSortedProperties": "on"
14
+ }
15
+ }
16
+ },
17
+ "formatter": {
18
+ "enabled": true,
19
+ "bracketSameLine": false,
20
+ "bracketSpacing": true,
21
+ "formatWithErrors": false,
22
+ "indentStyle": "space",
23
+ "indentWidth": 2,
24
+ "lineEnding": "lf",
25
+ "lineWidth": 120
26
+ },
27
+ "linter": {
28
+ "enabled": true,
29
+ "rules": {
30
+ "recommended": true,
31
+ "complexity": {
32
+ "noForEach": "error",
33
+ "noImplicitCoercions": "error",
34
+ "noUselessCatchBinding": "error",
35
+ "noUselessUndefined": "error",
36
+ "useSimplifiedLogicExpression": "error"
37
+ },
38
+ "correctness": {
39
+ "noGlobalDirnameFilename": "error",
40
+ "useImportExtensions": "error",
41
+ "useJsonImportAttributes": "error",
42
+ "useSingleJsDocAsterisk": "error"
43
+ },
44
+ "nursery": {
45
+ "noContinue": "warn",
46
+ "noEqualsToNull": "warn",
47
+ "noFloatingPromises": "warn",
48
+ "noForIn": "warn",
49
+ "noIncrementDecrement": "warn",
50
+ "noMisusedPromises": "warn",
51
+ "noMultiAssign": "warn",
52
+ "noMultiStr": "warn",
53
+ "noNestedPromises": "warn",
54
+ "noParametersOnlyUsedInRecursion": "warn",
55
+ "noRedundantDefaultExport": "warn",
56
+ "noReturnAssign": "warn",
57
+ "noUselessReturn": "off",
58
+ "useAwaitThenable": "off",
59
+ "useConsistentEnumValueType": "warn",
60
+ "useDestructuring": "warn",
61
+ "useExhaustiveSwitchCases": "warn",
62
+ "useExplicitType": "off",
63
+ "useFind": "warn",
64
+ "useRegexpExec": "warn"
65
+ },
66
+ "performance": {
67
+ "noAwaitInLoops": "error",
68
+ "noBarrelFile": "error",
69
+ "noDelete": "error",
70
+ "noNamespaceImport": "error",
71
+ "noReExportAll": "error",
72
+ "useTopLevelRegex": "error"
73
+ },
74
+ "style": {
75
+ "noCommonJs": "error",
76
+ "noEnum": "error",
77
+ "noImplicitBoolean": "error",
78
+ "noInferrableTypes": "error",
79
+ "noNamespace": "error",
80
+ "noNegationElse": "error",
81
+ "noNestedTernary": "error",
82
+ "noParameterAssign": "error",
83
+ "noParameterProperties": "error",
84
+ "noRestrictedTypes": {
85
+ "level": "error",
86
+ "options": {
87
+ "types": {
88
+ "Element": {
89
+ "message": "Element is too generic",
90
+ "use": "HTMLElement"
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "noSubstr": "error",
96
+ "noUnusedTemplateLiteral": "error",
97
+ "noUselessElse": "error",
98
+ "noYodaExpression": "error",
99
+ "useAsConstAssertion": "error",
100
+ "useAtIndex": "error",
101
+ "useCollapsedElseIf": "error",
102
+ "useCollapsedIf": "error",
103
+ "useConsistentArrayType": {
104
+ "level": "error",
105
+ "options": {
106
+ "syntax": "shorthand"
107
+ }
108
+ },
109
+ "useConsistentBuiltinInstantiation": "error",
110
+ "useConsistentMemberAccessibility": {
111
+ "level": "error",
112
+ "options": {
113
+ "accessibility": "explicit"
114
+ }
115
+ },
116
+ "useConsistentObjectDefinitions": {
117
+ "level": "error",
118
+ "options": {
119
+ "syntax": "explicit"
120
+ }
121
+ },
122
+ "useConsistentTypeDefinitions": {
123
+ "level": "error",
124
+ "options": {
125
+ "style": "type"
126
+ }
127
+ },
128
+ "useDefaultSwitchClause": "error",
129
+ "useExplicitLengthCheck": "error",
130
+ "useForOf": "error",
131
+ "useGroupedAccessorPairs": "error",
132
+ "useNumberNamespace": "error",
133
+ "useNumericSeparators": "error",
134
+ "useObjectSpread": "error",
135
+ "useReadonlyClassProperties": "error",
136
+ "useSelfClosingElements": "error",
137
+ "useShorthandAssign": "error",
138
+ "useSingleVarDeclarator": "error",
139
+ "useThrowNewError": "error",
140
+ "useThrowOnlyError": "error",
141
+ "useTrimStartEnd": "error",
142
+ "useUnifiedTypeSignatures": "error"
143
+ },
144
+ "suspicious": {
145
+ "noAlert": "error",
146
+ "noBitwiseOperators": "error",
147
+ "noConstantBinaryExpressions": "error",
148
+ "noDeprecatedImports": "error",
149
+ "noEmptyBlockStatements": "error",
150
+ "noEvolvingTypes": "error",
151
+ "noImportCycles": "error",
152
+ "noUnassignedVariables": "error",
153
+ "noVar": "error",
154
+ "useNumberToFixedDigitsArgument": "error",
155
+ "useStaticResponseMethods": "error"
156
+ }
157
+ }
158
+ },
159
+ "javascript": {
160
+ "formatter": {
161
+ "arrowParentheses": "always",
162
+ "jsxQuoteStyle": "double",
163
+ "quoteProperties": "asNeeded",
164
+ "quoteStyle": "double",
165
+ "semicolons": "always",
166
+ "trailingCommas": "none"
167
+ }
168
+ }
169
+ }
client/simple/generated/pygments.less ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ /*
4
+ this file is generated automatically by searxng_extra/update/update_pygments.py
5
+ using pygments version 2.20.0:
6
+
7
+ ./manage templates.simple.pygments
8
+ */
9
+
10
+
11
+ .code-highlight {
12
+
13
+ pre { line-height: 125%; }
14
+ td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
15
+ span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
16
+ td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
17
+ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
18
+ .hll { background-color: #ffffcc }
19
+ .c { color: #3D7B7B; font-style: italic } /* Comment */
20
+ .err { border: 1px solid #F00 } /* Error */
21
+ .k { color: #008000; font-weight: bold } /* Keyword */
22
+ .o { color: #666 } /* Operator */
23
+ .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
24
+ .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
25
+ .cp { color: #9C6500 } /* Comment.Preproc */
26
+ .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
27
+ .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
28
+ .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
29
+ .gd { color: #A00000 } /* Generic.Deleted */
30
+ .ge { font-style: italic } /* Generic.Emph */
31
+ .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
32
+ .gr { color: #E40000 } /* Generic.Error */
33
+ .gh { color: #000080; font-weight: bold } /* Generic.Heading */
34
+ .gi { color: #008400 } /* Generic.Inserted */
35
+ .go { color: #717171 } /* Generic.Output */
36
+ .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
37
+ .gs { font-weight: bold } /* Generic.Strong */
38
+ .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
39
+ .gt { color: #04D } /* Generic.Traceback */
40
+ .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
41
+ .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
42
+ .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
43
+ .kp { color: #008000 } /* Keyword.Pseudo */
44
+ .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
45
+ .kt { color: #B00040 } /* Keyword.Type */
46
+ .m { color: #666 } /* Literal.Number */
47
+ .s { color: #BA2121 } /* Literal.String */
48
+ .na { color: #687822 } /* Name.Attribute */
49
+ .nb { color: #008000 } /* Name.Builtin */
50
+ .nc { color: #00F; font-weight: bold } /* Name.Class */
51
+ .no { color: #800 } /* Name.Constant */
52
+ .nd { color: #A2F } /* Name.Decorator */
53
+ .ni { color: #717171; font-weight: bold } /* Name.Entity */
54
+ .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
55
+ .nf { color: #00F } /* Name.Function */
56
+ .nl { color: #767600 } /* Name.Label */
57
+ .nn { color: #00F; font-weight: bold } /* Name.Namespace */
58
+ .nt { color: #008000; font-weight: bold } /* Name.Tag */
59
+ .nv { color: #19177C } /* Name.Variable */
60
+ .ow { color: #A2F; font-weight: bold } /* Operator.Word */
61
+ .w { color: #BBB } /* Text.Whitespace */
62
+ .mb { color: #666 } /* Literal.Number.Bin */
63
+ .mf { color: #666 } /* Literal.Number.Float */
64
+ .mh { color: #666 } /* Literal.Number.Hex */
65
+ .mi { color: #666 } /* Literal.Number.Integer */
66
+ .mo { color: #666 } /* Literal.Number.Oct */
67
+ .sa { color: #BA2121 } /* Literal.String.Affix */
68
+ .sb { color: #BA2121 } /* Literal.String.Backtick */
69
+ .sc { color: #BA2121 } /* Literal.String.Char */
70
+ .dl { color: #BA2121 } /* Literal.String.Delimiter */
71
+ .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
72
+ .s2 { color: #BA2121 } /* Literal.String.Double */
73
+ .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
74
+ .sh { color: #BA2121 } /* Literal.String.Heredoc */
75
+ .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
76
+ .sx { color: #008000 } /* Literal.String.Other */
77
+ .sr { color: #A45A77 } /* Literal.String.Regex */
78
+ .s1 { color: #BA2121 } /* Literal.String.Single */
79
+ .ss { color: #19177C } /* Literal.String.Symbol */
80
+ .bp { color: #008000 } /* Name.Builtin.Pseudo */
81
+ .fm { color: #00F } /* Name.Function.Magic */
82
+ .vc { color: #19177C } /* Name.Variable.Class */
83
+ .vg { color: #19177C } /* Name.Variable.Global */
84
+ .vi { color: #19177C } /* Name.Variable.Instance */
85
+ .vm { color: #19177C } /* Name.Variable.Magic */
86
+ .il { color: #666 } /* Literal.Number.Integer.Long */
87
+ }
88
+
89
+ .code-highlight-dark(){
90
+ .code-highlight {
91
+
92
+ pre { line-height: 125%; }
93
+ td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
94
+ span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
95
+ td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
96
+ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
97
+ .hll { background-color: #49483e }
98
+ .c { color: #959077 } /* Comment */
99
+ .err { color: #ED007E; background-color: #1E0010 } /* Error */
100
+ .esc { color: #F8F8F2 } /* Escape */
101
+ .g { color: #F8F8F2 } /* Generic */
102
+ .k { color: #66D9EF } /* Keyword */
103
+ .l { color: #AE81FF } /* Literal */
104
+ .n { color: #F8F8F2 } /* Name */
105
+ .o { color: #FF4689 } /* Operator */
106
+ .x { color: #F8F8F2 } /* Other */
107
+ .p { color: #F8F8F2 } /* Punctuation */
108
+ .ch { color: #959077 } /* Comment.Hashbang */
109
+ .cm { color: #959077 } /* Comment.Multiline */
110
+ .cp { color: #959077 } /* Comment.Preproc */
111
+ .cpf { color: #959077 } /* Comment.PreprocFile */
112
+ .c1 { color: #959077 } /* Comment.Single */
113
+ .cs { color: #959077 } /* Comment.Special */
114
+ .gd { color: #FF4689 } /* Generic.Deleted */
115
+ .ge { color: #F8F8F2; font-style: italic } /* Generic.Emph */
116
+ .ges { color: #F8F8F2; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
117
+ .gr { color: #F8F8F2 } /* Generic.Error */
118
+ .gh { color: #F8F8F2 } /* Generic.Heading */
119
+ .gi { color: #A6E22E } /* Generic.Inserted */
120
+ .go { color: #66D9EF } /* Generic.Output */
121
+ .gp { color: #FF4689; font-weight: bold } /* Generic.Prompt */
122
+ .gs { color: #F8F8F2; font-weight: bold } /* Generic.Strong */
123
+ .gu { color: #959077 } /* Generic.Subheading */
124
+ .gt { color: #F8F8F2 } /* Generic.Traceback */
125
+ .kc { color: #66D9EF } /* Keyword.Constant */
126
+ .kd { color: #66D9EF } /* Keyword.Declaration */
127
+ .kn { color: #FF4689 } /* Keyword.Namespace */
128
+ .kp { color: #66D9EF } /* Keyword.Pseudo */
129
+ .kr { color: #66D9EF } /* Keyword.Reserved */
130
+ .kt { color: #66D9EF } /* Keyword.Type */
131
+ .ld { color: #E6DB74 } /* Literal.Date */
132
+ .m { color: #AE81FF } /* Literal.Number */
133
+ .s { color: #E6DB74 } /* Literal.String */
134
+ .na { color: #A6E22E } /* Name.Attribute */
135
+ .nb { color: #F8F8F2 } /* Name.Builtin */
136
+ .nc { color: #A6E22E } /* Name.Class */
137
+ .no { color: #66D9EF } /* Name.Constant */
138
+ .nd { color: #A6E22E } /* Name.Decorator */
139
+ .ni { color: #F8F8F2 } /* Name.Entity */
140
+ .ne { color: #A6E22E } /* Name.Exception */
141
+ .nf { color: #A6E22E } /* Name.Function */
142
+ .nl { color: #F8F8F2 } /* Name.Label */
143
+ .nn { color: #F8F8F2 } /* Name.Namespace */
144
+ .nx { color: #A6E22E } /* Name.Other */
145
+ .py { color: #F8F8F2 } /* Name.Property */
146
+ .nt { color: #FF4689 } /* Name.Tag */
147
+ .nv { color: #F8F8F2 } /* Name.Variable */
148
+ .ow { color: #FF4689 } /* Operator.Word */
149
+ .pm { color: #F8F8F2 } /* Punctuation.Marker */
150
+ .w { color: #F8F8F2 } /* Text.Whitespace */
151
+ .mb { color: #AE81FF } /* Literal.Number.Bin */
152
+ .mf { color: #AE81FF } /* Literal.Number.Float */
153
+ .mh { color: #AE81FF } /* Literal.Number.Hex */
154
+ .mi { color: #AE81FF } /* Literal.Number.Integer */
155
+ .mo { color: #AE81FF } /* Literal.Number.Oct */
156
+ .sa { color: #E6DB74 } /* Literal.String.Affix */
157
+ .sb { color: #E6DB74 } /* Literal.String.Backtick */
158
+ .sc { color: #E6DB74 } /* Literal.String.Char */
159
+ .dl { color: #E6DB74 } /* Literal.String.Delimiter */
160
+ .sd { color: #E6DB74 } /* Literal.String.Doc */
161
+ .s2 { color: #E6DB74 } /* Literal.String.Double */
162
+ .se { color: #AE81FF } /* Literal.String.Escape */
163
+ .sh { color: #E6DB74 } /* Literal.String.Heredoc */
164
+ .si { color: #E6DB74 } /* Literal.String.Interpol */
165
+ .sx { color: #E6DB74 } /* Literal.String.Other */
166
+ .sr { color: #E6DB74 } /* Literal.String.Regex */
167
+ .s1 { color: #E6DB74 } /* Literal.String.Single */
168
+ .ss { color: #E6DB74 } /* Literal.String.Symbol */
169
+ .bp { color: #F8F8F2 } /* Name.Builtin.Pseudo */
170
+ .fm { color: #A6E22E } /* Name.Function.Magic */
171
+ .vc { color: #F8F8F2 } /* Name.Variable.Class */
172
+ .vg { color: #F8F8F2 } /* Name.Variable.Global */
173
+ .vi { color: #F8F8F2 } /* Name.Variable.Instance */
174
+ .vm { color: #F8F8F2 } /* Name.Variable.Magic */
175
+ .il { color: #AE81FF } /* Literal.Number.Integer.Long */
176
+ }
177
+ }
client/simple/package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
client/simple/package.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json.schemastore.org/package.json",
3
+ "name": "@searxng/theme-simple",
4
+ "version": "0.0.0",
5
+ "private": true,
6
+ "license": "AGPL-3.0",
7
+ "type": "module",
8
+ "scripts": {
9
+ "build": "npm run build:icons && npm run build:vite",
10
+ "build:icons": "node theme_icons.ts",
11
+ "build:vite": "vite build",
12
+ "clean": "rm -Rf node_modules",
13
+ "fix": "npm run fix:stylelint && npm run fix:biome && npm run fix:package",
14
+ "fix:biome": "biome check --write",
15
+ "fix:package": "sort-package-json --quiet",
16
+ "fix:stylelint": "stylelint --fix strict 'src/**/*.{scss,sass,less,styl}'",
17
+ "lint": "npm run lint:biome && npm run lint:tsc",
18
+ "lint:biome": "biome lint",
19
+ "lint:tsc": "tsc --noEmit"
20
+ },
21
+ "browserslist": [
22
+ "baseline 2022",
23
+ "not dead"
24
+ ],
25
+ "dependencies": {
26
+ "ionicons": "^8.0.13",
27
+ "normalize.css": "8.0.1",
28
+ "ol": "^10.9.0",
29
+ "swiped-events": "1.2.0"
30
+ },
31
+ "devDependencies": {
32
+ "@biomejs/biome": "2.4.13",
33
+ "@types/node": "^25.6.0",
34
+ "browserslist": "^4.28.2",
35
+ "browserslist-to-esbuild": "^2.1.1",
36
+ "edge.js": "^6.5.0",
37
+ "less": "^4.6.4",
38
+ "mathjs": "^15.2.0",
39
+ "sharp": "~0.34.5",
40
+ "sort-package-json": "^3.6.1",
41
+ "stylelint": "^17.9.0",
42
+ "stylelint-config-standard-less": "^4.1.0",
43
+ "stylelint-prettier": "^5.0.3",
44
+ "svgo": "^4.0.1",
45
+ "typescript": "~6.0.3",
46
+ "vite": "^8.0.10",
47
+ "vite-bundle-analyzer": "^1.3.7"
48
+ }
49
+ }
client/simple/src/brand/img_load_error.svg ADDED
client/simple/src/brand/searxng-wordmark.svg ADDED
client/simple/src/brand/searxng.svg ADDED
client/simple/src/js/Plugin.ts ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ /**
4
+ * Base class for client-side plugins.
5
+ *
6
+ * @remarks
7
+ * Handle conditional loading of the plugin in:
8
+ *
9
+ * - client/simple/src/js/router.ts
10
+ *
11
+ * @abstract
12
+ */
13
+ export abstract class Plugin {
14
+ /**
15
+ * Plugin name.
16
+ */
17
+ protected readonly id: string;
18
+
19
+ /**
20
+ * @remarks
21
+ * Don't hold references of this instance outside the class.
22
+ */
23
+ protected constructor(id: string) {
24
+ this.id = id;
25
+
26
+ queueMicrotask(() => this.invoke());
27
+ }
28
+
29
+ private async invoke(): Promise<void> {
30
+ try {
31
+ console.debug(`[PLUGIN] ${this.id}: Running...`);
32
+ const result = await this.run();
33
+ if (!result) return;
34
+
35
+ console.debug(`[PLUGIN] ${this.id}: Running post-exec...`);
36
+ // @ts-expect-error
37
+ void (await this.post(result as NonNullable<Awaited<ReturnType<this["run"]>>>));
38
+ } catch (error) {
39
+ console.error(`[PLUGIN] ${this.id}:`, error);
40
+ } finally {
41
+ console.debug(`[PLUGIN] ${this.id}: Done.`);
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Plugin goes here.
47
+ *
48
+ * @remarks
49
+ * The plugin is already loaded at this point. If you wish to execute
50
+ * conditions to exit early, consider moving the logic to:
51
+ *
52
+ * - client/simple/src/js/router.ts
53
+ *
54
+ * ...to avoid unnecessarily loading this plugin on the client.
55
+ */
56
+ protected abstract run(): Promise<unknown>;
57
+
58
+ /**
59
+ * Post-execution hook.
60
+ *
61
+ * @remarks
62
+ * The hook is only executed if `#run()` returns a truthy value.
63
+ */
64
+ // @ts-expect-error
65
+ protected abstract post(result: NonNullable<Awaited<ReturnType<this["run"]>>>): Promise<void>;
66
+ }
client/simple/src/js/index.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ // core
4
+ void import.meta.glob(["./*.ts", "./util/**/.ts"], { eager: true });
client/simple/src/js/loader.ts ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ import type { Plugin } from "./Plugin.ts";
4
+ import { type EndpointsKeys, endpoint } from "./toolkit.ts";
5
+
6
+ type Options =
7
+ | {
8
+ on: "global";
9
+ }
10
+ | {
11
+ on: "endpoint";
12
+ where: EndpointsKeys[];
13
+ };
14
+
15
+ export const load = <T extends Plugin>(instance: () => Promise<T>, options: Options): void => {
16
+ if (!check(options)) return;
17
+
18
+ void instance();
19
+ };
20
+
21
+ const check = (options: Options): boolean => {
22
+ // biome-ignore lint/style/useDefaultSwitchClause: options is typed
23
+ switch (options.on) {
24
+ case "global": {
25
+ return true;
26
+ }
27
+ case "endpoint": {
28
+ if (!options.where.includes(endpoint)) {
29
+ // not on the expected endpoint
30
+ return false;
31
+ }
32
+
33
+ return true;
34
+ }
35
+ }
36
+ };