fix: route Teams send() through SOCKS5 proxy
Teams send() used urllib.request.urlopen directly, bypassing the SOCKS5 proxy. Replace with derp.http.urlopen to match all other outbound HTTP.
This commit is contained in:
@@ -14,6 +14,7 @@ import urllib.request
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
|
||||
from derp import http
|
||||
from derp.bot import _TokenBucket
|
||||
from derp.plugin import TIERS, PluginRegistry
|
||||
from derp.state import StateStore
|
||||
@@ -389,7 +390,7 @@ class TeamsBot:
|
||||
)
|
||||
loop = asyncio.get_running_loop()
|
||||
try:
|
||||
await loop.run_in_executor(None, urllib.request.urlopen, req)
|
||||
await loop.run_in_executor(None, http.urlopen, req)
|
||||
except Exception:
|
||||
log.exception("teams: failed to send via incoming webhook")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user