Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Setting to force IPv4/disable IPv6 #2025

Open
CRC-Mismatch opened this issue Jul 21, 2017 · 10 comments
Open

Setting to force IPv4/disable IPv6 #2025

CRC-Mismatch opened this issue Jul 21, 2017 · 10 comments

Comments

@CRC-Mismatch
Copy link

CRC-Mismatch commented Jul 21, 2017

I feel the lack of a way to force HexChat to connect via IPv4 only, maybe on a per-server basis, possibly via a global setting.

I couldn't seem to find a way to do this messing only with HC. Basically, I wanted it to connect to one server via IPv4 in order to enable sending files via XDCC. I would be fine if I had to connect to all servers in this manner (for now I only use one, and probably IPv4 would do fine for all servers).

The best workaround I could find is to set the "DCC IP address" to my current remote IP, but since it's dynamic, I would have to change it every time - and also it seems to then fail due to the port chosen not being forwarded via UPNP, which would force me to set a port range and forward it...

I could disable IPv6 entirely for the adapter, but I want to still be able to use it where I need (more like can use) it, and that wouldn't be a "portable" way of doing it as it's related to the OS...

@CRC-Mismatch
Copy link
Author

After tinkering about, I noticed that this would solve the "not being able to get the remote IP from the server" part, but still wouldn't help without forwarding ports and setting a fixed range...

@TingPing
Copy link
Member

TingPing commented Jul 22, 2017

So the entire concept of "getting your IP from the server" is a rather dumb and broken one as most networks don't reliably report this information.

There aren't a ton of ways to reliably get this information; One method is upnp which when your router knows your address it works fairly well in my tests but the problem there is it fails when using proxies or vpns, alternatively we can have a remote service to query for what our address appears as but that requires somebody hosting a service.

So using either of those methods the issue of what protocol you use to connect the IRC server really doesn't matter at all. (Also we should be at the point where DCC works over IPv6 ideally).

@learn-more
Copy link
Contributor

https://www.ipify.org/

@TingPing
Copy link
Member

Oh and either solution requires HexChat to add a dependency, be it just libsoup for http or gupnp.

@CRC-Mismatch
Copy link
Author

CRC-Mismatch commented Jul 24, 2017

I guess the easiest way out would be as hard as implementing a way to enable reverse DCC like the one that mIRC and KVirc implement, where the SEND message has 0 for port and a token int as an extra parameter. I was able to get sucessful transmissions when testing these even when I sent in a bogus or 0 value for IP address, since the receiving end sends back their own IP and port via CTCP in a mirror SEND request, and then the listening gets delegated to the opposite side. Not only would this solve port forwarding and NAT problems, but also VPN and CGNAT.

@TingPing
Copy link
Member

Pretty confident HexChat already supports that.

@rcmaehl
Copy link

rcmaehl commented Jul 25, 2018

Also having this issue, unable to connect to some servers such as Espernet with IPv6 enabled

@Mikaela
Copy link
Contributor

Mikaela commented Oct 2, 2018

I think this might be a duplicate of #1309 (which should probably be called as "Happy Eyeballs" or similar I see that TingPing renamed it from that) or it could be duplicate of this, but I still believe that disabling IPv6 is the wrong solution.

@EduFrazao
Copy link

In a Dual Stack enviroment, when IPv6 fails for some reason, (for now, I have problems to reach ipv6 at freenode, but ipv4 is fine), there is no ipv4 fallback, like WebBrowsers do?

@ghost
Copy link

ghost commented Jan 18, 2022

There is ipv4 fallback. I have just observed that with tcpdump.

However, there is no message about that in the Server log.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

6 participants