xmpp-logging-proxy is an XMPP intermediary (aka XMPP MITM) that acts like a server to clients, proxies communication to another XMPP server, and logs everything in plain text, even after STARTTLS negotiation.
Install: go get github.com/orivej/xmpp-logging-proxy
Given a client with JID login@server
, XMPP server at server.host
and proxy at proxy.host
, you may either:
- Make client connect to
proxy.host
instead ofserver.host
(via client options,/etc/hosts
, or DNS). Run proxy asxmpp-logging-proxy -server target.server:5222
. - Make client use JID
login@proxy.host
, and letxmpp-logging-proxy
replaceproxy.host
withserver
in outgoing traffic and replaceserver
withproxy.host
in incoming traffic. Run proxy asxmpp-logging-proxy -server target.server:5222 -replace-local proxy.host -replace-remote server
. The proxy will log the traffic from the perspective of the server (proxy.host
will not occur in the log).