-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefer IPv6 if its available #2198
Comments
I would like to add that Telegram will also stay on IPV4 mode regardless of the user preference when behind an ISP-provided 6to4 tunnel (Videotron Ltee in my case). I have only tested this on Windows x64 so far. |
@XenHat This is per design on most OSes, 2002::/16 prefix usually have lower precedence |
@john-preston This also somewhat improve security, as CGNAT become more common, IPv4 address from which somebody logged into your account could be same as yours and you could completely ignore that by mistake. Thus connecting via IPv6 preferably give you better track your sessions |
Happens on OS X too by the way. |
This still happens on Windows. |
Still happens on macOS. |
Yes, currently IPv4 is preferred to IPv6, because IPv4 shows itself better, is more stable from both our side and local provider side. |
@john-preston Is there any practical reason why checkbox
I would disagree on that, since iOS version and macOS native version prefer IPv6 and work flaweless |
@nshopik On Windows I had several reports that when trying to connect both with IPv4 and IPv6 the first one was not working at all till the app restart, so this was moved to settings, disabled by default and on Windows it even requires app restart to change. I could not debug this issue back then and it wasn't a big problem anyway. |
Wouldn’t it be better to have a dropdown in which the user chooses between auto (default, telegram tries to “reliability test” both), force ipv4 and force ipv6? Multiple users from multiple ISPs have mixed results, guess that would close this case once and for all. |
@john-preston That's why I've suggested RFC6555 style address family selection instead dumb preference, which may cause problem. All current browsers implement it and correctly fallback to IPv4 if IPv6 in broken state. Current IPv6 support just doesn't make sense, tdesktop support it but not enabled by default and even if you enable it still not even try connect IPv6 if IPv4 available. And as I'm rightly pointed out it make sense from security perspective when CGN comes into play to prefer IPv6 if its available and working. |
The problem is that even if you enable to use ipv6, it doesn't (unless you disable ipv4 stack on windows, which doesn't make any sense) |
Btw, Telegram deals with IPv6 pretty weirdly -- if you log in using it you get a private IP address in "somebody logged in" message |
@stek29 They had issue with backend previously which report weird private IP ranges including multicast ranges, now it report correctly in |
Maybe dropdown to auto (prefered ipv6) auto (prefered ipv4) ipv4 ipv6? :) |
Please! Add dropdown to auto (prefered ipv6) / auto (prefered ipv4) / ipv4-only / ipv6-only |
I have several clients which have IPv6 (no 6to4), "use IPv6" is enabled, but the connection is made via IPv4. |
Just tested latest client and it successfully connected via IPv6 |
Hey there! This issue will be automatically closed in 7 days if there would be no activity. We therefore assume that the user has lost interest or resolved the problem on their own. Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue. Thanks! |
It's time to remove this crutch. |
I have a feel that tdesktop won't use IPv6 until someone brave PR a RFC6555 implementation, since it seems really complicated and devs might have no time (or just too lazy) to implement. |
Hey there! This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own. Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue. Thanks! |
I think this issue still exists. |
Looks like this is still affecting networks where native IPv6 has been implemented. I've done everything I can think of in terms of "Best Practice" for deploying with IPv6 (SLAAC/RDNSS/ full /64s to each subnet) and I can see devices pick it up and use it for other things but Telegram is still falling back to IPv4. |
In my country, the unlimited packages have telegram limited to 1mbps, but I found out that it is only limited on IPv4. On IPv6 I get full speed. I have setuped firewall rules to block telegram IPv4 address to force IPv6 in the desktop app. It would be better to other users if IPv6 was preferred when there is native connectivity. |
I don't understand why use IPv4 before IPv6, is this a bug or a premeditated decision by telegram team? |
@michelolvera read the thread, it was explained |
@ilya-fedin so this decision will not change? It has been 5 years and it seems to me that the adoption of IPv6 has increased considerably, or if someone sends a PR with this functionality, do you think it would be accepted? |
@michelolvera I guess if someone sends a PR that implements this in a way that won't add connection problems (the mentioned RFC6555 apparently) then @john-preston won't be against that, but better to ask himself, maybe it's still blocked by server admins or something else... |
Any news about the issue? It was first reported in 2016 when IPv6 adoption rate was 16%, now we live in 2022 where adoption world-wide is 42%. It's kinda dumb to use IPv4 when I have an IPv6 connection. |
No one volunteers for implementing RFC6555 in tdesktop |
It is almost 2024 and there is no reason to perfer IPv4 over IPv6, especially in tdesktop user still need to toggle a switch to enable IPv6. For tdesktop's connect test, if user does not have a routable IPv6 address, onDisconnect will be called promptly to fallback to another connection. If user's IPv6 connection is somehow filtering out connection to telegram's server, it will wait until kWaitForBetterTimeout and then fallback to another connection. This implementation is actually in spirit of happy eyeballs recommandation. Fixes: telegramdesktop#2198 Signed-off-by: Jiaxun Yang <[email protected]>
Steps to reproduce
Expected behaviour
It should stick to IPv6 if its available and not crippled, similar to happy eyeballs RFC6555
Actual behaviour
Always prefers IPv4, only disabling IPv4 make it stick to IPv6.
Configuration
Xubuntu 16.04
4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
v 0.9.56 alpha
Logs
startup log
https://gist.github.com/nshopik/31528efa4cce7dbccdd7d99f5ef9e862
The text was updated successfully, but these errors were encountered: