Tor check

Back to top

A plugin to check if the ip address of the request is a Tor exit-node if the user searches for tor-check. It fetches the tor exit node list from url_exit_list and parses all the IPs into a list, then checks if the user’s IP address is in it.

searx.plugins.tor_check.url_exit_list = 'https://check.torproject.org/exit-addresses' : URL to load Tor exit list from.

class searx.plugins.tor_check.SXNGPlugin(plg_cfg: PluginCfg)[source] : Rewrite hostnames, remove results or prioritize them.

id: [str](https://docs.python.org/3/builtins/stdtypes.html#str) = 'tor\_check'
:   The ID (suffix) in the HTML form.

keywords: [list](https://docs.python.org/3/builtins/stdtypes.html#list)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] = ['tor-check', 'tor\_check', 'torcheck', 'tor', 'tor check']
:   Keywords in the search query that activate the plugin. The *keyword* is
    the first word in a search query. If a plugin should be executed regardless
    of the search query, the list of keywords should be empty (which is also the
    default in the base class for Plugins).

post\_search(*request: [SXNG\_Request](https://docs.searxng.org/dev/extended_types.html#searx.extended_types.SXNG_Request)*, *search: [SearchWithPlugins](https://docs.searxng.org/src/searx.search.html#searx.search.SearchWithPlugins)*) → [EngineResults](https://docs.searxng.org/dev/engines/index.html#searx.result_types.EngineResults)[[source]](https://docs.searxng.org/_modules/searx/plugins/tor_check.html#SXNGPlugin.post_search)
:   Runs AFTER the search request. Can return a list of
    [`Result`](https://docs.searxng.org/dev/result_types/base_result.html#searx.result_types._base.Result) objects to be added to the
    final result list.

Copyright © SearXNG team

Made with Furo

💾 🌐