Skip to content
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

IPv6 #148

Closed
kseistrup opened this issue Sep 6, 2015 · 82 comments
Closed

IPv6 #148

kseistrup opened this issue Sep 6, 2015 · 82 comments

Comments

@kseistrup
Copy link
Contributor

Please support IPv6.

@koalalorenzo
Copy link

+1

@HelloZeroNet
Copy link
Owner

The problem is the torrent trackers only support ipv4 addresses, so need to find an alternative solution to store ipv6 (and tor) addresses.

@ghost
Copy link

ghost commented Sep 14, 2015

I'm currently only using v4, but it looks like there is a BitTornado option to support v6

http://www.cs.helsinki.fi/u/sklvarjo/torrent.html

@up4
Copy link

up4 commented Jul 30, 2016

I am working on something to make this easier: #520. Please check it out. Also, dumping BitTorrent trackers would be great in so many ways.

@iShift
Copy link
Contributor

iShift commented Sep 19, 2016

any progress?
@HelloZeroNet this support ipv6 https://www.ipv6tracker.org

@HelloZeroNet
Copy link
Owner

It's not on short-term plans yet. (next 6 month)

@kseistrup
Copy link
Contributor Author

kseistrup commented Nov 8, 2016

IAB Statement on IPv6 (7 November 2016):

We recommend that existing standards be reviewed to ensure they will work with IPv6, and use IPv6 examples.

@eleitl
Copy link

eleitl commented Jan 13, 2017

Another vote for IPv6 support. Reason: using ZeroNet on top of cjdns/Hyperboria which is an IPv6-only transport layer.

@alugarius
Copy link

@HelloZeroNet : ""It's not on short-term plans yet. (next 6 month)""
Narrator : ""7 months later...""
Me: "progress? "

@slothbag
Copy link

slothbag commented May 1, 2017

+1 for IPv6 support.. main reason is for CJDNS support.

@April93
Copy link

April93 commented May 3, 2017

I'm also interested in IPV6 support, to let ZeroNet run on cjdns/hyperboria. I might take a crack at it a bit later, but I honestly have no idea how involved it'd be. I'd personally be up for no trackers and just having bootstrap nodes/peer exchange if the issue is that trackers aren't ipv6. IIRC, as it stands zeronet can work even if you remove the trackers from the code, because it stores peer info. So it shouldn't be too difficult to migrate.

@sergei-bondarenko
Copy link
Contributor

@HelloZeroNet Please, add some labels on this issue, it's important issue.

@PeterCxy
Copy link

PeterCxy commented Nov 3, 2017

The problem is the torrent trackers only support ipv4 addresses, so need to find an alternative solution to store ipv6 (and tor) addresses.

I'm not sure about the situation when this comment was made, but isn't it true that we now have the ZeroNet bootstrap protocol? Is it possible that IPv6 support could be added to this protocol like how it was done for Tor hosts?

@HelloZeroNet
Copy link
Owner

Yes, with ZeroNet bootstrap protocol It's no longer a problem.

@xuefer
Copy link

xuefer commented Dec 17, 2017

is it possible to add ipv6 support for web ui first?

@HelloZeroNet
Copy link
Owner

HelloZeroNet commented Dec 19, 2017

I think the webui should work if you start it with --ui_ip youripv6address

@April93
Copy link

April93 commented Dec 21, 2017

Is this ready yet? How soon can we run it over cjdns? What all needs to be done?

@tangdou1
Copy link
Contributor

tangdou1 commented Mar 2, 2018

Here are the ipv6 tracker. Can it help?
udp://ipv6.tracker.harry.lu:80/announce
http://ipv6.tracker.harry.lu:80/announce
from
ngosang/trackerslist#72

@HelloZeroNet
Copy link
Owner

Yes, it can: were you able to find more?

@tangdou1
Copy link
Contributor

tangdou1 commented Mar 2, 2018

Ok. I found these now. Hope can help you.
http://0d.kebhana.mx:443/announce
udp://tracker.torrent.eu.org:451/announce
http://0d.kebhana.com.mx:443/announce
https://zer0day.000webhostapp.com:443/announce
udp://tracker.cypherpunks.ru:6969/announce
http://alpha.torrenttracker.nl:443/announce
https://1337.abcvg.info:443/announce
udp://free.open.tracker.0.starka.st:15480/announce
http://torrent.nwps.ws:80/announce
....
from https://newtrackon.com/

add
http://ipv6.torrent.ubuntu.com:6969/announce

@danimesq
Copy link
Contributor

@HelloZeroNet @shortcutme
What is needed to ZeroNet support IPV6 and run through mesh networks?

@April93
Copy link

April93 commented Aug 25, 2018

@DaniellMesquita well ZeroNet can already run over IPv4 mesh networks. To run over IPv6, last I checked it just needed to support the address format, and add in some IPv6 trackers (which some people listed above).

Shouldn't take long, but it's a matter of actually doing it.

@danimesq
Copy link
Contributor

danimesq commented Aug 25, 2018

@April93

well ZeroNet can already run over IPv4 mesh networks.

How? And which networks?

just needed to support the address format, and add in some IPv6 trackers

With IPv6, ZeroNet can support CJDNS/Hyperboria mesh networks.

@HelloZeroNet @shortcutme

@danimesq
Copy link
Contributor

Reference: hyperboria/todo#2

@April93
Copy link

April93 commented Aug 28, 2018

@DaniellMesquita ZeroNet works on anything with IPv4 support. Just follow the bootstrapping instructions to set up a ZN-based tracker on your mesh. That's it. As for what mesh networks are ipv4.... I don't really know, sorry. I've been waiting on ipv6 support so I can use it with cjdns and hyperboria.

With IPv6, ZeroNet can support CJDNS/Hyperboria mesh networks.

Indeed. That's why I'm eager for it.

@danimesq
Copy link
Contributor

@April93
WOW, is you running a CJDNS node?

@April93
Copy link

April93 commented Sep 3, 2018

Any progress on this yet?

@DaniellMesquita I'm able to connect to cjdns, but I don't have anyone routing through me.

@April93
Copy link

April93 commented Jan 23, 2019

Here's a public cjdns peer:

"198.58.100.240:22237": {
                       "login": "default-login",
                       "password":"pqr5brz16vzzu6vhjuj7tv3n078kr5f",
                       "publicKey":"ubbtkp0txwjh44v8kkznvhjqqwr1hd2jzv5ms9zlkfk25svxvtg0.k",
                       "peerName":"trnsz"
                    },

@tangdou1
Copy link
Contributor

tangdou1 commented Jan 24, 2019

just checked: actually right now the AnnounceShare only works with ipv4 address, I will fix it later today and also add an option to set the port open status manually.

Why I find three ipv6 tracker in the Shared trackers in my vps.

@danimesq
Copy link
Contributor

danimesq commented Jan 24, 2019

If needing more CJDNS peers, here's mine:

"your.external.ip.goes.here:38064": {
"login": "default-login",
"password":"61px0khpzurswncqbkxcnfx9y7xfsyk",
"publicKey":"c7zwm2ykn6kuxpvdd18j476bhxvl6wn494jkxpx8cvkbc0x4bsq0.k",
"peerName":"daniell"
},

IP: fc81:4668:5a19:0c29:9dfe:ed94:d745:85c9

Note: Why I need to provide an fixed IP address? That makes it centralized

@danimesq
Copy link
Contributor

To notice, I'm moving to Yggdrasil, so I'll report how it is working through ZeroNet.
@April93 how could I support both mesh networks?

@April93
Copy link

April93 commented Jan 24, 2019

Note: Why I need to provide an fixed IP address? That makes it centralized

You need an ip address to peer in cjdns just as you need an ip address to peer in zeronet. The method used to label your peer in cjdns doesn't need to be centralized. Ideally you'd have many peers, not just one.

To notice, I'm moving to Yggdrasil, so I'll report how it is working through ZeroNet.
@April93 how could I support both mesh networks?

I'm not sure how you'd run both on your machine at once. Perhaps just run them? I don't know. For ZN once generic ipv6 support is in, then afaik yggdrasil should work fine as well.

@kseistrup
Copy link
Contributor Author

Yggdrasil and cjdns runs fine side by side. I'm not sure how to make ZeroNet use them, though.

@kseistrup
Copy link
Contributor Author

@DaniellMesquita,

Why I need to provide an fixed IP address? That makes it centralized

Because otherwise peers won't know how to connect to your node and peer with it. If you didn't have any peers, your node would be just like a remote island that nobody knows exists. You need at least one peer.

@andrewheadricke
Copy link

andrewheadricke commented Jan 24, 2019

I think there is some mix up over the "fixed ip address" thing. The fixed ip address is referring to the IPv6 connectivity check built into ZeroNet. Personally I think it needs to be removed, or set to a configurable value because clearnet, cjdns, yggdrasil will all require separate values.

@andrewheadricke
Copy link

I have been trying to debug exactly why ZeroNet will not share IPv6 peers when running on cjdns/yggdrasil. It appears to have something to do with the tracker exchange. I have one ZN node seeding a few zites, and here is the data it shares with the tracker..

"61663994dfd1003cae8ce419187841cd8a769d34":{"infoHash":"61663994dfd1003cae8ce419187841cd8a769d34","complete":0,"incomplete":1,"peers":{"_events":{},"_eventsCount":1,"cache":{"[fc12:a215:d106:2ca8:98eb:cae2:550f:6ce7]:15328":{"value":{"type":"http","complete":false,"peerId":"2d5554333533302d454253464f52366557483550","ip":"fc12:a215:d106:2ca8:98eb:cae2:550f:6ce7","port":15328},"modified":1548333888817,"next":null,"prev":null}},"tail":"[fc12:a215:d106:2ca8:98eb:cae2:550f:6ce7]:15328","head":"[fc12:a215:d106:2ca8:98eb:cae2:550f:6ce7]:15328","length":1,"max":1000,"maxAge":1200000}}

The only anomalies I can spot is the IP address contains the [ ] brackets which could cause a problem, and also the torrent is flagged as "incomplete" instead of complete. Which means the torrent is considered as leeching and not seeding. Not sure if that could be the cause.

@HelloZeroNet
Copy link
Owner

Actually it doesn't matter if that IP is alive or not, because the function does not connects to it. (it's an UDP socket) It only used to test if the client's network stack has the ability to create a route towards to it.
We could add multiple ip addresses to it or as an alternative we can try to list the ip addresses on the network interface and use it to detect possible ipv6 support.

@HelloZeroNet
Copy link
Owner

I have modified the AnnounceShare to work with ipv6 addresses and support multiple ips in Rev3815 and added multiple public_ip support that is also configurable on /Config.
So if you add your cjdns ip to that field, then it should share your tracker on that ip with other users.

@April93
Copy link

April93 commented Jan 26, 2019

ZN seems to be accepting the cjdns ip fine now (setting the config option). Trying to connect to my own machine as a tracker still isn't working. With the cjdns ip it stays at 0%, while with the default 0:0:0etc one it fluctuates but ultimately fails.

Not sure if I'm doing something wrong with the bootstrapping or i just need to connect to someone else.

@andrewheadricke
Copy link

I just pulled down the latest revision and it hasn't really resolved anything for me. I can get my multi-homed node to register itself onto my external tracker, however the cjdns only node queries the tracker and finds no valid peers for 1HeLL0...

So not sure why it finds no valid peers, when the tracker clearly has valid peers. Will keep debugging.

@April93
Copy link

April93 commented Jan 26, 2019

If your node querying is cjdns-only and can't find peers, then the problem is that others aren't using cjdns, yeah? If you share your tracker others can help test :)

@andrewheadricke
Copy link

andrewheadricke commented Jan 26, 2019

Perhaps my external tracker is broken (i.e. doesn't work well with ZeroNet).

I now have a ZeroNet node on yggdrasil. And I am able to connect to it from a ygg only node, and it appears to be working.

So to make this work I had to comment out the check IPv6 function in src/File/FileServer.py as previously mentioned. I then enabled the Bootstrapper plugin on my multi-homed node. Then on the yggdrasil only node I added my tracker zero://200:a215:d106:2ca8:98eb:cae2:550f:6ce7:15328 or maybe just zero://200:a215:d106:2ca8:98eb:cae2:550f:6ce7 and it works (I did try this before and it didn't work so maybe the latest commits fixed it)

Obviously it will only download the zites that I am seeding, which is ZeroSites, ZeroUp, ZeroName, GIF Time, ZeroHello, ZeroBlog and ZeroNet documentation.

The UI is not able to render the IPv6 tracker correctly, it cuts it off at the first semi colon. But not a big issue. Also something Ipv6 related is stopping the /Stats page from rendering too.

@April93
Copy link

April93 commented Jan 26, 2019

It looks like the ipv6 you provided isn't a cjdns ip, so cjdns peers can't connect to it. I don't know about yggdrasil or native ipv6 as I don't have either of those.

The zerohello page definitely cuts off the text of the ipv6 addresses, but it clearly still functions (being detected elsewhere fine). I don't think that impairs anything other than visuals.

@andrewheadricke
Copy link

Yeah, that address is a yggdrasil address. Try this CJDNS address zero://fc18:83a4:7e42:9b85:9cc0:4936:fc33:5d75:15328

@April93
Copy link

April93 commented Jan 26, 2019

Great. Looks like it's connecting fine!

screen shot 2019-01-25 at 8 08 58 pm

Edit: There doesn't seem to be any peers besides me haha.

@danimesq
Copy link
Contributor

danimesq commented Jan 26, 2019

@April93 I suggest you to try Yggdrasil, and you can run it alongside CJDNS.
Ygg is more scalable and more stable. Also, you can communicate with both networks.
Btw, could you share your CJDNS tracker?

I'll push the new commits and do feedback about if the @andrewheadricke's CJDNS tracker is working.

@HelloZeroNet
Copy link
Owner

HelloZeroNet commented Jan 30, 2019

I did other improvements to IPv6 in the past days:

  • It will consider as opened port (even if the port open check fails) if you have a non-local ip on your computer. (otherwise it would not add the client to tracker's peer list)
  • Consider any ipv6 ip as external except that starts with fe80 https://github.com/HelloZeroNet/ZeroNet/blob/master/src/util/helper.py#L252
  • Support connecting to IPv6 using Tor/Socks proxy. (this way you can connect to ipv6 even if your isp does not supports it)
  • You can see the detected external ips on the /Stats page. It should list your cjdns/Yggdrasil ip and it should detect your ipv6 as opened
  • Fixed the ipv6 tracker display on ZeroHello

Maybe we can close this isssue now?

@andrewheadricke
Copy link

andrewheadricke commented Jan 30, 2019

For some reason my /Stats page wont load.. the console is showing some errors that I think are related.

[00:00:01] - UiWSGIHandler error: error: [Errno 32] Broken pipe in UiServer.py line 40 > pywsgi.py line 923 > pywsgi.py line 909 > pywsgi.py line 756 > pywsgi.py line 777 > pywsgi.py line 739 > pywsgi.py line 703 > _socket2.py line 354 > _socketcommon.py line 355 > _socketcommon.py line 284 > _socket2.py line 335
[00:00:54] - UiWSGIHandler error: TypeError: can't concat unicode to bytearray in UiServer.py line 40 > pywsgi.py line 923 > pywsgi.py line 909 > pywsgi.py line 752 > pywsgi.py line 736

@HelloZeroNet
Copy link
Owner

@andrewheadricke What OS are you using?
Also whats gevent version in your system? It should be in log/debug.log file if you search for Gevent

@andrewheadricke
Copy link

Ubuntu Linux. Gevent 1.3.6

@HelloZeroNet
Copy link
Owner

Thanks, I can confirm the error with gevent 1.3.6

@andrewheadricke
Copy link

I updated to gevent 1.4.0 and it seems the same problem exists.

@HelloZeroNet
Copy link
Owner

@andrewheadricke Fixed in Rev3831: c2b879c

@andrewheadricke
Copy link

Working well now, thanks.

I feel there are still a few small issues with IPv6 support, but technically its working and I have a 24/7 tracker online on Yggdrasil at zero://203:5871:3e33:413c:a824:cb7b:2604:92ab:24589 and it appears to be running fine.

I vote this issue can be closed :)

@April93
Copy link

April93 commented Jan 31, 2019

Yeah it's working great. This can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

17 participants