mtgatool / mtgatool-desktop

https://mtgatool.com
GNU General Public License v3.0
87 stars 5 forks source link

Wishlist: Enable IPv6 for DHT / decentralized storage #50

Open T-X opened 1 year ago

T-X commented 1 year ago

I really like the idea of decentralized storage! However in the settings under Network->Peers I usually only see one peer, namely "api.mtgatool.com". So that seems to make this feature quite centralized again?

At least on Linux it seems that mtgatool-desktop only listens on an IPv4 UDP socket:

$ sudo netstat -tulpen | grep mtgatool | head -n1
udp        0      0 192.168.3.47:49850      0.0.0.0:*                           1000       2225250    332303/mtgatool-des
udp        0      0 192.168.3.47:49867      0.0.0.0:*                           1000       2221187    332303/mtgatool-des 
udp        0      0 192.168.3.47:33555      0.0.0.0:*                           1000       2218923    332303/mtgatool-des 
udp        0      0 192.168.3.47:49946      0.0.0.0:*                           1000       2222378    332303/mtgatool-des
...
udp        0      0 224.0.0.251:5353        0.0.0.0:*                           1000       2223457    332303/mtgatool-des 
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1000       2202378    332210/mtgatool-des 
udp        0      0 224.0.0.251:5353        0.0.0.0:*                           1000       2220621    332303/mtgatool-des
...

So I guess all peers are currently hidden behind IPv4 NATs? It would be great if the mtgatool-desktop could exchange packets over IPv6, too. That way we should see a lot more peers.

T-X commented 1 year ago

Hm, maybe this is actually a network issue on my side. I noticed that on a different WiFi network I actually do get udp6 sockets in netstat for mtgatool-desktop.

Although the WiFi network I initially tried also has working IPv6, I can ping6 and browse IPv6 websites, it might be that this Fritz!Box Wifi router filters incoming IPv6 or IPv6 UDP more strictly.

Does mtgatool-desktop only open IPv6 UDP sockets after some bidirectional connectivity check?