2.0.3 • Published 20 days ago

insomnia-plugin-valorant v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
20 days ago

Valorant Insomnia Plugin

Adds template tags to Insomnia with Valorant data.

Features

  • Automatic regeneration of entitlement and token
  • Automatic population of live local data such as current game id and lockfile port/password
  • Dynamically created XMPP WebSockets for logging XMPP traffic

Screenshot showing XMPP MITM WebSocket Screenshot showing lockfile tags Screenshot with sign in screen

Use crtl+space to insert tags. For more info, see https://support.insomnia.rest/article/171-template-tags

Installation

Go to Application -> Preferences -> Plugins and add the plugin insomnia-plugin-valorant

Added Tags

Tag NameTag IDDescription
Client Platformclient_platformThe client platform, a base64-encoded JSON string
Client Versionclient_versionThe client version
Lockfile Portlockfile_portThe port specified in the lockfile
Lockfile Passwordlockfile_passwordThe password specified in the lockfile
PUUIDpuuidThe player's unique id
Regionvalorant_regionThe region of the player's account
Shardvalorant_shardThe shard of the player's account
Tokenvalorant_tokenThe Riot auth token
Entitlementvalorant_entitlementThe Riot entitlement token
ID Tokenvalorant_id_tokenThe Riot ID token
PAS Tokenvalorant_pas_tokenThe Riot PAS token
Pre-Game Match IDpregame_match_idThe match id of the current pre-game lobby
Current Game Match IDcurrent_game_match_idThe match id of the current game (after agent select)
Party IDparty_idThe party id of the current party
Riot XMPPriot_xmppThe Riot XMPP WebSocket URL. Read more below.
Riot XMPP MITMriot_xmpp_mitmThe Riot XMPP MITM WebSocket URL. Read more below.

XMPP WebSocket

The XMPP WebSocket URL is a url for a localhost WebSocket server which is created on the fly by the plugin.

Connecting requires the Riot auth and entitlement headers as well as a X-Riot-PAS-JWT header with the value of the PAS JWT (can be obtained with the {% valorant_pas_token %} template tag)

Upon connecting to the server, the plugin creates a new XMPP connection to the Riot XMPP server and forwards the messages to the WebSocket.

The WebSocket url can have the following url suffixes (if there is no url suffix, raw is used):

rawThe raw XMPP data
raw-bufferedSometimes messages are sent that don't include a full valid XML tag. This mode buffers messages until the resulting buffer is valid XML.
jsonSimilar to raw-buffered but converts the XML to JSON. This is useful for Insomnia auto-formatting. Note that when sending data, it must be in JSON format.

XMPP MITM WebSocket

Like the regular XMPP WebSocket, the XMPP MITM WebSocket (man in the middle) WebSocket URL is a url for a localhost WebSocket server which is created on the fly by the plugin. However, unlike the regular XMPP WebSocket, no special headers are required to connect. The XMPP MITM WebSocket sits in between the Riot client and the Riot XMPP server and shows the data sent between them and can send custom messages to either one.

Upon connecting to the server, the plugin starts up the Riot Client with settings to use an http proxy so it can intercept the XMPP connection urls and replace them with its own server. The resulting connection is then forwarded to the WebSocket.

The XMPP MITM WebSocket supports the same url suffixes as the regular XMPP WebSocket.

When sending data to the WebSocket, it must start with "to-server" or "to-client" followed by a newline.

Debugging

When reporting a bug, open the dev console (crtl+alt+i) and include the log in your report.

Dev Setup

  • clone the repo
  • npm install
  • npm run build or npm run watch
  • if on Windows, run npm run link-windows to set up a junction to the default Insomnia plugins directory
2.0.3

20 days ago

2.0.2

1 month ago

2.0.1

4 months ago

2.0.0

5 months ago

1.1.3

8 months ago

1.1.2

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago