Unite Proxy and UCP protocol

Forums » Dev.Opera » General Web Development Discussions

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

17. June 2009, 18:28:21

jaredhanson

Posts: 3

Unite Proxy and UCP protocol

Hi! Thanks Opera for developing Unite. It is an interesting concept and I've been enjoying experimenting with it yesterday and today.

I've been investigating the communication channel between Opera and the Unite proxy servers. I see it is using a protocol termed UCP/1.0. The init sequence is a REGISTER command to register the user and device. This is followed by a CHALLENGE from the server with a nonce. Opera then replies with a RESPONSE to authenticate, with a hash that must contain credentials.

I'm curious as to how the RESPONSE hash is computed. Is there any information regarding this? What is the algorithm used, if I wanted to authenticate a non-Opera client with the Unite proxy?

Thanks!
Jared Hanson

17. June 2009, 21:02:28

jonnyrein

Posts: 6

It is a MD5 hash of the shared secret (see webserver settings in opera:config) and the nonce, then converted to hex.

Regards,
Jonny

17. June 2009, 21:45:33

jaredhanson

Posts: 3

That worked perfectly!

Jared

18. June 2009, 16:16:54

jaredhanson

Posts: 3

Is there any trick to RSVP'ing to INVITE messages? I'm successfully authenticating the communication channel. When I attempt to access my client through the HTTP gateway in a separate browser, however, my RSVPs are not accepted. For example:

S: INVITE 1156 UCP/1.0
S: Nonce: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
S: X-Forwarded-For: nnn.nnn.nnn.nnn

C: RSVP device.user.operaunite.com UCP/1.0
C: Id: 1156
C: Digest: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

S: UCP/1.0 400 Bad request

<server-close>

At this point, I'm expecting the HTTP request to be proxied to my UCP client. However, the 400 error is delivered and the connection is closed. I've checked and re-checked everything, and inspected the packet captures, and I can't see what I'm missing. I'm calculating the digest correctly using MD5(shared secret + invite nonce).

Is there some out-of-band communication that needs to happen before RSVPs are accepted? I've seen some HTTP requests to asd.opera.com, but nothing that looks essential. Any help is appreciated.

Thanks,
Jared Hanson

22. July 2009, 09:58:44

joritter

Posts: 2

Good to see that the unite protocol is being analysed. Question to Opera: do you have any plans to open up the protocol description to encourage other "server devices" to engage in the Opera Unite community?

Thanks,
Jo

9. February 2010, 09:17:48

JoakimCh

Posts: 1

Just letting you guys know that I successfully made a program to connect any web-server (like my local one) to Opera Unite. Currently I've written only 245 lines of code, so it wasn't that hard really.

It sure could be handy for people behind firewalls to host their own web-servers, etc.
What other uses do you people have in mind?

Forums » Dev.Opera » General Web Development Discussions