[GH-ISSUE #30] HTTP, SOCKS proxy, Tor support #20

Closed
opened 2026-02-25 20:34:41 +03:00 by kerem · 2 comments
Owner

Originally created by @urlyb on GitHub (May 12, 2020).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/30

Hi,

first of all - great project!

Any chance to add a configurable HTTP, SOCKS proxy support for the requests made towards Google?

Something like this:

  if proxy:
            if proxy["type"] == "socks4":
                self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS4)
            elif proxy["type"] == "socks5":
                self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5)
            else:
                self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP)

            self.c.setopt(pycurl.PROXY, str(proxy["address"]))
            self.c.setopt(pycurl.PROXYPORT, proxy["port"])

            if proxy["username"]:
                self.c.setopt(
                    pycurl.PROXYUSERPWD,
                    "{0}:{1}".format(proxy["username"], proxy["password"])
                )

This way the search could be even more private.

Thanks!

Originally created by @urlyb on GitHub (May 12, 2020). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/30 Hi, first of all - great project! Any chance to add a configurable HTTP, SOCKS proxy support for the requests made towards Google? Something like this: ``` if proxy: if proxy["type"] == "socks4": self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS4) elif proxy["type"] == "socks5": self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5) else: self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP) self.c.setopt(pycurl.PROXY, str(proxy["address"])) self.c.setopt(pycurl.PROXYPORT, proxy["port"]) if proxy["username"]: self.c.setopt( pycurl.PROXYUSERPWD, "{0}:{1}".format(proxy["username"], proxy["password"]) ) ``` This way the search could be even more private. Thanks!
kerem 2026-02-25 20:34:41 +03:00
Author
Owner

@benbusby commented on GitHub (May 12, 2020):

Thanks! Yeah that's definitely going to be a feature, likely to be implemented at the same time as (or shortly after) #24.

<!-- gh-comment-id:627440886 --> @benbusby commented on GitHub (May 12, 2020): Thanks! Yeah that's definitely going to be a feature, likely to be implemented at the same time as (or shortly after) #24.
Author
Owner

@benbusby commented on GitHub (May 13, 2020):

Actually going to merge #24 with this one. It seems like there will be a fair amount of overlap between the two.

Tor implementation:

crl.setopt(crl.PROXY, "0.0.0.0")
crl.setopt(crl.PROXYPORT, 9050)
crl.setopt(crl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5)
<!-- gh-comment-id:628185962 --> @benbusby commented on GitHub (May 13, 2020): Actually going to merge #24 with this one. It seems like there will be a fair amount of overlap between the two. Tor implementation: ```python crl.setopt(crl.PROXY, "0.0.0.0") crl.setopt(crl.PROXYPORT, 9050) crl.setopt(crl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#20
No description provided.