Skip to content

XMPP MITM Setup Guide


XMPP MITM Setup Guide (Updated)

Danger

The socket does not provide any automatic parsing — it only returns raw XMPP data as intended by Valorant. You must handle parsing yourself.

Danger

This setup uses MITM (Man-In-The-Middle) techniques. Close all Riot services before running. If your software shuts down before Riot, chat services will remain offline until you restart all Riot clients.


Overview

This guide explains how to set up ValXMPP for intercepting and interacting with Valorant’s XMPP chat system. We now support additional event hooks and clearer separation between:

  • Proxy events → Raw network-level in/out traffic.
  • Chat server events → Raw XMPP client/server messages.

Step 1: Kill Riot Processes

Before initializing anything, you must stop all Riot processes.

C#
1
2
ValXMPP.KillRiot();
Thread.Sleep(2000); // Ensure Riot has fully closed.

Step 2: Initialize ValXMPP

Create and prepare the XMPP handler instance.

C#
1
ValXMPP xmpp = new();

Step 3: Establish Connection

Start the underlying socket and connect to Riot services.

C#
1
xmpp.InitializeConnection();

Step 4: Subscribe to Events

Here’s the breakdown of the available events:


🔶 Network Proxy Events (Raw traffic)

These capture low-level traffic going through the proxy — useful for debugging, doesn't offer much information for clients, but is still offered.

C#
1
2
3
4
5
xmpp.OnInboundMessage += (message) => 
    Debug.WriteLine($"[Proxy] InboundMessage: {message}");

xmpp.OnOutboundMessage += (message) => 
    Debug.WriteLine($"[Proxy] OutboundMessage: {message}");

🔶 Chat Server Events (Parsed XMPP messages)

These fire when the actual chat/xmpp server processes data:

C#
1
2
3
4
5
xmpp.OnClientMessage += (message) => 
    Debug.WriteLine($"[Chat] Client Message: {message}");

xmpp.OnServerMessage += (message) => 
    Debug.WriteLine($"[Chat] Server Message: {message}");

🔶 Presence Update Events

Presence updates come in two forms:

C#
1
2
3
4
5
6
7
// PlayerPresence — general player state
xmpp.OnPlayerPresenceUpdated += (presence) => 
    Debug.WriteLine($"Player Presence Updated: {JsonSerializer.Serialize(presence)}");

// ValorantPresence — Valorant-specific presence details
xmpp.OnValorantPresenceUpdated += (presence) => 
    Debug.WriteLine($"Valorant Presence Updated: {JsonSerializer.Serialize(presence)}");

Final Example

Putting it all together:

C#
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ValXMPP.KillRiot();

Thread.Sleep(2000);

ValXMPP xmpp = new();

xmpp.OnClientMessage += (message) => 
    Debug.WriteLine($"[Chat] Client Message: {message}");

xmpp.OnServerMessage += (message) => 
    Debug.WriteLine($"[Chat] Server Message: {message}");

xmpp.OnInboundMessage += (message) => 
    Debug.WriteLine($"[Proxy] InboundMessage: {message}");

xmpp.OnOutboundMessage += (message) => 
    Debug.WriteLine($"[Proxy] OutboundMessage: {message}");

xmpp.OnPlayerPresenceUpdated += (presence) => 
    Debug.WriteLine($"Player Presence Updated: {JsonSerializer.Serialize(presence)}");

xmpp.OnValorantPresenceUpdated += (presence) => 
    Debug.WriteLine($"Valorant Presence Updated: {JsonSerializer.Serialize(presence)}");

xmpp.InitializeConnection();

Notes

OnClientMessage / OnServerMessage → Use these for handling raw chat and XMPP connections. ✅ OnInboundMessage / OnOutboundMessage → Use these for observing raw proxy traffic, including non-chat data. ✅ Presence Events → Provide structured objects for player and game status updates.