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

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jun 12 08:32:35 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):

 I assume you mean the other contact is returning "feature-not-
 implemented"?

 If you use a custom iq-class in Sleek:

 {{{
 class Initiate(ElementBase):
     name = 'initiate'
     namespace = 'https://www.torproject.org/transport/xmpp'
     plugin_attrib = 'tor_initiate'
     interfaces = set(('host', 'port'))
     sub_interfaces = interfaces
 }}}

 And call:

 {{{
 register_stanza_plugin(Iq, Initiate)
 }}}

 Then you can use:

 {{{
 self.register_handler(Callback('Tor XMPP Transport Handler',
 StanzaPath('iq at type=set/tor_initiate'), self.handle_transport))
 }}}

 To register the `self.handle_transport` callback to be called every time a
 message matching the class comes in.

 If you use the iq-stanza format I proposed, then you can access the fields
 with `stanza['tor_initiate']['host']` and
 `stanza['tor_initiate']['port']`.

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


More information about the tor-bugs mailing list