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.hostinstead 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-proxyreplaceproxy.hostwithserverin outgoing traffic and replaceserverwithproxy.hostin 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.hostwill not occur in the log).