如何让 punjab/twisted 绕过 dns
我正在尝试让旁遮普 BOSH 服务器与开发 XMPP 服务器一起使用。 punjab 正在尝试对 XMPP 域进行 SRV DNS 查找,而我们的 DNS 基础设施中不存在该域。有什么方法可以配置旁遮普语将“myserver.mydomain.com”的请求路由到 IP 地址吗?我无法访问 XML 级别的 xmpp:route 属性,因此必须通过旁遮普/扭曲配置以某种方式完成此操作。
I am trying to get a punjab BOSH server to work with a development XMPP server. punjab is trying to do a SRV DNS lookup of the XMPP domain, which is not present in our DNS infrastructure. Is there any way I configure punjab to route requests for "myserver.mydomain.com" to an IP address? I do not have access to the xmpp:route attribute at the XML-level, so this would have to be done somehow by punjab/twisted configuration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为让您快速启动并运行的方法,请安装 dnsmasq,将以下内容添加到配置文件:
启动 dnsmasq.conf我建议从 sudo dnsmasq -dq 开始,这样您就可以查看调试输出并诊断任何问题。
修改您的网络配置以使用 127.0.0.1 作为 DNS 服务器。例如,但请检查您的操作系统,将
resolv.conf
设置为:这将在您的机器上本地运行一个小型 DNS 解析器,在本地提供一个 SRV 记录,并将其他所有内容转发到您的上游 DNS 服务器。
As a quick hack to get you up and running, install dnsmasq, add the following to the config file:
Start dnsmasq. I recommend starting with
sudo dnsmasq -dq
to start with, so you can see the debug output and diagnose any problems.Modify your network configuration to use 127.0.0.1 as your DNS server. E.g., but check for your OS, set
resolv.conf
to:This will run a small DNS resolver locally on your box, server up the one SRV record locally, and forward everything else to your upstream DNS server.