[PR #137] [MERGED] Add tor and http/socks proxy support #794

Closed
opened 2026-02-25 20:36:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/benbusby/whoogle-search/pull/137
Author: @benbusby
Created: 10/25/2020
Status: Merged
Merged: 10/29/2020
Merged by: @benbusby

Base: developHead: feature/proxy-support


📝 Commits (9)

  • bd1d236 Add tor and http/socks proxy support
  • d7442a1 Refactor acquire_tor_conn -> acquire_tor_identity
  • c51dad7 Add check for Tor socket on init, improve Tor error handling
  • ea88f4b Change send_tor_signal arg type, update function doc
  • 0f92d92 Fix tor identity logic in Request.send
  • 0573484 Update proxy init, change proxyloc var name
  • 66a98c6 Add tor/proxy support for Docker builds, fix opensearch/init
  • 282e879 Add missing "@" for socks proxy requests
  • ff846b3 Merge branch 'develop' into feature/proxy-support

📊 Changes

13 files changed (+228 additions, -31 deletions)

View changed files

📝 Dockerfile (+17 -2)
📝 README.md (+2 -1)
📝 app/__init__.py (+8 -2)
📝 app/models/config.py (+1 -0)
📝 app/request.py (+118 -8)
📝 app/routes.py (+37 -7)
📝 app/static/js/controller.js (+1 -1)
📝 app/templates/error.html (+1 -0)
📝 app/templates/index.html (+10 -0)
📝 app/templates/opensearch.xml (+2 -6)
📝 app/utils/routing_utils.py (+8 -2)
rc/torrc (+8 -0)
📝 requirements.txt (+15 -2)

📄 Description

Allows users to enable/disable tor from the config menu, which will forward all requests through Tor. Since Tor is notoriously unstable for Google searches, this also includes a recursive process of reacquiring a new Tor profile and reattempting the search up to a maximum of 10 attempts. Typically the 2nd or 3rd identity works though.

Also adds support for setting environment variables for alternative proxy support. Setting the following variables will forward requests through the proxy:

  • WHOOGLE_PROXY_USER (optional)
  • WHOOGLE_PROXY_PASS (optional)
  • WHOOGLE_PROXY_TYPE (required)
    • Can be "http", "socks4", or "socks5"
  • WHOOGLE_PROXY_LOC (required)
    • Format: <ip address>:<port>

Additionally, with an active Tor connection, there's a banner that will display if the connection was validated by check.torproject.org, like this:

image

Closes #30


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/benbusby/whoogle-search/pull/137 **Author:** [@benbusby](https://github.com/benbusby) **Created:** 10/25/2020 **Status:** ✅ Merged **Merged:** 10/29/2020 **Merged by:** [@benbusby](https://github.com/benbusby) **Base:** `develop` ← **Head:** `feature/proxy-support` --- ### 📝 Commits (9) - [`bd1d236`](https://github.com/benbusby/whoogle-search/commit/bd1d236923548f30733a54bdbb4fbe7a962b460e) Add tor and http/socks proxy support - [`d7442a1`](https://github.com/benbusby/whoogle-search/commit/d7442a18a5881fe041da93c149d74e901884b4bb) Refactor acquire_tor_conn -> acquire_tor_identity - [`c51dad7`](https://github.com/benbusby/whoogle-search/commit/c51dad752950c01c6e8dd2a3a918c4193e564389) Add check for Tor socket on init, improve Tor error handling - [`ea88f4b`](https://github.com/benbusby/whoogle-search/commit/ea88f4bd1d5278bd2e25279f6a0868d42c978be8) Change send_tor_signal arg type, update function doc - [`0f92d92`](https://github.com/benbusby/whoogle-search/commit/0f92d926042ab7b290d7154a3ad31d8e27dc296a) Fix tor identity logic in Request.send - [`0573484`](https://github.com/benbusby/whoogle-search/commit/0573484405a837e3550dd10ff43597f1b4e649ae) Update proxy init, change proxyloc var name - [`66a98c6`](https://github.com/benbusby/whoogle-search/commit/66a98c6659de680780dca547b5e6cd1702df8d87) Add tor/proxy support for Docker builds, fix opensearch/init - [`282e879`](https://github.com/benbusby/whoogle-search/commit/282e879f7e5a8fd1397134bcfbe39f1671a937b3) Add missing "@" for socks proxy requests - [`ff846b3`](https://github.com/benbusby/whoogle-search/commit/ff846b373c03ed27819e09abc60285e88f30bca0) Merge branch 'develop' into feature/proxy-support ### 📊 Changes **13 files changed** (+228 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+17 -2) 📝 `README.md` (+2 -1) 📝 `app/__init__.py` (+8 -2) 📝 `app/models/config.py` (+1 -0) 📝 `app/request.py` (+118 -8) 📝 `app/routes.py` (+37 -7) 📝 `app/static/js/controller.js` (+1 -1) 📝 `app/templates/error.html` (+1 -0) 📝 `app/templates/index.html` (+10 -0) 📝 `app/templates/opensearch.xml` (+2 -6) 📝 `app/utils/routing_utils.py` (+8 -2) ➕ `rc/torrc` (+8 -0) 📝 `requirements.txt` (+15 -2) </details> ### 📄 Description Allows users to enable/disable tor from the config menu, which will forward all requests through Tor. Since Tor is notoriously unstable for Google searches, this also includes a recursive process of reacquiring a new Tor profile and reattempting the search up to a maximum of **10** attempts. Typically the 2nd or 3rd identity works though. Also adds support for setting environment variables for alternative proxy support. Setting the following variables will forward requests through the proxy: - WHOOGLE_PROXY_USER (optional) - WHOOGLE_PROXY_PASS (optional) - WHOOGLE_PROXY_TYPE (required) - Can be "http", "socks4", or "socks5" - WHOOGLE_PROXY_LOC (required) - Format: `<ip address>:<port>` Additionally, with an active Tor connection, there's a banner that will display if the connection was validated by [check.torproject.org](https://check.torproject.org), like this: ![image](https://user-images.githubusercontent.com/33362396/97124782-db83f400-1707-11eb-8cb5-12cb22d39084.png) Closes #30 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 20:36:44 +03:00
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#794
No description provided.