meshenger-android icon indicating copy to clipboard operation
meshenger-android copied to clipboard

Can't establish a manual webrtc call to this app

Open djsb opened this issue 4 years ago • 6 comments

Is the app following the standard negotiation? I was trying to build a desktop client app that would be compatible with meshenger, but can't seem to establish the video/audio after the initial negotiation. Is the video / audio also encrypted with the keys?

djsb avatar May 07 '20 20:05 djsb

hi,

the initial webrtc description exchange is encrypted in the code of Meshenger. Both sides needs the other contacts public key for that. After that, it's standard WebRTC communication and streams.

An outgoing call starts here: https://github.com/meshenger-app/meshenger-android/blob/master/app/src/main/java/d/d/meshenger/RTCCall.java#L136

Then a encrypted JSON string is send. It states the "action" ( "call") and transmits the "offer" generated by WebRTC. The receiving side needs to decrypt the message and feed the "offer" to it's WebRTC library.

Did I understand you correctly in that you already managed to overcome these steps?

mwarning avatar May 07 '20 21:05 mwarning

Thank you so much for the extensive detail. Would I be able to find anywhere in the code a flag/switch/method where, if disabled, would prevent encryption?

This would allow easier debug.

Again, thanks and great project.

djsb avatar May 07 '20 21:05 djsb

Encryption cannot be disabled by means of a setting, but you bypass it in the code. But it is a bit of work.

I hope I can continue the project. But there is not enough spare time right now.

mwarning avatar May 07 '20 21:05 mwarning

@djsb do you need help?

mwarning avatar May 12 '20 19:05 mwarning

Hi @mwarning : thank you so much for following-up. I was trying to have some guidance on which methods to bypass to enable a non-encrypted negotiation.

From what I understand, from the moment the negotiation is done, no encryption exists. Would I be correct, assuming that using the method that encrypts to return the original message, would make it not encrypted?

djsb avatar Jun 02 '20 14:06 djsb

@djsb that might work.

Just return the message variable in decryptMessage(..) and encryptMessage(): https://github.com/meshenger-app/meshenger-android/blob/master/app/src/main/java/d/d/meshenger/Crypto.java

mwarning avatar Jun 02 '20 14:06 mwarning

There is a disable_crypto variable in the source code that you can use for experimentation. But you would need to recompile the app. A desktop app would be awesome. But since this is an old isssue, I will close it for now.

mwarning avatar Dec 24 '22 20:12 mwarning