在 ejabberd 中设置匿名登录时遇到问题

发布于 2024-08-29 07:26:02 字数 1769 浏览 3 评论 0原文

在 ejabberd.cfg 中,我有以下内容

{host_config, "thisislove-MacBook-2.local", [{auth_method, [internal, anonymous]},
                          {allow_multiple_connections, false},
                          {anonymous_protocol, both}]}.

,但是当使用 speeqe javascript 客户端 (speeqe.com) 进行连接时,我看到它发送

<body rid='1366284187' xmlns='http://jabber.org/protocol/httpbind' to='thisislove-macbook-2.local' xml:lang='en' wait='60' hold='1' window='5' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

并且服务器响应

<body xmlns='http://jabber.org/protocol/httpbind' sid='f89bf034b02fa6b884bb0c55be3f1f69e45e3866' wait='60' requests='2' inactivity='30' maxpause='120' polling='2' ver='1.8' from='thisislove-macbook-2.local' secure='true' authid='353072658' xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams' xmpp:version='1.0'><stream:features xmlns:stream='http://etherx.jabber.org/streams'><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features></body>

通知机制,DIGEST-MD5 &清楚的。如果我没记错的话,它也应该有 ANONYMOUS 作为一种机制。所以发生的情况是 speeqe 简单地终止连接。

因此,我想我一定是在匿名配置或 muc 配置中遗漏了一些东西。在 mod_muc configg 中,我有

{mod_muc,      [
      %%{host, "conference.@HOST@"},
      {access, muc},
      {access_create, muc},
      {access_persistent, muc},
      {access_admin, muc_admin},
      {max_room_name, 190},
      {max_room_desc, 190},
      {max_users, 500}
     ]}

那么我缺少什么?

谢谢

In ejabberd.cfg I have the following

{host_config, "thisislove-MacBook-2.local", [{auth_method, [internal, anonymous]},
                          {allow_multiple_connections, false},
                          {anonymous_protocol, both}]}.

but when using speeqe javascript client (speeqe.com) to connect, I see it sends

<body rid='1366284187' xmlns='http://jabber.org/protocol/httpbind' to='thisislove-macbook-2.local' xml:lang='en' wait='60' hold='1' window='5' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

and the server responds with

<body xmlns='http://jabber.org/protocol/httpbind' sid='f89bf034b02fa6b884bb0c55be3f1f69e45e3866' wait='60' requests='2' inactivity='30' maxpause='120' polling='2' ver='1.8' from='thisislove-macbook-2.local' secure='true' authid='353072658' xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams' xmpp:version='1.0'><stream:features xmlns:stream='http://etherx.jabber.org/streams'><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features></body>

Notice the mechanisms, DIGEST-MD5 & PLAIN. If I'm not mistaken it should have ANONYMOUS as a mechanism as well. So what happens is that speeqe simply terminates the connection.

As such I'm thinking i must be missing something in the anonymous configuration or the muc config. In the mod_muc configg, I have

{mod_muc,      [
      %%{host, "conference.@HOST@"},
      {access, muc},
      {access_create, muc},
      {access_persistent, muc},
      {access_admin, muc_admin},
      {max_room_name, 190},
      {max_room_desc, 190},
      {max_users, 500}
     ]}

So what am I missing?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怎会甘心 2024-09-05 07:26:02

这可能会对将来的某人有所帮助,所以这就是发生的事情。 cf_email__

{auth_method, internal}. 

最后,speeqe 的 local_settings.js 中的房间名称

{auth_method, [internal, anonymous]}.

{access, muc_create, [{allow, local}]}.

__

{access, muc_create, [{allow, all}]}.

必须有聊天服务器: [电子邮件受保护] (而不是 [电子邮件受保护])。

This might help someone in the future so here's what was happening. I had

{auth_method, internal}. 

instead of

{auth_method, [internal, anonymous]}.

I also had

{access, muc_create, [{allow, local}]}.

instead of

{access, muc_create, [{allow, all}]}.

And finally, the room name in local_settings.js of speeqe had to have the chat server as well: [email protected] (and not [email protected]).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文