answer-captcha.rst 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ===============================
  2. Answer CAPTCHA from server's IP
  3. ===============================
  4. With a SSH tunnel we can send requests from server's IP and solve a CAPTCHA that
  5. blocks requests from this IP. If your SearXNG instance is hosted at
  6. ``example.org`` and your login is ``user`` you can setup a proxy simply by
  7. :man:`ssh`:
  8. .. code:: bash
  9. # SOCKS server: socks://127.0.0.1:8080
  10. $ ssh -q -N -D 8080 user@example.org
  11. The ``socks://localhost:8080`` from above can be tested by:
  12. .. tabs::
  13. .. group-tab:: server's IP
  14. .. code:: bash
  15. $ curl -x socks://127.0.0.1:8080 http://ipecho.net/plain
  16. n.n.n.n
  17. .. group-tab:: desktop's IP
  18. .. code:: bash
  19. $ curl http://ipecho.net/plain
  20. x.x.x.x
  21. In the settings of the WEB browser open the *"Network Settings"* and setup a
  22. proxy on ``SOCKS5 127.0.0.1:8080`` (see screenshot below). In the WEB browser
  23. check the IP from the server is used:
  24. - http://ipecho.net/plain
  25. Now open the search engine that blocks requests from your server's IP. If you
  26. have `issues with the qwant engine
  27. <https://github.com/searxng/searxng/issues/2011#issuecomment-1553317619>`__,
  28. solve the CAPTCHA from `qwant.com <https://www.qwant.com/>`__.
  29. -----
  30. .. tabs::
  31. .. group-tab:: Firefox
  32. .. kernel-figure:: answer-captcha/ffox-setting-proxy-socks.png
  33. :alt: FFox proxy on SOCKS5, 127.0.0.1:8080
  34. Firefox's network settings
  35. .. admonition:: :man:`ssh` manual:
  36. -D [bind_address:]port
  37. Specifies a local “dynamic” application-level port forwarding. This works
  38. by allocating a socket to listen to port on the local side .. Whenever a
  39. connection is made to this port, the connection is forwarded over the
  40. secure channel, and the application protocol is then used to determine
  41. where to connect to from the remote machine .. ssh will act as a SOCKS
  42. server ..
  43. -N
  44. Do not execute a remote command. This is useful for just forwarding ports.