oriolrius.cat

Des del 2000 compartiendo sobre…

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

Reading time: 4 – 7 minutes

La segona part sobre la trilogia de SOCKS5.

El podcast:

[display_podcast]

Exemples extrets del XEP-0065:

Example 1. Initiator Sends Service Discovery Request to Target

<iq type='get'
    from='initiator@example.com/foo'
    to='target@example.org/bar'
    id='hello'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

Example 2. Target Replies to Service Discovery Request

<iq type='result'
    from='target@example.org/bar'
    to='initiator@example.com/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='initiator@example.com/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='initiator@example.com/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='initiator@example.com/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='initiator@example.com/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='initiator@example.com/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='initiator@example.com/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='initiator@example.com/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='initiator@example.com/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='initiator@example.com/foo'
    to='target@example.org/bar'
    id='initiate'>
  <query xmlns='http://jabber.org/protocol/bytestreams'
         sid='vxf9n471bn46'
         mode='tcp'>
    <streamhost
        jid='initiator@example.com/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='target@example.org/bar'
    to='initiator@example.com/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='target@example.org/bar'
    to='initiator@example.com/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='target@example.org/bar'
    to='initiator@example.com/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='initiator@example.com/foo'
    to='streamhostproxy.example.net'
    id='activate'>
  <query xmlns='http://jabber.org/protocol/bytestreams'
         sid='vxf9n471bn46'>
    <activate>target@example.org/bar</activate>
  </query>
</iq>

Example 20. Proxy Informs Initiator of Activation

<iq type='result'
    from='streamhostproxy.example.net'
    to='initiator@example.com/foo'
    id='activate'/>

Referències:

<iq type=’get’
from=’initiator@example.com/foo’
to=’target@example.org/bar’
id=’hello’>
<query xmlns=’http://jabber.org/protocol/disco#info’/>
</iq>

One thought on “Podcast 2×02: SOCKS5 Bytestreams (XEP-0065)

  1. you’ve an amazing blog here! would you like to make some invite posts on my blog?Your means of explaining the whole thing in this article is genuinely good, every one can easily understand it, Thanks a lot.

Últimas entradas

Add a New Dropdown Menu in OpenWRT LUCI

Reading time: 3 – 5 minutes OpenWRT, the popular open-source Linux operating system designed for embedded devices, offers the LUCI interface for easy configuration and management. LUCI is essentially the web interface for OpenWRT, and while it’s already feature-rich, sometimes

Leer más »
Archivo