.oO SearXNG Developer Documentation Oo.
|
Functions | |
Tuple[bool, str] | pass_ip (IPv4Address|IPv6Address real_ip, config.Config cfg) |
Tuple[bool, str] | block_ip (IPv4Address|IPv6Address real_ip, config.Config cfg) |
Tuple[bool, str] | ip_is_subnet_of_member_in_list (IPv4Address|IPv6Address real_ip, str list_name, config.Config cfg) |
Variables | |
logger = logger.getChild('ip_limit') | |
list | SEARXNG_ORG |
.. _botdetection.ip_lists: Method ``ip_lists`` ------------------- The ``ip_lists`` method implements IP :py:obj:`block- <block_ip>` and :py:obj:`pass-lists <pass_ip>`. .. code:: toml [botdetection.ip_lists] pass_ip = [ '167.235.158.251', # IPv4 of check.searx.space '192.168.0.0/16', # IPv4 private network 'fe80::/10' # IPv6 linklocal ] block_ip = [ '93.184.216.34', # IPv4 of example.org '257.1.1.1', # invalid IP --> will be ignored, logged in ERROR class ]
Tuple[bool, str] searx.botdetection.ip_lists.block_ip | ( | IPv4Address | IPv6Address | real_ip, |
config.Config | cfg ) |
Checks if the IP on the subnet is in one of the members of the ``botdetection.ip_lists.block_ip`` list.
Definition at line 61 of file ip_lists.py.
References searx.botdetection.ip_lists.ip_is_subnet_of_member_in_list().
Tuple[bool, str] searx.botdetection.ip_lists.ip_is_subnet_of_member_in_list | ( | IPv4Address | IPv6Address | real_ip, |
str | list_name, | ||
config.Config | cfg ) |
Definition at line 72 of file ip_lists.py.
Referenced by searx.botdetection.ip_lists.block_ip(), and searx.botdetection.ip_lists.pass_ip().
Tuple[bool, str] searx.botdetection.ip_lists.pass_ip | ( | IPv4Address | IPv6Address | real_ip, |
config.Config | cfg ) |
Checks if the IP on the subnet is in one of the members of the ``botdetection.ip_lists.pass_ip`` list.
Definition at line 48 of file ip_lists.py.
References searx.botdetection.ip_lists.ip_is_subnet_of_member_in_list().
searx.botdetection.ip_lists.logger = logger.getChild('ip_limit') |
Definition at line 38 of file ip_lists.py.
list searx.botdetection.ip_lists.SEARXNG_ORG |
Definition at line 40 of file ip_lists.py.