[GH-ISSUE #1138] [BUG] socks5 proxy config gives Internal server error 500 #692

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

Originally created by @dave0003 on GitHub (Apr 18, 2024).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/1138

Describe the bug
When configured to use a socks5 proxy, the result is an "Internal server error (500)".

To Reproduce
Steps to reproduce the behavior:

  1. Start whoogle-search with options "--proxytype socks5 --proxyloc 127.0.0.1:8310" where there is a local socks5 proxy server running at 127.0.0.1 port 8310.
  2. Perform search.
  3. Receive Internal server error (500)

Deployment Method

  • pip/pipx

Version of Whoogle Search

  • Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc)

Desktop (please complete the following information):

  • OS: Debian Bookworm
  • Browser Chromium
  • Version 123.0.6312.122

Additional context
whoogle-search is using nginx as a reverse proxy. Other startup parameters:
whoogle-search --port 6000 --host 127.0.0.1 --https-only

I've tried with and without --https-only (makes no difference to the error).
I've tried with --debug but it doesn't give any helpful clue, just a POST for the search and a GET with status 500.

Originally created by @dave0003 on GitHub (Apr 18, 2024). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/1138 **Describe the bug** When configured to use a socks5 proxy, the result is an "Internal server error (500)". **To Reproduce** Steps to reproduce the behavior: 1. Start whoogle-search with options "--proxytype socks5 --proxyloc 127.0.0.1:8310" where there is a local socks5 proxy server running at 127.0.0.1 port 8310. 2. Perform search. 3. Receive Internal server error (500) **Deployment Method** - [X] pip/pipx **Version of Whoogle Search** - [X] Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc) **Desktop (please complete the following information):** - OS: Debian Bookworm - Browser Chromium - Version 123.0.6312.122 **Additional context** whoogle-search is using nginx as a reverse proxy. Other startup parameters: whoogle-search --port 6000 --host 127.0.0.1 --https-only I've tried with and without --https-only (makes no difference to the error). I've tried with --debug but it doesn't give any helpful clue, just a POST for the search and a GET with status 500.
kerem 2026-02-25 20:36:19 +03:00
  • closed this issue
  • added the
    bug
    Stale
    labels
Author
Owner

@dave0003 commented on GitHub (Apr 18, 2024):

I looked into this some more, and it appears that without manually installing PySocks, the socks5 proxy won't work. I had originally installed whoogle-search with pipx, and there's no way to manually install PySocks through pipx.

After setting up a virtual environment and manually installing whoogle-search and PySocks, I was able to get it to work.

I see a lot of requirements in requirements.txt (including PySocks) that don't get installed automatically as a dependency. It still seems to work without those, though (as far as I can tell), except in the case of PySocks.

<!-- gh-comment-id:2063253111 --> @dave0003 commented on GitHub (Apr 18, 2024): I looked into this some more, and it appears that without manually installing PySocks, the socks5 proxy won't work. I had originally installed whoogle-search with pipx, and there's no way to manually install PySocks through pipx. After setting up a virtual environment and manually installing whoogle-search and PySocks, I was able to get it to work. I see a lot of requirements in requirements.txt (including PySocks) that don't get installed automatically as a dependency. It still seems to work without those, though (as far as I can tell), except in the case of PySocks.
Author
Owner

@dave0003 commented on GitHub (Apr 18, 2024):

Also, in case anybody is trying to get socks5 to work, there's 2 different socks5 settings for WHOOGLE_PROXY_TYPE:

socks5
socks5h

socks5 is similar to "curl --socks5" and socks5h is similar to "curl --socks5-hostname".

socks5 = Local DNS resolution
socks5h = Remote DNS resolution

This is important sometimes, for example, if the remote proxy is IPv4 only and the DNS resolution is local, it may lookup an IPv6 for google and fail.

<!-- gh-comment-id:2063267073 --> @dave0003 commented on GitHub (Apr 18, 2024): Also, in case anybody is trying to get socks5 to work, there's 2 different socks5 settings for WHOOGLE_PROXY_TYPE: socks5 socks5h socks5 is similar to "curl --socks5" and socks5h is similar to "curl --socks5-hostname". socks5 = Local DNS resolution socks5h = Remote DNS resolution This is important sometimes, for example, if the remote proxy is IPv4 only and the DNS resolution is local, it may lookup an IPv6 for google and fail.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 15, 2025):

This issue has been automatically marked as stale due to inactivity. If it is still valid please comment within 7 days or it will be auto-closed.

<!-- gh-comment-id:3291516848 --> @github-actions[bot] commented on GitHub (Sep 15, 2025): This issue has been automatically marked as stale due to inactivity. If it is still valid please comment within 7 days or it will be auto-closed.
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#692
No description provided.