在 ejabberd 中设置匿名登录时遇到问题
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能会对将来的某人有所帮助,所以这就是发生的事情。 cf_email__
最后,speeqe 的 local_settings.js 中的房间名称
也
__
必须有聊天服务器: [电子邮件受保护] (而不是 [电子邮件受保护])。
This might help someone in the future so here's what was happening. I had
instead of
I also had
instead of
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]).