Client/server (proxy)

Hi

I'm looking for some sort client/server that would work as a proxy. For example:

user A ------ proxy ====== ejabberd ====== user B
where:
- connection made every 10 seconds
= constant connection

This would help me in creation ajax(php) client. I have got almost everything, but user B see user A as offline contact.

Is there something like that, or do I have to write my own python/c++ app ?

Disclaimer: I know little of

Disclaimer: I know little of the terms I'll mention here.

Maybe an HTTP-Bind (also called BOSH) service behaves as the proxy you are looking. Some clients that can use a BOSH service to connect to an XMPP server are JWChat and Gajim.

Note: ejabberd includes a BOSH service.

This may be it

Too bad xmp-php doesn' work as it should. It looks like BOSH.php isn't ready. It connects to the server but it skips authentication part. I added auth function, but it doesn't work (maybe xmpp-sasl+PLAIN isn't good idea ?).

I finally managed to run auth function. So, I suppose that PLAIN still doesn't work in Ejabberd ? Anyway, DIGEST-MD5 works.

So, the last problem is with presence and messages.

RID starts from the 3001.

digest-md5 handshake

reset

<?xml version="1.0"?>
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh" content="text/xml; charset=utf-8" rid="3006" sid="7fa8d3e4f5c4ec95489447df2be26378336fa935" xml:lang="en"><iq xmlns="jabber:client" id="bind_1" type="set">
    <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
      <resource>httpclient</resource>
    </bind>
  </iq></body>

--- outgoing data ---
<body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client' id='bind_1' type='result'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>guest_01@server/httpclient</jid></bind></iq></body>

Incoming data: <?xml version="1.0"?>
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh" content="text/xml; charset=utf-8" rid="3007" sid="7fa8d3e4f5c4ec95489447df2be26378336fa935" lang="en"><presence><status>Online</status></presence></body>

really sending now: [{xmlelement,
                                                            "presence",[],
                                                            [{xmlelement,
                                                              "status",[],
                                                              [{xmlcdata,
                                                                <<"Online">>}]}]}]

Incoming data: <?xml version="1.0"?>
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh" content="text/xml; charset=utf-8" rid="3008" sid="7fa8d3e4f5c4ec95489447df2be26378336fa935" lang="en"><message from="guest_01@server/httpclient" to="user@server" type="chat"><body>Online message</body></message></body>

reqlist: [{hbr,3008,[],[]},
                                                {hbr,3007,[],[]}]

really sending now: [{xmlelement,
                                                            "message",
                                                            [{"from",
                                                              "guest_01@server/httpclient"},
                                                             {"to",
                                                              "user@server"},
                                                             {"type","chat"}],
                                                            [{xmlelement,
                                                              "body",[],
                                                              [{xmlcdata,
                                                                <<"Online message">>}]}]}]

Both user@server and guest_01@server are registered users and their subscription is set to the "both".

Did I forget about something important ?

Syndicate content