mirror of
https://github.com/searxng/searxng.git
synced 2025-05-24 01:12:56 -04:00
202 lines
15 KiB
HTML
202 lines
15 KiB
HTML
<!DOCTYPE html>
|
||
|
||
<html lang="en" data-content_root="../../">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Tor check — SearXNG Documentation (2025.5.23+230215c25)</title>
|
||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=6625fa76" />
|
||
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
|
||
<script src="../../_static/documentation_options.js?v=f3617853"></script>
|
||
<script src="../../_static/doctools.js?v=9a2dae69"></script>
|
||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<script data-project="searxng" data-version="2025.5.23+230215c25" src="../../_static/describe_version.js?v=fa7f30d0"></script>
|
||
<link rel="index" title="Index" href="../../genindex.html" />
|
||
<link rel="search" title="Search" href="../../search.html" />
|
||
<link rel="next" title="Unit Converter" href="unit_converter.html" />
|
||
<link rel="prev" title="Self-Info" href="self_info.html" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="Related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="unit_converter.html" title="Unit Converter"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="self_info.html" title="Self-Info"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.5.23+230215c25)</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="index.html" >Plugins</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="builtins.html" accesskey="U">Built-in Plugins</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Tor check</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<section id="module-searx.plugins.tor_check">
|
||
<span id="tor-check"></span><span id="tor-check-plugin"></span><h1>Tor check<a class="headerlink" href="#module-searx.plugins.tor_check" title="Link to this heading">¶</a></h1>
|
||
<p>A plugin to check if the ip address of the request is a Tor exit-node if the
|
||
user searches for <code class="docutils literal notranslate"><span class="pre">tor-check</span></code>. It fetches the tor exit node list from
|
||
<a class="reference internal" href="#searx.plugins.tor_check.url_exit_list" title="searx.plugins.tor_check.url_exit_list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">url_exit_list</span></code></a> and parses all the IPs into a list, then checks if the
|
||
user’s IP address is in it.</p>
|
||
<dl class="py data">
|
||
<dt class="sig sig-object py" id="searx.plugins.tor_check.url_exit_list">
|
||
<span class="sig-prename descclassname"><span class="pre">searx.plugins.tor_check.</span></span><span class="sig-name descname"><span class="pre">url_exit_list</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://check.torproject.org/exit-addresses'</span></em><a class="headerlink" href="#searx.plugins.tor_check.url_exit_list" title="Link to this definition">¶</a></dt>
|
||
<dd><p>URL to load Tor exit list from.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="searx.plugins.tor_check.SXNGPlugin">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.plugins.tor_check.</span></span><span class="sig-name descname"><span class="pre">SXNGPlugin</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">plg_cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="development.html#searx.plugins.PluginCfg" title="searx.plugins.PluginCfg"><span class="pre">PluginCfg</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/plugins/tor_check.html#SXNGPlugin"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.plugins.tor_check.SXNGPlugin" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Rewrite hostnames, remove results or prioritize them.</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="searx.plugins.tor_check.SXNGPlugin.id">
|
||
<span class="sig-name descname"><span class="pre">id</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'tor_check'</span></em><a class="headerlink" href="#searx.plugins.tor_check.SXNGPlugin.id" title="Link to this definition">¶</a></dt>
|
||
<dd><p>The ID (suffix) in the HTML form.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="searx.plugins.tor_check.SXNGPlugin.keywords">
|
||
<span class="sig-name descname"><span class="pre">keywords</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['tor-check',</span> <span class="pre">'tor_check',</span> <span class="pre">'torcheck',</span> <span class="pre">'tor',</span> <span class="pre">'tor</span> <span class="pre">check']</span></em><a class="headerlink" href="#searx.plugins.tor_check.SXNGPlugin.keywords" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Keywords in the search query that activate the plugin. The <em>keyword</em> 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).</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="searx.plugins.tor_check.SXNGPlugin.post_search">
|
||
<span class="sig-name descname"><span class="pre">post_search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../extended_types.html#searx.extended_types.SXNG_Request" title="searx.extended_types.SXNG_Request"><span class="pre">SXNG_Request</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">search</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../../src/searx.search.html#searx.search.SearchWithPlugins" title="searx.search.SearchWithPlugins"><span class="pre">SearchWithPlugins</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="../engines/index.html#searx.result_types.EngineResults" title="searx.result_types.EngineResults"><span class="pre">EngineResults</span></a></span></span><a class="reference internal" href="../../_modules/searx/plugins/tor_check.html#SXNGPlugin.post_search"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.plugins.tor_check.SXNGPlugin.post_search" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Runs AFTER the search request. Can return a list of
|
||
<a class="reference internal" href="../result_types/base_result.html#searx.result_types._base.Result" title="searx.result_types._base.Result"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Result</span></code></a> objects to be added to the
|
||
final result list.</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</section>
|
||
|
||
|
||
<div class="clearer"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<span id="sidebar-top"></span>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||
<div class="sphinxsidebarwrapper">
|
||
|
||
|
||
<p class="logo"><a href="../../index.html">
|
||
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/>
|
||
</a></p>
|
||
|
||
|
||
<h3><a href="../../index.html">Table of Contents</a></h3>
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../commits.html">Git Commits & Change Management</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extended_types.html">Extended Types</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../engines/index.html">Engine Implementations</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../result_types/index.html">Result Types</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../templates.html">Simple Theme Templates</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
|
||
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Plugins</a><ul class="current">
|
||
<li class="toctree-l3"><a class="reference internal" href="development.html">Plugin Development</a></li>
|
||
<li class="toctree-l3 current"><a class="reference internal" href="builtins.html">Built-in Plugins</a><ul class="current">
|
||
<li class="toctree-l4"><a class="reference internal" href="calculator.html">Calculator</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="hash_plugin.html">Hash Values</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="hostnames.html">Hostnames</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="self_info.html">Self-Info</a></li>
|
||
<li class="toctree-l4 current"><a class="current reference internal" href="#">Tor check</a><ul>
|
||
<li class="toctree-l5"><a class="reference internal" href="#searx.plugins.tor_check.url_exit_list"><code class="docutils literal notranslate"><span class="pre">url_exit_list</span></code></a></li>
|
||
<li class="toctree-l5"><a class="reference internal" href="#searx.plugins.tor_check.SXNGPlugin"><code class="docutils literal notranslate"><span class="pre">SXNGPlugin</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l4"><a class="reference internal" href="unit_converter.html">Unit Converter</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../answerers/index.html">Answerers</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
|
||
</ul>
|
||
|
||
<h3>Project Links</h3>
|
||
<ul>
|
||
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
|
||
|
||
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
|
||
|
||
<li><a href="https://searx.space">Public instances</a>
|
||
|
||
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
|
||
</ul><h3>Navigation</h3>
|
||
<ul>
|
||
<li><a href="../../index.html">Overview</a>
|
||
<ul>
|
||
<li><a href="../index.html">Developer documentation</a>
|
||
<ul>
|
||
<li><a href="index.html">Plugins</a>
|
||
<ul>
|
||
<li><a href="builtins.html">Built-in Plugins</a>
|
||
<ul>
|
||
<li>Previous: <a href="self_info.html" title="previous chapter">Self-Info</a>
|
||
<li>Next: <a href="unit_converter.html" title="next chapter">Unit Converter</a></ul>
|
||
</li></ul>
|
||
</li></ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<search id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</search>
|
||
<script>document.getElementById('searchbox').style.display = "block"</script>
|
||
<div role="note" aria-label="source link">
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="../../_sources/dev/plugins/tor_check.rst.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright SearXNG team.
|
||
</div>
|
||
</body>
|
||
</html> |