settings_outgoing.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. .. _settings outgoing:
  2. =============
  3. ``outgoing:``
  4. =============
  5. Communication with search engines.
  6. .. code:: yaml
  7. outgoing:
  8. request_timeout: 2.0 # default timeout in seconds, can be override by engine
  9. max_request_timeout: 10.0 # the maximum timeout in seconds
  10. useragent_suffix: "" # information like an email address to the administrator
  11. pool_connections: 100 # Maximum number of allowable connections, or null
  12. # for no limits. The default is 100.
  13. pool_maxsize: 10 # Number of allowable keep-alive connections, or null
  14. # to always allow. The default is 10.
  15. enable_http2: true # See https://www.python-httpx.org/http2/
  16. # uncomment below section if you want to use a custom server certificate
  17. # see https://www.python-httpx.org/advanced/#changing-the-verification-defaults
  18. # and https://www.python-httpx.org/compatibility/#ssl-configuration
  19. # verify: ~/.mitmproxy/mitmproxy-ca-cert.cer
  20. #
  21. # uncomment below section if you want to use a proxyq see: SOCKS proxies
  22. # https://2.python-requests.org/en/latest/user/advanced/#proxies
  23. # are also supported: see
  24. # https://2.python-requests.org/en/latest/user/advanced/#socks
  25. #
  26. # proxies:
  27. # all://:
  28. # - http://proxy1:8080
  29. # - http://proxy2:8080
  30. #
  31. # using_tor_proxy: true
  32. #
  33. # Extra seconds to add in order to account for the time taken by the proxy
  34. #
  35. # extra_proxy_timeout: 10.0
  36. #
  37. ``request_timeout`` :
  38. Global timeout of the requests made to others engines in seconds. A bigger
  39. timeout will allow to wait for answers from slow engines, but in consequence
  40. will slow SearXNG reactivity (the result page may take the time specified in the
  41. timeout to load). Can be override by ``timeout`` in the :ref:`settings engine`.
  42. ``useragent_suffix`` :
  43. Suffix to the user-agent SearXNG uses to send requests to others engines. If an
  44. engine wish to block you, a contact info here may be useful to avoid that.
  45. .. _Pool limit configuration: https://www.python-httpx.org/advanced/#pool-limit-configuration
  46. ``pool_maxsize``:
  47. Number of allowable keep-alive connections, or ``null`` to always allow. The
  48. default is 10. See ``max_keepalive_connections`` `Pool limit configuration`_.
  49. ``pool_connections`` :
  50. Maximum number of allowable connections, or ``null`` # for no limits. The
  51. default is 100. See ``max_connections`` `Pool limit configuration`_.
  52. ``keepalive_expiry`` :
  53. Number of seconds to keep a connection in the pool. By default 5.0 seconds.
  54. See ``keepalive_expiry`` `Pool limit configuration`_.
  55. .. _httpx proxies: https://www.python-httpx.org/advanced/#http-proxying
  56. ``proxies`` :
  57. Define one or more proxies you wish to use, see `httpx proxies`_.
  58. If there are more than one proxy for one protocol (http, https),
  59. requests to the engines are distributed in a round-robin fashion.
  60. ``source_ips`` :
  61. If you use multiple network interfaces, define from which IP the requests must
  62. be made. Example:
  63. * ``0.0.0.0`` any local IPv4 address.
  64. * ``::`` any local IPv6 address.
  65. * ``192.168.0.1``
  66. * ``[ 192.168.0.1, 192.168.0.2 ]`` these two specific IP addresses
  67. * ``fe80::60a2:1691:e5a2:ee1f``
  68. * ``fe80::60a2:1691:e5a2:ee1f/126`` all IP addresses in this network.
  69. * ``[ 192.168.0.1, fe80::/126 ]``
  70. ``retries`` :
  71. Number of retry in case of an HTTP error. On each retry, SearXNG uses an
  72. different proxy and source ip.
  73. ``enable_http2`` :
  74. Enable by default. Set to ``false`` to disable HTTP/2.
  75. .. _httpx verification defaults: https://www.python-httpx.org/advanced/#changing-the-verification-defaults
  76. .. _httpx ssl configuration: https://www.python-httpx.org/compatibility/#ssl-configuration
  77. ``verify``: : ``$SSL_CERT_FILE``, ``$SSL_CERT_DIR``
  78. Allow to specify a path to certificate.
  79. see `httpx verification defaults`_.
  80. In addition to ``verify``, SearXNG supports the ``$SSL_CERT_FILE`` (for a file) and
  81. ``$SSL_CERT_DIR`` (for a directory) OpenSSL variables.
  82. see `httpx ssl configuration`_.
  83. ``max_redirects`` :
  84. 30 by default. Maximum redirect before it is an error.
  85. ``using_tor_proxy`` :
  86. Using tor proxy (``true``) or not (``false``) for all engines. The default is
  87. ``false`` and can be overwritten in the :ref:`settings engine`