Round-6 review on #150958, two findings:
- Disagreeing proxy env vars still leak: Hermes redacted against the first
HTTPS_PROXY/HTTP_PROXY/ALL_PROXY value, but urllib/requests prefer
lowercase, httpx mounts every scheme and websockets reads ws/wss/socks, so
a secret in a variable Hermes did not pick was echoed ("Invalid port:
'<pw>'", "bob:<pw>@host isn't a valid proxy").
- Over-redaction: a secret proxy with NO_PROXY=* or NO_PROXY naming the
target (or ALL_PROXY only) replaced the real error (Weixin errcode, LINE
401, ntfy DNS, SimpleX connect refused) with "<Type> via host".
One helper, gateway.platforms.base_log_safety.env_proxy_for_redaction(
*target_urls), now makes that decision for all 12 senders that redact a
library-read env proxy (Feishu, Google Chat incl. httplib2, Teams, Weixin,
LINE, WeCom, DingTalk, ntfy, SimpleX, Signal, QQBot, BlueBubbles), each with
its real target hosts:
- NO_PROXY bypasses every target -> None: the request went direct and the
real text is kept. Only the rule every library shares counts (``*``, an
entry equal to the host, a ``.suffix`` the host is a subdomain of); with an
unparseable proxy value only ``*`` counts, because httpx parses every
proxy variable when the client is built, before NO_PROXY is consulted.
- Otherwise every *_proxy value of any case/scheme is scanned and the first
one rendering cannot show in full is returned (redact); a clean value is
returned only when all are clean (full text kept).
Accepted trade-off: an ALL_PROXY-only secret redacts an error from a library
that ignores ALL_PROXY (aiohttp, websockets ws://) to type-only text.
resolve_proxy_url keeps choosing the transport proxy unchanged.