我的xmpp应用程序如何在不创建SRV记录的情况下与Google Apps用户联合?

时间:2011-02-06 03:00:46

标签: xmpp google-apps

我有一个使用Prosody和XMPP与Google Talk用户进行通信的应用程序。我希望该应用能够与Goole Apps用户进行通信,但根据此文档:

http://www.google.com/support/a/bin/answer.py?hl=en&answer=34143

让Google Apps用户与@ gtalk.com以外的任何xmpp客户端通信需要创建SRV记录。

我的问题是:我的应用如何与Google Apps用户交谈/没有/要求他们为自己的域创建DNS记录? (这是高度技术性的,没有人这样做。)

有没有办法欺骗我的服务器与Google的XMPP服务器交谈而不是寻找不存在的XMPP端点?

这可能需要一个创意解决方案..主机文件,防火墙,特殊DNS设置......什么?有可能??

1 个答案:

答案 0 :(得分:0)

让您的XMPP服务器配置为与提供您想要的任何SRV记录的本地DNS服务器通信。我建议dnsmasq使用如下配置:

# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv

# A SRV record sending XMPP for the example.com domain to
# xmpp-server.l.google.com port 5269

srv-host=_xmpp-server._tcp.example.com,xmpp-server.l.google.com,5269,5
srv-host=_xmpp-server._tcp.example.com,xmpp-server1.l.google.com,5269,20
srv-host=_xmpp-server._tcp.example.com,xmpp-server2.l.google.com,5269,20
srv-host=_xmpp-server._tcp.example.com,xmpp-server3.l.google.com,5269,20
srv-host=_xmpp-server._tcp.example.com,xmpp-server4.l.google.com,5269,20