deedy5 / duckduckgo_search

Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine. Downloading files and images to a local hard drive.
MIT License
927 stars 117 forks source link

Added verify parameter to AsyncDDGS and DDGS. #169

Closed mtulla closed 5 months ago

mtulla commented 5 months ago

The verify flag allows for sending HTTPS requests that are not verified. It's useful when using certain proxy servers.

It has the same behavior as the verify parameter in curl_cffi.requests.AsyncSession.

Because not verifying HTTPS requests can be dangerous, a warning message is displayed to the user if they set the flag to false.

mtulla commented 5 months ago

I tried using this library with ***, but they require SSL verification to be off. These changes allowed everything to work smoothly. I'm sure it will be helpful when working with other proxy services as well.

deedy5 commented 5 months ago

If verify = False, any TLS certificate presented by the server will be accepted. Host name mismatches and/or expired certificates will be ignored. This will lead to vulnerability to man-in-the-middle (MitM) attacks.

I don't think this functionality should be implemented.

DO NOT use proxy servers that require SSL validation to be disabled.