PurpleI2P / i2pd

🛡 I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website
BSD 3-Clause "New" or "Revised" License
3.25k stars 422 forks source link

IPv6 disabled by default #1965

Open juliaszone opened 1 year ago

juliaszone commented 1 year ago

Hi, I've found IPv6 to be disabled by default in I2Pd which is a shame in my eyes. IPv6 is very important for the growth of the internet and I2P network. We're approaching the point where IPv6 is becoming more and more widespread, so I believe ipv6=true should be the default.

Unfortunately, I don't know how I2Pd will behave on clients that do not have IPv6 connectivity, so this might be a good idea to look into. If it might break connectivity for those legacy clients it might be good to wait for a patch. I might be able to do some testing here later.

https://github.com/PurpleI2P/i2pd/blob/7b6aa41ca8dc3ca2a0c9d01ff9870794ad98e403/contrib/i2pd.conf#L77C13-L77C13 https://i2pd.readthedocs.io/en/latest/user-guide/configuration/#general-options

r4sas commented 1 year ago

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

wipedlifepotato commented 1 year ago

IPv6 is trash

juliaszone commented 1 year ago

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

@r4sas Google reported 45.28% adoption globally on clients about 2 days ago, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

juliaszone commented 1 year ago

IPv6 is trash

@wipedlifepotato This is not useful in any way. Please consider withholding yourself from this conversation.

wipedlifepotato commented 1 year ago

https://www.google.com/intl/en/ipv6/statistics.html Ok there is a better way to see where is ipv6 чт, 7 сент. 2023 г., 04:09 Julia Logan @.***>:

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

Google reported 45.28% adoption globally on clients, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

— Reply to this email directly, view it on GitHub https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709121418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ6637NLBPZDBYTATENDG3XZDQ7JANCNFSM6AAAAAA4GV4AEQ . You are receiving this because you commented.Message ID: @.***>

wipedlifepotato commented 1 year ago

In some countries is really popular maybe there is not a trash. Yet much countries not a have ipv6. If we want to check exists ipv6 or no we can to create option "auto" and set up this option by default

чт, 7 сент. 2023 г., 10:02 Aleksandr Aleksandr @.***>:

https://www.google.com/intl/en/ipv6/statistics.html Ok there is a better way to see where is ipv6 чт, 7 сент. 2023 г., 04:09 Julia Logan @.***>:

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

Google reported 45.28% adoption globally on clients, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

— Reply to this email directly, view it on GitHub https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709121418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ6637NLBPZDBYTATENDG3XZDQ7JANCNFSM6AAAAAA4GV4AEQ . You are receiving this because you commented.Message ID: @.***>

wipedlifepotato commented 1 year ago

Not have an ipv6/don't have ipv6/...

чт, 7 сент. 2023 г., 10:05 Aleksandr Aleksandr @.***>:

In some countries is really popular maybe there is not a trash. Yet much countries not a have ipv6. If we want to check exists ipv6 or no we can to create option "auto" and set up this option by default

чт, 7 сент. 2023 г., 10:02 Aleksandr Aleksandr @.***>:

https://www.google.com/intl/en/ipv6/statistics.html Ok there is a better way to see where is ipv6 чт, 7 сент. 2023 г., 04:09 Julia Logan @.***>:

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

Google reported 45.28% adoption globally on clients, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

— Reply to this email directly, view it on GitHub https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709121418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ6637NLBPZDBYTATENDG3XZDQ7JANCNFSM6AAAAAA4GV4AEQ . You are receiving this because you commented.Message ID: @.***>

wipedlifepotato commented 1 year ago

So in my country like even dont know what is ipv6 what is technology so for my country is a trash and dont will be yes by default

чт, 7 сент. 2023 г., 10:06 Aleksandr Aleksandr @.***>:

Not have an ipv6/don't have ipv6/...

чт, 7 сент. 2023 г., 10:05 Aleksandr Aleksandr @.***>:

In some countries is really popular maybe there is not a trash. Yet much countries not a have ipv6. If we want to check exists ipv6 or no we can to create option "auto" and set up this option by default

чт, 7 сент. 2023 г., 10:02 Aleksandr Aleksandr @.***

:

https://www.google.com/intl/en/ipv6/statistics.html Ok there is a better way to see where is ipv6 чт, 7 сент. 2023 г., 04:09 Julia Logan @.***>:

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

Google reported 45.28% adoption globally on clients, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

— Reply to this email directly, view it on GitHub https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709121418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ6637NLBPZDBYTATENDG3XZDQ7JANCNFSM6AAAAAA4GV4AEQ . You are receiving this because you commented.Message ID: @.***>

wipedlifepotato commented 1 year ago

So got it 👍 i mean information from your website about that you are love so much ipv6 ok

чт, 7 сент. 2023 г., 10:12 Aleksandr Aleksandr @.***>:

So in my country like even dont know what is ipv6 what is technology so for my country is a trash and dont will be yes by default

чт, 7 сент. 2023 г., 10:06 Aleksandr Aleksandr @.***>:

Not have an ipv6/don't have ipv6/...

чт, 7 сент. 2023 г., 10:05 Aleksandr Aleksandr @.***

:

In some countries is really popular maybe there is not a trash. Yet much countries not a have ipv6. If we want to check exists ipv6 or no we can to create option "auto" and set up this option by default

чт, 7 сент. 2023 г., 10:02 Aleksandr Aleksandr @.***

:

https://www.google.com/intl/en/ipv6/statistics.html Ok there is a better way to see where is ipv6 чт, 7 сент. 2023 г., 04:09 Julia Logan @.***>:

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

Google reported 45.28% adoption globally on clients, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

— Reply to this email directly, view it on GitHub https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709121418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ6637NLBPZDBYTATENDG3XZDQ7JANCNFSM6AAAAAA4GV4AEQ . You are receiving this because you commented.Message ID: @.***>

wipedlifepotato commented 1 year ago

Screenshot_2023-09-07-10-09-13-740_com ertelecom agent Can you see? In my country an internet provider try to sell wifi repeater by 8000 rubles and even dont know that is ipv6 so for my country i even wouldn't enable any technology if not exist practical need

wipedlifepotato commented 1 year ago

My network provider wrote: "Ipv6 нет в нашей стране , на сколько мне известно. У нас в городе и у Дом ру точно нет."

чт, 7 сент. 2023 г., 10:17 Aleksandr Aleksandr @.***>:

So got it 👍 i mean information from your website about that you are love so much ipv6 ok

чт, 7 сент. 2023 г., 10:12 Aleksandr Aleksandr @.***>:

So in my country like even dont know what is ipv6 what is technology so for my country is a trash and dont will be yes by default

чт, 7 сент. 2023 г., 10:06 Aleksandr Aleksandr @.***

:

Not have an ipv6/don't have ipv6/...

чт, 7 сент. 2023 г., 10:05 Aleksandr Aleksandr @.***

:

In some countries is really popular maybe there is not a trash. Yet much countries not a have ipv6. If we want to check exists ipv6 or no we can to create option "auto" and set up this option by default

чт, 7 сент. 2023 г., 10:02 Aleksandr Aleksandr < @.***>:

https://www.google.com/intl/en/ipv6/statistics.html Ok there is a better way to see where is ipv6 чт, 7 сент. 2023 г., 04:09 Julia Logan @.***>:

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

Google reported 45.28% adoption globally on clients, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

— Reply to this email directly, view it on GitHub https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709121418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ6637NLBPZDBYTATENDG3XZDQ7JANCNFSM6AAAAAA4GV4AEQ . You are receiving this because you commented.Message ID: @.***>

wipedlifepotato commented 1 year ago

Qwertyaa aaaaa i see that you are from sect of ipv6 but yet ipv4 is enough for internet even for china so and if in reddit someone wrote something this not always reality you will know and about a mind point if i think that a trash then that for a me a trash ok but is not absolutely true

чт, 7 сент. 2023 г., 12:22 Aleksandr Aleksandr @.***>:

My network provider wrote: "Ipv6 нет в нашей стране , на сколько мне известно. У нас в городе и у Дом ру точно нет."

чт, 7 сент. 2023 г., 10:17 Aleksandr Aleksandr @.***>:

So got it 👍 i mean information from your website about that you are love so much ipv6 ok

чт, 7 сент. 2023 г., 10:12 Aleksandr Aleksandr @.***

:

So in my country like even dont know what is ipv6 what is technology so for my country is a trash and dont will be yes by default

чт, 7 сент. 2023 г., 10:06 Aleksandr Aleksandr @.***

:

Not have an ipv6/don't have ipv6/...

чт, 7 сент. 2023 г., 10:05 Aleksandr Aleksandr < @.***>:

In some countries is really popular maybe there is not a trash. Yet much countries not a have ipv6. If we want to check exists ipv6 or no we can to create option "auto" and set up this option by default

чт, 7 сент. 2023 г., 10:02 Aleksandr Aleksandr < @.***>:

https://www.google.com/intl/en/ipv6/statistics.html Ok there is a better way to see where is ipv6 чт, 7 сент. 2023 г., 04:09 Julia Logan @.***>:

so I believe ipv6=true should be the default

No. Less than 10% of users still have IPv6 with their ISPs.

Google reported 45.28% adoption globally on clients, either way, client adoption should not be a factor. Clients that already have native connectivity should be able to use it out of the box. Only this really drives use, not many will go through config files.

— Reply to this email directly, view it on GitHub https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709121418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ6637NLBPZDBYTATENDG3XZDQ7JANCNFSM6AAAAAA4GV4AEQ . You are receiving this because you commented.Message ID: @.***>

juliaszone commented 1 year ago

My point is not to disable IPv4, but to enable IPv6 so that clients can use it if they have it. I was referring to a Reddit post because it is not that easy to go to historical dates on the graph. (The graph tends to fluctuate a lot from day to day) While some countries do unfortunately lack in IPv6 (which I am also totally aware of and which honestly sucks), it's important to consider global trends and how quickly this is shifting. IPv4 is starting to become less necessary for daily use (in some countries at least - for example, in many countries you can play Minecraft with your friends simply using IPv6). China aims to go single stack IPv6 by 2030 and the US Government has a mandate for 2025 (but only for it's own organs IIRC). The current best plan is to go dual stack (meaning IPv4 parallel to IPv6) until IPv6 penetration is high enough to phase out IPv4 on a wide scale. The following check might be a good solution: if ipv4 and ipv6 config options are set to auto, it would be possible for the node to try connecting to an IPv4 node and an IPv6 node every few minutes and the node would set its preferences accordingly.

wipedlifepotato commented 1 year ago

IC (Information Culture) is a term that describes various organizations, groups or systems that are driven by ideologies and goals other than those they claim to be. In this case, the religious mask of IK is considered. Here are a few key differences between religion and IC:

  1. Purpose: Religion offers salvation from the mundane and calls for service and faith in God, while IC offers salvation through techniques and mastery of the teachings of the leader.

  2. Faith: Religion calls to believe in the supernatural and unearthly, while IC calls to believe in a leader and obey his laws.

  3. Judge: In religion, the judge is God within each person, represented by conscience, while in IC, the leader is the judge, and conscience is considered delusion.

  4. Miracles: Miracles in religion are aimed at approaching salvation and are not connected with the satisfaction of earthly desires. In IC, miracles are ordered and performed to confirm the power of the leader and satisfy simple needs.

  5. Attitude towards others: Religion calls for love for people and tolerance for their delusions. In IC, people's differences are seen as a challenge, and non-Christians may be squeezed out of life or treated as "underdeveloped".

  6. Family: Religion deifies the family and calls for its preservation. In IC, the family is seen as a competitor in the struggle for prosperity and life, and can be discredited as a source of negative influence.

I hope this helps you better understand the differences between a religious mask and IR. If you have any more questions, I'll be happy to help!

^^^ by gpt so i just want to say that i think that your mind is occupied by sect because unconsciously you are looking for the association of people to feel safe and yet this idea about ipv6 not a bad or not a good ... i thnk that have not be main focus like another things

Yet I think that ipv6 is just information-trash like tiktok/youtube/another things for a now this is just a thing that allow not think about that we are all going to dead... And on your street some people need a help maybe even evtanasia

Vort commented 1 year ago

I think main question here is how hard to implement autodetection for ipv4 and ipv6. Enabling ipv6 when user have no IPv6 available is bad decision I think.

juliaszone commented 1 year ago

I think main question here is how hard to implement autodetection for ipv4 and ipv6. Enabling ipv6 when user have no IPv6 available is bad decision I think.

I'm going to do some tests on figuring out whether ipv6=true causes issues on an IPv4 only network and vice versa.

juliaszone commented 1 year ago

@wipedlifepotato What does this have to do with anything? This is not some cult or ideology, it is a technical necessity. IPv6 is a response to the limitations of IPv4. And how is it "information-trash"? You're comparing an internet protocol to social media platforms and religion?

wipedlifepotato commented 1 year ago

https://github.com/wipedlifepotato/i2pd/commit/0c3d44456f1109a951c4ee37f82128d9b58b156c Some can do a test? I dont have ipv6 or a tunnel. Add to code where is ipv6 is true or false debug msg

wipedlifepotato commented 1 year ago

And there is not enough test of ipv6 supports, maybe I did run thing like yggdrasil or ... Need just a connect to some server of ipv6 maybe peer and check if this works. so there is ^^^ preusodocode that can to help i dont have ipv6 and dont have a tunnel

wipedlifepotato commented 1 year ago

there is exists i2p::context.GetTestingV6() so my code is a trqash

If we do connection of ipv6 to google as example then is give to provider information or idea that some use i2pd but yes reseed... but resseed can be got by a file

wipedlifepotato commented 1 year ago

And there is a trouble with add_options if more correctly there is will be some any_type for value

wipedlifepotato commented 1 year ago

So, do your idea of populisation of ipv6 need to change realization of ipv6 or set TRUE for all nodes what a for? Which for a now there is meaning? Why is this action better than running a squirrel in a wheel There asks can to help understand why " And how is it "information-trash"? You're comparing an internet protocol to social media platforms and religion?"

wipedlifepotato commented 1 year ago

We will to change files: libi2pd/Reseed.cpp

wipedlifepotato commented 1 year ago

If just enable true to ipv6 when ipv6 is not works in system all works fine but in logs will be much of warns about not establish connection

17:32:59@905/error - SSU2: Send exception: Network is unreachable to [X:5a84:X:800:X:adcf:X:X]:29294 17:32:59@376/warn - NetDb: Destination foBqznqgMaQBnG2tcxznCBwrvl-5zxbQ1OPDRUfmkaQ= is requested already 17:33:00@968/warn - NTCP2: SessionCreated read error: End of file 17:33:00@376/warn - Profiling: No profile yet for fsEbz16WZfml3b54uTr7LCLytOBwNIaZ~yRTyQOJlNQ= 17:33:04@905/warn - SSU2: Session with [X:X:X:X:X:X:X:X]:29294 was not established after 5 seconds 17:33:05@905/error - SSU2: Send exception: Network is unreachable to [X:X:X:8d::1]:2551 17:33:05@905/error - SSU2: Send exception: Network is unreachable to [X:X:28c:2b0b:X:7c1d:848f:X]:38320 17:33:05@905/error - SSU2: Send exception: Network is unreachable to [X:X:d180:X:10b5:4da4:X:X]:24825 17:33:05@905/error - SSU2: Send exception: Network is unreachable to [X:f3:X:4400:c21f:X:X:X]:17380 17:33:05@905/error - SSU2: Send exception: Network is unreachable to [X:4000:X:X::1]:45533

wipedlifepotato commented 1 year ago

https://github.com/wipedlifepotato/i2pd/commit/0c3d44456f1109a951c4ee37f82128d9b58b156c If we going to a way simmilar to that I wrote in my code then need to change a much of documentation where is was before true/false params If we going to a way with boost::any we will to write a more code If we going to a way with enable ipv6 by default we get much of errors in logs if not exists ipv6 in system If we going to a way with check ipv6 works or no then we can to give internet provider idea that we use ipv6 (or no, need a think) If we going to a way don't change anything and say that who is want then enable ipv6 in config then not need to change anything and i2pd is continue works fine. For a now we will change our focus to speed of i2p network and maybe search a some vuln or etc but why we will change a focus to ipv6? Why is not just a trash [... .. .. ... . .. cafebaba:baba:dead:cafe], yes is looks to cool but where is practical use for a now china where is will be popular i2pd or north kora.... not exists even ipv6 there is not a need need a invisible protocol not cafebaba this is my idea and why i wrote that is a just trash

wipedlifepotato commented 1 year ago

I have a idea! We can to create a tool in i2pd-tools that to generate config file for i2pd. And runs this tool in first launch or when we do reseed check if ipv6 works and just change in config file false to true for ipv6 by default. This is a really easy way. Why not. So, need to idea how to better check if ipv6 is works. Connect to a ipv6 server can be but maybe an another idea?

There is a problem... Some people maybe really don't want to use ipv6 address and when someone be restart the i2pd by this a way someone will rewrite option that false. So a tool maybe is a better way or an auto option

wipedlifepotato commented 1 year ago

@juliaszone can you test this changes - https://github.com/PurpleI2P/i2pd/pull/1966 please

wipedlifepotato commented 1 year ago

https://github.com/PurpleI2P/i2pd/issues/1965#issuecomment-1709924289

So, my bad there is not need boost::any

juliaszone commented 1 year ago

So, do your idea of populisation of ipv6 need to change realization of ipv6 or set TRUE for all nodes what a for? Which for a now there is meaning? Why is this action better than running a squirrel in a wheel

IPv6 will become more popular in I2P network, so the network will be more resilient and redundant on the modern protocol.

If we going to a way don't change anything and say that who is want then enable ipv6 in config then not need to change anything and i2pd is continue works fine. For a now we will change our focus to speed of i2p network and maybe search a some vuln or etc but why we will change a focus to ipv6? Why is not just a trash [... .. .. ... . .. cafebaba:baba:dead:cafe], yes is looks to cool but where is practical use for a now china where is will be popular i2pd or north kora.... not exists even ipv6 there is not a need need a invisible protocol not cafebaba this is my idea and why i wrote that is a just trash

Sure, maybe IPv6 isn't super important. You can give issues higher or lower priorities. I just thought of bringing this issue up rather than leaving it sit undiscovered. The raising of this issue shouldn't (and doesn't) prevent the discovery of security vulnerabilities (which are often found on accident) or speed improvements (ISP data caps and bandwidth limits greatly limit this anyways). Fun fact, as IPv6 doesn't necessarily need NAT it might actually be faster for people in many countries. In china many use IPv6 too and well, I don't think anyone's gonna use I2P in North Korea, let's be real. The point of IPv6 is not to look cool either, those addresses are just possible thanks to hexadecimal (hexspeak). As said before, it's point is to address limitations of the legacy IPv4 protocol, which even Vint Cerf (often seen as Father of the Internet) describes as experimental.

I have a idea! We can to create a tool in i2pd-tools that to generate config file for i2pd. And runs this tool in first launch or when we do reseed check if ipv6 works and just change in config file false to true for ipv6 by default. This is a really easy way. Why not. So, need to idea how to better check if ipv6 is works. Connect to a ipv6 server can be but maybe an another idea?

Well, I don't know how many people use the tool, but it might be better to have options like "auto", "false", "true" and have the default "auto".

There is a problem... Some people maybe really don't want to use ipv6 address and when someone be restart the i2pd by this a way someone will rewrite option that false. So a tool maybe is a better way or an auto option

Yeah, this is why I feel like both defaulting to "auto" with a "false" if you really don't want to use it or if there is a problem with your ISP and a "true" if you want to force it and the auto check has some trouble detecting it properly.

@juliaszone can you test this changes - #1966 please

Alright, give me some time and I will get back to you

agowa commented 8 months ago

Any update on this? This ticket has been dormant for almost half a year now. I couldn't see any problems with having ipv6 = true, esp because almost everywhere in the code ipv4 and ipv6 are already independent of each other. This can also be seen when either of them fails e.g. because of firewalling or NAT reasons. The other may succeed independently and as long as at least one of them is successful we've connectivity to the swarm.

The only issue I can see is in regards to having multiple IPv6 addresses on the interface and address selection, but that technically also applies to IPv4. Also the worst case would be a non working ipv6 circuit. I.E. the same as right now with ipv6 = false. So enabling it by default shouldn't have a significant impact.

juliaszone commented 7 months ago

Any update on this? This ticket has been dormant for almost half a year now. I couldn't see any problems with having ipv6 = true, [...]

The issue is that IPv6 is disabled by default and IPv4 enabled by default, there is no detection mechanism on what connectivity the host has. Is it dualstack or IPv6 only then you need to enable IPv6 and or disable IPv4. Making IPv6 enabled by default will increase the amount of IPv6 capable nodes and make the network more future proof. I currently cannot work on this, as I do not have a Laptop as of today.

agowa commented 7 months ago

@juliaszone I think you misunderstood my last post. I was also advocating for enabling IPv6 by default. And my argument was that when you right now enable IPv6 even though there is none it won't suddenly impact IPv4. Therefore there is nothing speaking against changing the default to enabling IPv6 as well.

juliaszone commented 2 months ago

Any update on this? This ticket has been dormant for almost half a year now. I couldn't see any problems with having ipv6 = true, esp because almost everywhere in the code ipv4 and ipv6 are already independent of each other. This can also be seen when either of them fails e.g. because of firewalling or NAT reasons. The other may succeed independently and as long as at least one of them is successful we've connectivity to the swarm.

The only issue I can see is in regards to having multiple IPv6 addresses on the interface and address selection, but that technically also applies to IPv4. Also the worst case would be a non working ipv6 circuit. I.E. the same as right now with ipv6 = false. So enabling it by default shouldn't have a significant impact.

Only thing I can observe is the following: I have set ipv6 and ipv4 to true... IPv6-only:

21:41:52@869/error - SSU2: Send exception: Bad file descriptor to #.#.#.#:#
21:41:53@869/warn - SSU2: Data message payload is too short 5
21:41:57@869/warn - SSU2: Session with #.#.#.#:# was not established after 5 seconds
21:46:53@895/error - SSU2: Send exception: Network is unreachable to #.#.#.#:#

But it would connect to IPv6 nodes, even after a reinstall and purge of /var/lib/i2pd. IPv4-only saw similar behaviour. I guess both can be enabled by default, but it will show errors for people on IPv4 and IPv6 only networks, which might result in currently IPv4-only people to turn IPv6 off, and once they get IPv6, forget they ever disabled it. It would still be nice to have some detection, when setting ipv4 and ipv6 to auto, possibly by checking the default routes existence on v4 and v6, or maybe checking the IP families on the interface. But then one would have to exclude non-public IP addresses like the link local addresses... NAT64 detection via ipv4only.arpa would also be nice, but not a must-have I'd guess...

agowa commented 2 months ago

It would still be nice to have some detection, when setting ipv4 and ipv6 to auto,

why? How about just doing Happy Eyeballs or Multi-Homing?

possibly by checking the default routes existence on v4 and v6,

Doesn't work, as you do not need a default route for connectivity esp. on Servers in the internet (e.g. BGP full table), also this is probably annoying to fully implement too. E.g. did you know that you can have a IPv4 default route with an IPv6 next-hop/gateway? Also considering (privacy-)VPNs you've countless different ways they overwrite the default route (and some delete the original default route too).

e.g.:

::/1 dev tun0
8000::/1 dev tun0
2001:DB8:1::1 dev eth0
2001:DB8:FF::27/128 via 2001:DB8:1::1 dev eth0

or

2000::/3 dev tun0
2001:DB8:1::1 dev eth0
2001:DB8:FF::27/128 via 2001:DB8:1::1 dev eth0

or maybe checking the IP families on the interface.

Also doesn't work, did you know that you can have a perfectly working network connectivity without any IP on the interface? Configure e.g. 192.0.2.27/32 on lo1 and add a routing table entries:

default via 203.0.113.1 dev eth0
203.0.113.1/32 dev eth0

But then one would have to exclude non-public IP addresses like the link local addresses...

Well, the above is also true for IPv6, so this doesn't work, as not having a GUA on eth0 and no default route do not clearly indicate the absence of IPv6 connectivity.

And all of this flexibility and complexity is why we have RFCs that describe how to handle and implement these things and why in general everyone relies upon the OS APIs for connectivity check (which on the other hand also almost always just try connecting to a webserver endpoint) or implement something similar them selves (like Mozilla). And we didn't even go into things like captive portals and similar...

Also none of these are unusual configurations for servers, which is where I'm running i2pd for example. (And some cloud providers, that some people use and I moved away from, have really messed up networking designs, like one didn't show any routing or ip to the guest but also worked somehow)

NAT64 detection via ipv4only.arpa would also be nice, but not a must-have I'd guess...

Compared to your other suggestions this is the only one that isn't going to fail in 9/10 cases outside of home user networks

(also don't forget about university dormitories, which often are just extensions of the on-campus networks and I'd assume still a lot of people running stuff like I2P or Tor are in such networks).

juliaszone commented 2 months ago

why? How about just doing Happy Eyeballs or Multi-Homing?

How would you go on implementing happy eyeballs without knowing what IPv6 belongs to which IPv4? Happy eyeballs is made for domain names

Doesn't work, as you do not need a default route for connectivity esp. on Servers in the internet (e.g. BGP full table), also this is probably annoying to fully implement too. E.g. did you know that you can have a IPv4 default route with an IPv6 next-hop/gateway? Also considering (privacy-)VPNs you've countless different ways they overwrite the default route (and some delete the original default route too).

makes sense, but I thought, most people have a default gateway, so yeah

Also doesn't work, did you know that you can have a perfectly working network connectivity without any IP on the interface? Configure e.g. 192.0.2.27/32 on lo1 and add a routing table entries: Well, the above is also true for IPv6, so this doesn't work, as not having a GUA on eth0 and no default route do not clearly indicate the absence of IPv6 connectivity.

Well, we could've checked the interface the user specified, or all interfaces

Also none of these are unusual configurations for servers, which is where I'm running i2pd for example. (And some cloud providers, that some people use and I moved away from, have really messed up networking designs, like one didn't show any routing or ip to the guest but also worked somehow)

I'm curious as to how that worked...

(also don't forget about university dormitories, which often are just extensions of the on-campus networks and I'd assume still a lot of people running stuff like I2P or Tor are in such networks).

What about them?

agowa commented 2 months ago

How would you go on implementing happy eyeballs without knowing what IPv6 belongs to which IPv4? Happy eyeballs is made for domain names

Well you don't need to know. Basically just try all of them simultaneously...

I'm curious as to how that worked...

I suspect it was some Virtuozzo screwup with some hooked/restricted syscalls for isolating tenants instead of actually having one dedicated VM for everyone (think containers, but before docker existed)... Tbh I didn't really look into it that closely and just moved to another provider esp. because I also ran into inode limits that broke everything...

What about them?

Just a note that they're more closely assembling datacenter networks than typical home networks. That's all.