<feed xmlns='http://www.w3.org/2005/Atom'>
<title>searxng/.git/tests/unit, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/'/>
<entry>
<title>[mod] client/simple: client plugins (#5406)</title>
<updated>2025-12-02T10:18:00+00:00</updated>
<author>
<name>Ivan Gabaldon</name>
<email>igabaldon@inetol.net</email>
</author>
<published>2025-12-02T10:18:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=fb089ae297b27f51777318e3a28bca8b172a4165'/>
<id>fb089ae297b27f51777318e3a28bca8b172a4165</id>
<content type='text'>
* [mod] client/simple: client plugins

Defines a new interface for client side *"plugins"* that coexist with server
side plugin system. Each plugin (e.g., `InfiniteScroll`) extends the base
`ts Plugin`. Client side plugins are independent and lazy‑loaded via `router.ts`
when their `load()` conditions are met. On each navigation request, all
applicable plugins are instanced.

Since these are client side plugins, we can only invoke them once DOM is fully
loaded. E.g. `Calculator` will not render a new `answer` block until fully
loaded and executed.

For some plugins, we might want to handle its availability in `settings.yml`
and toggle in UI, like we do for server side plugins. In that case, we extend
`py Plugin` instancing only the information and then checking client side if
[`settings.plugins`](https://github.com/inetol/searxng/blob/1ad832b1dc33f3f388da361ff2459b05dc86a164/client/simple/src/js/toolkit.ts#L134)
array has the plugin id.

* [mod] client/simple: rebuild static</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* [mod] client/simple: client plugins

Defines a new interface for client side *"plugins"* that coexist with server
side plugin system. Each plugin (e.g., `InfiniteScroll`) extends the base
`ts Plugin`. Client side plugins are independent and lazy‑loaded via `router.ts`
when their `load()` conditions are met. On each navigation request, all
applicable plugins are instanced.

Since these are client side plugins, we can only invoke them once DOM is fully
loaded. E.g. `Calculator` will not render a new `answer` block until fully
loaded and executed.

For some plugins, we might want to handle its availability in `settings.yml`
and toggle in UI, like we do for server side plugins. In that case, we extend
`py Plugin` instancing only the information and then checking client side if
[`settings.plugins`](https://github.com/inetol/searxng/blob/1ad832b1dc33f3f388da361ff2459b05dc86a164/client/simple/src/js/toolkit.ts#L134)
array has the plugin id.

* [mod] client/simple: rebuild static</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] replace js_variable_to_python by js_obj_str_to_python (#2792) (#5477)</title>
<updated>2025-11-25T11:51:08+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarIT.de</email>
</author>
<published>2025-11-25T11:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=54a97e10431c1cdae910d3b37074a63eda7100fc'/>
<id>54a97e10431c1cdae910d3b37074a63eda7100fc</id>
<content type='text'>
This patch is based on PR #2792 (old PR from 2023)

- js_obj_str_to_python handle more cases
- bring tests from chompjs ..
- comment out tests do not pass

The tests from chompjs give some overview of what is not implemented.

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is based on PR #2792 (old PR from 2023)

- js_obj_str_to_python handle more cases
- bring tests from chompjs ..
- comment out tests do not pass

The tests from chompjs give some overview of what is not implemented.

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[fix] engines initialization - if engine load fails, set to inactive</title>
<updated>2025-11-25T05:25:45+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-11-23T11:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=989b49335c54b23f274f0b969893a43de5b6c31c'/>
<id>989b49335c54b23f274f0b969893a43de5b6c31c</id>
<content type='text'>
- if engine load fails, set the engine to inactive
- dont' load a engine, when the config says its inactive

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- if engine load fails, set the engine to inactive
- dont' load a engine, when the config says its inactive

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] addition of various type hints / engine processors</title>
<updated>2025-09-18T17:40:03+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-09-11T17:10:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=8f8343dc0d78bb57215afc3e99fd9000fce6e0cf'/>
<id>8f8343dc0d78bb57215afc3e99fd9000fce6e0cf</id>
<content type='text'>
Continuation of #5147 .. typification of the engine processors.

BTW:

- removed obsolete engine property https_support
- fixed &amp; improved currency_convert
- engine instances can now implement a engine.setup method

[#5147] https://github.com/searxng/searxng/pull/5147

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Continuation of #5147 .. typification of the engine processors.

BTW:

- removed obsolete engine property https_support
- fixed &amp; improved currency_convert
- engine instances can now implement a engine.setup method

[#5147] https://github.com/searxng/searxng/pull/5147

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] drop: from __future__ import annotations</title>
<updated>2025-09-03T11:37:36+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-08-24T13:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=f24d85bc4be732b8edb2157ef4ecf35d380d2b45'/>
<id>f24d85bc4be732b8edb2157ef4ecf35d380d2b45</id>
<content type='text'>
Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] addition of various type hints / tbc</title>
<updated>2025-09-03T11:37:36+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-08-22T15:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=57b9673efb1b4fd18a3ac15e26da642201e2cd33'/>
<id>57b9673efb1b4fd18a3ac15e26da642201e2cd33</id>
<content type='text'>
- pyright configuration [1]_
- stub files: types-lxml [2]_
- addition of various type hints
- enable use of new type system features on older Python versions [3]_
- ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_:
  Older versions typically lack some typing features found in newer Python
  versions.  Therefore, for local type checking (before commit), it is necessary
  to use the older Python interpreter.

.. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/
.. [2] https://pypi.org/project/types-lxml/
.. [3] https://typing-extensions.readthedocs.io/en/latest/#
.. [4] https://mise.jdx.dev/configuration.html#tool-versions

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
Format: reST
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- pyright configuration [1]_
- stub files: types-lxml [2]_
- addition of various type hints
- enable use of new type system features on older Python versions [3]_
- ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_:
  Older versions typically lack some typing features found in newer Python
  versions.  Therefore, for local type checking (before commit), it is necessary
  to use the older Python interpreter.

.. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/
.. [2] https://pypi.org/project/types-lxml/
.. [3] https://typing-extensions.readthedocs.io/en/latest/#
.. [4] https://mise.jdx.dev/configuration.html#tool-versions

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
Format: reST
</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] typification of SearXNG: add new result type Code</title>
<updated>2025-09-01T12:51:15+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-08-21T15:57:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=9ac9c8c4f50acd801bfc39107c94d17ee9bee72b'/>
<id>9ac9c8c4f50acd801bfc39107c94d17ee9bee72b</id>
<content type='text'>
This patch adds a new result type: Code

- Python class:   searx/result_types/code.py
- Jinja template: searx/templates/simple/result_templates/code.html
- CSS (less)      client/simple/src/less/result_types/code.less

Signed-of-by: Markus Heiser &lt;markus.heiser@darmarIT.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a new result type: Code

- Python class:   searx/result_types/code.py
- Jinja template: searx/templates/simple/result_templates/code.html
- CSS (less)      client/simple/src/less/result_types/code.less

Signed-of-by: Markus Heiser &lt;markus.heiser@darmarIT.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[feat] engines: add GitHub Code Search engine (#5074)</title>
<updated>2025-08-20T05:35:31+00:00</updated>
<author>
<name>Filip Mikina</name>
<email>fm394471@students.mimuw.edu.pl</email>
</author>
<published>2025-08-20T05:35:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=6b57705e50875d9348c855700994395ce8a55b43'/>
<id>6b57705e50875d9348c855700994395ce8a55b43</id>
<content type='text'>
This patch adds GitHub Code Search [1] engine to allow querying the codebases.

Template code.html is changed to allow passthrough of strip and highlighting
options.

Engine Searchcode is adjusted to pass filename and not rely on hardcoded
extensions.

GitHub search code API does not return the exact code line indices, this
implementation assigns the code arbitrary numbers starting from 1
(effectively relabeling the code).

The API allows for unauth calls, and the default engine settings default to
that, although the calls are heavily rate limited.

The 'text' lexer is the default pygments lexer when parsing fails.

[1] https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-code

Co-authored-by: Markus Heiser &lt;markus.heiser@darmarIT.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds GitHub Code Search [1] engine to allow querying the codebases.

Template code.html is changed to allow passthrough of strip and highlighting
options.

Engine Searchcode is adjusted to pass filename and not rely on hardcoded
extensions.

GitHub search code API does not return the exact code line indices, this
implementation assigns the code arbitrary numbers starting from 1
(effectively relabeling the code).

The API allows for unauth calls, and the default engine settings default to
that, although the calls are heavily rate limited.

The 'text' lexer is the default pygments lexer when parsing fails.

[1] https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-code

Co-authored-by: Markus Heiser &lt;markus.heiser@darmarIT.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[fix] revision of utils.HTMLTextExtractor (#5125)</title>
<updated>2025-08-18T14:30:51+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarIT.de</email>
</author>
<published>2025-08-18T14:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=4fb6105d699e19321f6799d7fff05313fd4cd4b9'/>
<id>4fb6105d699e19321f6799d7fff05313fd4cd4b9</id>
<content type='text'>
Related:

- https://github.com/searxng/searxng/pull/5073#issuecomment-3196282632</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related:

- https://github.com/searxng/searxng/pull/5073#issuecomment-3196282632</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] limiter: trusted proxies (#4911)</title>
<updated>2025-08-09T21:03:30+00:00</updated>
<author>
<name>Ivan Gabaldon</name>
<email>igabaldon@inetol.net</email>
</author>
<published>2025-08-09T21:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=ce8929cabe27c7cf0bfb21b47786c7442ffb3712'/>
<id>ce8929cabe27c7cf0bfb21b47786c7442ffb3712</id>
<content type='text'>
Replaces `x_for` functionality with `trusted_proxies`. This allows defining
which IP / ranges to trust extracting the client IP address from X-Forwarded-For
and X-Real-IP headers.

We don't know if the proxy chain will give us the proper client
address (REMOTE_ADDR in the WSGI environment), so we rely on reading the headers
of the proxy before SearXNG (if there is one, in that case it must be added to
trusted_proxies) hoping it has done the proper checks. In case a proxy in the
chain does not check the client address correctly, integrity is compromised and
this should be fixed by whoever manages the proxy, not us.

Closes:

- https://github.com/searxng/searxng/issues/4940
- https://github.com/searxng/searxng/issues/4939
- https://github.com/searxng/searxng/issues/4907
- https://github.com/searxng/searxng/issues/3632
- https://github.com/searxng/searxng/issues/3191
- https://github.com/searxng/searxng/issues/1237

Related:

- https://github.com/searxng/searxng-docker/issues/386
- https://github.com/inetol-infrastructure/searxng-container/issues/81</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaces `x_for` functionality with `trusted_proxies`. This allows defining
which IP / ranges to trust extracting the client IP address from X-Forwarded-For
and X-Real-IP headers.

We don't know if the proxy chain will give us the proper client
address (REMOTE_ADDR in the WSGI environment), so we rely on reading the headers
of the proxy before SearXNG (if there is one, in that case it must be added to
trusted_proxies) hoping it has done the proper checks. In case a proxy in the
chain does not check the client address correctly, integrity is compromised and
this should be fixed by whoever manages the proxy, not us.

Closes:

- https://github.com/searxng/searxng/issues/4940
- https://github.com/searxng/searxng/issues/4939
- https://github.com/searxng/searxng/issues/4907
- https://github.com/searxng/searxng/issues/3632
- https://github.com/searxng/searxng/issues/3191
- https://github.com/searxng/searxng/issues/1237

Related:

- https://github.com/searxng/searxng-docker/issues/386
- https://github.com/inetol-infrastructure/searxng-container/issues/81</pre>
</div>
</content>
</entry>
</feed>
