[tor-bugs] #9022 [Pluggable transport]: Create an XMPP pluggable transport

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jun 11 17:38:30 UTC 2013


#9022: Create an XMPP pluggable transport
---------------------------------+------------------------------------------
 Reporter:  asn                  |          Owner:  feynman 
     Type:  task                 |         Status:  accepted
 Priority:  normal               |      Milestone:          
Component:  Pluggable transport  |        Version:          
 Keywords:                       |         Parent:          
   Points:                       |   Actualpoints:          
---------------------------------+------------------------------------------

Comment(by xnyhps):

 Replying to [comment:23 feynman]:
 > This sounds like a good idea. I looked into `<iq>`s, but it seems they
 do not come with enough text fields (although I could be mistaken). I need
 four text fields to send a message:
 > - One for the client ip:port
 > - One for the server ip:port
 > - One for the actual data
 > - The JID of the computer that sent the message
 >
 > Unless all four fields can be stuck somewhere in an iq message, this
 route will not work. Maybe with some hacks I could be wrong, but at first
 glance, this looks like a dead end.

 `<iq>`s can carry arbitrary XML, which servers will route to the client
 you're addressing. It doesn't need to follow an already defined protocol
 or extension.

 You just have to keep the following in mind:

  1. They must contain a single child element (which might contain further
 children), which should be in some custom XML namespace.
  1. Everything must be valid UTF8.
  1. There's a size limit in stanzas.

 So you could define your own protocol where you send an `<iq>` like:

 {{{
 <iq type="set" to="pluggabletransport at jabber.org/Hex" id="1234">
     <initiate xmlns="https://www.torproject.org/transport/xmpp">
         <host>www.google.com</host>
         <port>443</port>
     </initiate>
 </iq>
 }}}

 and the transport replies:

 {{{
 <iq type="result" from="pluggabletransport at jabber.org/Hex" id="1234">
    <success sid="abcd567"
 xmlns="https://www.torproject.org/transport/xmpp" />
 </iq>
 }}}

 which the client uses to open an [http://xmpp.org/extensions/xep-0047.html
 IBB] connection:

 {{{
 <iq id="1235" to="pluggabletransport at jabber.org/Hex" type="set">
     <open xmlns="http://jabber.org/protocol/ibb" block-size="4096"
 sid="abcd567" stanza="iq" />
 </iq>
 }}}

 I haven't read the code for all the details of the information you need to
 exchange, but in principle you can stick whatever you want in those
 `<iq>`s. :)

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9022#comment:24>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list