fix: route searx and alert SearXNG traffic through SOCKS5 proxy
Both plugins called urllib.request.urlopen directly, bypassing the proxy. Switch to derp.http.urlopen and update the SearXNG endpoint to the public domain (searx.mymx.me). Update test mocks to match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ _YT_SEARCH_URL = "https://www.youtube.com/youtubei/v1/search"
|
||||
_YT_CLIENT_VERSION = "2.20250101.00.00"
|
||||
_GQL_URL = "https://gql.twitch.tv/gql"
|
||||
_GQL_CLIENT_ID = "kimne78kx3ncx6brgo4mv6wki5h1ko"
|
||||
_SEARX_URL = "http://192.168.122.119:3000/search"
|
||||
_SEARX_URL = "https://searx.mymx.me/search"
|
||||
|
||||
# -- Module-level tracking ---------------------------------------------------
|
||||
|
||||
@@ -202,7 +202,7 @@ def _search_searx(keyword: str) -> list[dict]:
|
||||
url = f"{_SEARX_URL}?{params}"
|
||||
|
||||
req = urllib.request.Request(url, method="GET")
|
||||
resp = urllib.request.urlopen(req, timeout=_FETCH_TIMEOUT)
|
||||
resp = _urlopen(req, timeout=_FETCH_TIMEOUT)
|
||||
raw = resp.read()
|
||||
resp.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user