hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
154 stars 17 forks source link

Unable to reach Hype websites on some browsers #107

Open benhylau opened 8 years ago

benhylau commented 8 years ago

This is probably more of a IPv6 issue than a cjdns issue, but it keeps coming up when trying to browse to Hype sites.

On an Android phone running cjdns, I was able to access a website on Hype by typing the IPv6 address right into Firefox, but not with the domain. It just wouldn't do DNS and fails immediately. Running the following fixed it.

ip -6 route add default via fc00::1 dev tun0 metric 4096

In another instance, setting up cjdns on a Ubuntu laptop, Firefox worked completely fine (IPv6 address and DNS AAAA), but Chrome wouldn't load up the site either way. Yes, typing in the fc00::/8 address or domain both failed. Then running the above to add a default route fixed Chrome.

On yet another machine, this time OS X, I can browse Hype websites no problem using Chrome, but not Firefox. I haven't tried adding a default route. But is this something cjdroute can do by default?

cc. @cjdelisle @peterchu2

Kubuxu commented 8 years ago

It is long known issue with Chrome. Chrome (and Chromium) try calling home over IPv6 to confirm that IPv6 is up and running.

On Windows there is also in example issue that their recursive resolve will resolve AAAA entries but not CNAME pointing to AAAA. Workaround is to add phony Unique Local Address to main network interface. (see http://www.kubuxu.ovh/2015/12/dns-fix-for-windows/)

Something similar probably is happening with Android, it isn't cjdns issue nor IPv6's. It is issue of broken applications, DNS resolvers and thinking that 2000::/3 is global IPv6 network that will ever exist.

benhylau commented 8 years ago

Yes I realize that this is an application implementation issue, but since the major browsers (Chrome & Firefox) all have their issues, can we safely put a default route when launching cjdroute such that the browsers will think IPv6 is up and running.

The Windows issue would be a separate bug that we can't really do anything about.

benhylau commented 8 years ago

This is what I run on Android: https://github.com/hyperboria/android/pull/49/files#diff-93a51ddcd0bae0ec0ed4ba6dbfa7d818R165

But it seems doing this as part of cjdroute will solve the problem for other platforms too? I am not sure if this workaround could mess up other things.

rfree commented 8 years ago

About your ubuntu and Chrome, could you to test Chromium there?

Testing Chromium on Linux we seem to narrowed it down to:

chromium 48.0.2564.82 on Debian 8.3 (64-bit) - by IP6 works, but by domainname = error DNS_PROBE_FINISHED_NXDOMAIN

chromium 48.0.2564.116-1 - works both by IPv6 and by domain name

So I would hope that Chromium is a solved problem now (in recent enough version)

benhylau commented 8 years ago

^@peterchu2

PeterChu2 commented 8 years ago

On ubuntu, in the latest release of chromium, it still doesn't work. Needs the command above