We've been working on this app for a client that involves using xmpp as a backbone to pass application data, and also as a session initiation protocol transport for file transfers and media streams.
We initially prototyped using Google's libjingle. Earlier versions had support for p2p rtp and a proprietary p2p file transfer protocol based on http. Later versions seem to have dropped the support for reliable transport over tcp, while retaining the rtp support. My assumption is that they will add SOCKS5 support for tcp streams at some point, but given the fact that we found the lib really obtuse and hard to work with, we decided to experiment with another approach.
We began working with gloox, which has a pretty decent implementation of an xmpp client, and supports sip for initiating S5B streams over tcp. It supports disco and is more or less designed to work with an S5B proxy, however, we want to implement p2p S5B. Gloox gives us all the methods we need to establish our list of stream host addresses, but it doesn't address NAT traversal. If we want to make this work then the last piece we need is reliable tcp NAT traversal, with a fallback to either a S5B proxy or a TURN relay if we can't punch through.
And that's the problem. ICE-TCP is just in early work as far as I can tell, and the only implementation of STUNT that I can find is the nutts library from Cornell, and it hasn't been actively worked on or really discussed since 2006. It's almost like this problem hasn't been talked about much in the last five years. We just don't come up with much when we search.
Some other options we've looked at are: using pseudo-tcp over udp - there are a couple of libraries that support this (libnice comes to mind) but we're not sure we can integrate their pseudo socket model into gloox, which is used to managing it's own connections; we've also thought about using rtp for media streams and in-band xmpp transfers for file data - basically we'd chunk it and base64 it and send it as stanzas with a hash... but we really don't want to do that.
Basically what I was hoping to find is some current work or source code implementing either ICE-TCP or STUNT with examples, or at least some creative ideas on what the hell we should do here. Maybe give jingle another look, as bad as it is? Any thoughts would be appreciated.
We initially prototyped using Google's libjingle. Earlier versions had support for p2p rtp and a proprietary p2p file transfer protocol based on http. Later versions seem to have dropped the support for reliable transport over tcp, while retaining the rtp support. My assumption is that they will add SOCKS5 support for tcp streams at some point, but given the fact that we found the lib really obtuse and hard to work with, we decided to experiment with another approach.
We began working with gloox, which has a pretty decent implementation of an xmpp client, and supports sip for initiating S5B streams over tcp. It supports disco and is more or less designed to work with an S5B proxy, however, we want to implement p2p S5B. Gloox gives us all the methods we need to establish our list of stream host addresses, but it doesn't address NAT traversal. If we want to make this work then the last piece we need is reliable tcp NAT traversal, with a fallback to either a S5B proxy or a TURN relay if we can't punch through.
And that's the problem. ICE-TCP is just in early work as far as I can tell, and the only implementation of STUNT that I can find is the nutts library from Cornell, and it hasn't been actively worked on or really discussed since 2006. It's almost like this problem hasn't been talked about much in the last five years. We just don't come up with much when we search.
Some other options we've looked at are: using pseudo-tcp over udp - there are a couple of libraries that support this (libnice comes to mind) but we're not sure we can integrate their pseudo socket model into gloox, which is used to managing it's own connections; we've also thought about using rtp for media streams and in-band xmpp transfers for file data - basically we'd chunk it and base64 it and send it as stanzas with a hash... but we really don't want to do that.
Basically what I was hoping to find is some current work or source code implementing either ICE-TCP or STUNT with examples, or at least some creative ideas on what the hell we should do here. Maybe give jingle another look, as bad as it is? Any thoughts would be appreciated.
Last edited: