errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.13k stars 616 forks source link

How to disable IPv6 in sleekxmpp? #327

Closed vkuusk closed 7 years ago

vkuusk commented 9 years ago

What is the correct way to disable the use of IPv6 in sleekxmpp?

I'm installing ERR on Ubuntu 14.04 using pip and connecting it to HipChat. After the default install of sleekxmpp Err tries to use IPv6, and the only way which I could find how to disable usage of IPv6 was to modify the sleekxmpp source directly:

sudo pip install sleekxmpp sudo sed -i s/"self.use_ipv6 = True"/"self.use_ipv6 = False"/g /usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/xmlstream.py

Is there a setting in Err config.py to do it?

Thx

gbin commented 9 years ago

I see that the resolver from SleekXmpp has this parameter : https://github.com/fritzy/SleekXMPP/blob/develop/sleekxmpp/xmlstream/resolver.py#L56

We use it already for the SRV records, maybe we could use it across the board and forward this parameter for the XMPP backend.

@zoni, what do you think ?

zoni commented 9 years ago

I don't see any problem in passing it on to the XMPP backend. I would suggest making it a configuration option like these here. Something like XMPP_DISABLE_IPV6=False or DISABLE_IPV6=False with a clear warning that it only works for the xmpp-based (xmpp itself and hipchat) backends right now.

zoni commented 7 years ago

This was implemented in #867.