Jingle - themeldingwars/Documentation GitHub Wiki

Firefall uses an extension to the XMPP protocol called Jingle to handle the chat system. Seems to use this as the XMPP lib gloox

Old Notes

Firefall's chat servers make use of XMPP for at least army and zone chat. 
The authentication method used is Digest-MD5, the process used to generate responses is detailed below.
http://wiki.xmpp.org/web/SASLandDIGEST-MD5
All fields which are supposed to be user replaceable are in <>
1. X = <username>:firefall.chat.red5studios.com:<secret>
1a. The username here is just the name from a JID, <secret> is a 40 hex digit value
	which does not seem to change between sessions. Probably SHA-1 of some static values.
	
2. Y = MD5(X), get this in the form of 16 octets
3. A1 = <Y>:<nonce>:<cnonce>
3a. The nonce is given to you by the challenge, cnonce is generated by you

4. A2 = AUTHENTICATE:xmpp/firefall.chat.red5studios.com
5. HA1 = MD5(A1), get this in the form of 32 hex digits
6. HA2 = MD5(A2), get this in the form of 32 hex digits
7. KD = <HA1>:<nonce>:1:<cnonce>:auth:<HA2>
8. Z = MD5(KD), 32 hex digits, this is your response value.

The server which you will have to connect to is chat.red5studios.com:5222, when binding your resource after authentication, you must pass a value of resource = "firefall" in order to have that bound to you. You must also specify a nickname when joining channels, this nickname must be the host portion of your JID in all caps. If it is anything else, you will not appear in the presence list or be able to send messages to the room. You will be able to receive messages though.

Zones and Armies are divided up into different Multi-User Chatrooms (MUC) with each having their own id.
The format for zones is [email protected] where each X is a lowercase hex digit.
The format for armies is [email protected], once again each X is a lowercase hex digit.

There does not appear to be any restrictions on joining MUCs at this time.
Additional Notes regarding response generation:
* They generate cnonce using 4 calls to rand/srand, does not matter how you do it.
* The start of their MD5 function is easily found by backtracking from where they begin generating the response string. I no longer have an exact address
* The secret is generated using SHA-1 with the following input: <email>-<pw>-red5salt-7nc9bsj4j734ughb8r8dhb8938h8by987c4f7h47b
	the end result should be a 40 digit hex string

Logging

Most of the activity can be easily logged with the in-game loggers.

Either use the firefall.ini:

[Debug]
LogLevel-Jingle = "trace"

Or the in-game console:

loglevel jingle trace

If you don't like digging through logs, you can always use Wireshark instead.

References

⚠️ **GitHub.com Fallback** ⚠️