oriolrius.cat » Podcast Feed
oriolrius.cat » Podcast Feed
Oriol Rius
Mar 9, 2010 · 44 min

Podcast 2×02: SOCKS5 Bytestreams (XEP-0065)

MP3

Reading time: 4 – 7 minutes

La segona part sobre la trilogia de SOCKS5.

El podcast:

Exemples extrets del XEP-0065:

Example 1. Initiator Sends Service Discovery Request to Target

<iq type='get'
from='[email protected]/foo'
to='[email protected]/bar'
id='hello'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

Example 2. Target Replies to Service Discovery Request

<iq type='result'
from='[email protected]/bar'
to='[email protected]/foo'
id='hello'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity
category='proxy'
type='bytestreams'
name='SOCKS5 Bytestreams Service'/>
<feature var='http://jabber.org/protocol/bytestreams'/>
</query>
</iq>

Example 3. Initiator Sends Service Discovery Request to Server

<iq type='get'
from='[email protected]/foo'
to='example.com'
id='server_items'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

Example 4. Server Replies to Service Discovery Request

<iq type='result'
from='example.com'
to='[email protected]/foo'
id='server_items'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='streamhostproxy.example.net' name='Bytestreams Proxy'/>
</query>
</iq>

Example 5. Initiator Sends Service Discovery Request to Proxy

<iq type='get'
from='[email protected]/foo'
to='streamhostproxy.example.net'
id='proxy_info'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

Example 6. Server Replies to Service Discovery Request

<iq type='result'
from='streamhostproxy.example.net'
to='[email protected]/foo'
id='proxy_info'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity category='proxy'
type='bytestreams'
name='SOCKS5 Bytestreams Service'/>
<feature var='http://jabber.org/protocol/bytestreams'/>
</query>
</iq>

Example 7. Initiator Requests Network Address from Proxy

<iq type='get'
from='[email protected]/foo'
to='streamhostproxy.example.net'
id='discover'>
<query xmlns='http://jabber.org/protocol/bytestreams'
sid='vxf9n471bn46'/>
</iq>

Example 8. Proxy Informs Initiator of Network Address

<iq type='result'
from='streamhostproxy.example.net'
to='[email protected]/foo'
id='discover'>
<query xmlns='http://jabber.org/protocol/bytestreams'>
sid='vxf9n471bn46'>
<streamhost
jid='streamhostproxy.example.net'
host='24.24.24.1'
p
zeroconf='_jabber.bytestreams'/>
</query>
</iq>

Example 9. Proxy Returns Error to Initiator

<iq type='error'
from='[email protected]/foo'
to='streamhostproxy.example.net'
id='discover'>
<query xmlns='http://jabber.org/protocol/bytestreams'
sid='vxf9n471bn46'/>
<error code='403' type='auth'>
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>

Example 10. Proxy Returns Error to Initiator

<iq type='error'
from='[email protected]/foo'
to='streamhostproxy.example.net'
id='discover'>
<query xmlns='http://jabber.org/protocol/bytestreams'
sid='vxf9n471bn46'/>
<error code='405' type='cancel'>
<not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>

Example 11. Initiation of Interaction

<iq type='set'
from='[email protected]/foo'
to='[email protected]/bar'
id='initiate'>
<query xmlns='http://jabber.org/protocol/bytestreams'
sid='vxf9n471bn46'
mode='tcp'>
<streamhost
jid='[email protected]/foo'
host='192.168.4.1'
port='5086'/>
<streamhost
jid='streamhostproxy.example.net'
host='24.24.24.1'
zeroconf='_jabber.bytestreams'/>
</query>
</iq>

Example 12. Target Refuses Bytestream

<iq type='error'
from='[email protected]/bar'
to='[email protected]/foo'
id='initiate'>
<error code='406' type='auth'>
<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>

Example 13. Target Is Unable to Connect to Any StreamHost and Wishes to End Transaction

<iq type='error'
from='[email protected]/bar'
to='[email protected]/foo'
id='initiate'>
<error code='404' type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>

Example 16. Target Notifies Initiator of Connection

<iq type='result'
from='[email protected]/bar'
to='[email protected]/foo'
id='initiate'>
<query xmlns='http://jabber.org/protocol/bytestreams'
sid='vxf9n471bn46'>
<streamhost-used jid='streamhostproxy.example.net'/>
</query>
</iq>

Example 19. Initiator Requests Activation of Bytestream

<iq type='set'
from='[email protected]/foo'
to='streamhostproxy.example.net'
id='activate'>
<query xmlns='http://jabber.org/protocol/bytestreams'
sid='vxf9n471bn46'>
<activate>[email protected]/bar</activate>
</query>
</iq>

Example 20. Proxy Informs Initiator of Activation

<iq type='result'
from='streamhostproxy.example.net'
to='[email protected]/foo'
id='activate'/>

Referències:

<iq type=’get’
from=’[email protected]/foo’
to=’[email protected]/bar’
id=’hello’>
<query xmlns=’http://jabber.org/protocol/disco#info’/>
</iq>

Episodes play from the podcast's own servers, unmodified. Not affiliated with Podbay.