[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #9022 [Pluggable transport]: Create an XMPP pluggable transport
#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 feynman):
Replying to [comment:26 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@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']`.
Unfortunately, I am beginning to think that the chat server is sending the
error message. I consistently get the same error messages whether the
other hexchat bot is logged in as the recipient or not. It would appear as
though the server does not like custom IQs.
If you have the time, could you confirm that you are able to send custom
Iqs with sleekxmpp? If you are not willing or able, that is fine, but an
example of working code would really be a help here.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9022#comment:27>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs