0

Opening a websocket without a port specified seems to fail on all xmpp servers. I assume this means there is no default websocket port.

I have been able to only open one xmpp server's websocket. It does not appear other xmpp servers use the same 5291 websocket port as tigase.im

How do you determine the websocket port for a public XMPP server? The lists of open xmpp servers seem to only give a url.

I at first tried DNS SRV lookup using DNSchecker.org which showed no SRV record.

As I learned more about DNS SRV lookup formats by reading RFC 6120, I found I can get the tcp port using mxtoolbox.com with the string: _xmpp-client._tcp.tigase.im

On a hunch, I tried _xmpp-client._websocket.tigase.im, but no port was returned. On further reading, the IETF specified to try the string _ws._tcp.tigase.im which also returned nothing using mxtoolbox.com Is there a different string I should be using with mxtoolbox.com?

Is there another way to get the websocket port number of a public XMPP server?

WS2XMPP
  • 13
  • 3

2 Answers2

0

XEP-0156 in addition to specifying DNS SRV records to find websocket ports, says they may be specified in the DNS TXT records. These can be found, as I was trying, using mxtoolbox.com with the string _xmppconnect.tigase.im or with the linux and windows console commands "dig +short txt _xmppconnect.tigase.im" or "nslookup q=txt _xmppconnect.tigase.im"

Thanks to AGodThatCanDance on Reddit

WS2XMPP
  • 13
  • 3
0

XEP-0156 also had another method I didn't originally understand, called HTTP lookup and it is a lot more practical for calling from javascript, then parsing the response.

If the xmpp server supports it, you append /.well-known/host-meta to the server's URL like this tigase.im/.well-known/host-meta

It can be even easier to parse with /.well-known/host-meta.json

WS2XMPP
  • 13
  • 3