mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-08-14 11:31:01 +00:00
* agent: report PRXY broker errors as proxy-to-relay errors
The proxy returns PROXY BROKER errors only when it fails to connect to the
destination relay, but for PRXY they were mapped to SMP <proxy> (PROXY ...),
losing the relay address, so the clients reported them as errors of the
connection to the forwarding server. Map them to PROXY {proxyServer,
relayServer, ...}, the same shape PFWD errors already use.
* Apply suggestion from @epoberezkin
* agent: keep ProxyProtocolError for PRXY broker errors
Reverts 826a2377.
ProxyResponseError wraps PCEResponseError, a response that failed to
parse, and both clients match protocolError when rendering this error,
so the connect alert falls through to the raw error dump - and released
clients cannot render it at all. temporaryAgentError and serverHostError
also match ProxyProtocolError only, so the failure stops being retried
and proxy fallback no longer engages.
---------
Co-authored-by: Evgeny <evgeny@poberezkin.com>