https-everywhere icon indicating copy to clipboard operation
https-everywhere copied to clipboard

[Idea] Tor Onion services

Open frafra opened this issue 10 years ago • 19 comments

Some websites are providing access as a Tor Onion service, like:

  • DuckDuckGo - http://3g2upl4pq6kufc4m.onion/
  • Facebook - https://facebookcorewwwi.onion/
  • Tor Project - http://bt3ehg7prnlm6tyv.onion/
  • Wikileaks - http://gjlng65kwikileax.onion/

Roger Dingledine (original developer of Tor along with Nick Mathewson and Paul Syverson) says something like "Tor Onion services vs HTTPS only websites is like HTTPS vs HTTP few years ago". -- https://media.ccc.de/v/32c3-7322-tor_onion_services_more_useful_than_you_think#video&t=1041

I think it would be cool to have an option in HTTPS Everywere which instead of replacing http:// with https:// could replace the domain with the equivalent .onion domain.

I submitted a new issue on https-everywhere because I know this program is a collaboration between EFF and The Tor Project and the aim is to making browsing more secure, so I think there could be an interest for this kind of feature.

HTTPS Everywhere is a Firefox, Chrome, and Opera extension that encrypts your communications with many major websites, making your browsing more secure. [...] HTTPS Everywhere is produced as a collaboration between The Tor Project and the Electronic Frontier Foundation. -- https://www.eff.org/https-everywhere

Would it makes sense to you? Or do you think it would be better to develop a different project, maybe using the same codebase of https-everywhere?

frafra avatar Jan 07 '16 11:01 frafra

If you have it as a separate project and the user runs both addons i see a conflict of rewrites, Having it in HTTPS-Everywhere needs a way to figure out if TOR is active, since otherwise the redirects are useless. Maybe implement it as an extra platform-tag?

numismatika avatar Jan 09 '16 08:01 numismatika

I would prefer to integrate such feature in HTTPS Everywhere if possible.

platform="tor" looks goods:

Note: This should be something like platform=tor, to indicate that these rules should not go through the fetch tester on the non-Tor Internet because they will fail. As an approximation to that, we just use platform="mixedcontent", since Tor Browser is a mixedcontent platform, and the https-everywhere-checker will skip non-default platforms.

platform="mixedcontent" is currently used by Tor Browser only:

To enable a rule only on platforms that allow mixed content (currently only the Tor Browser), you can add a platform="mixedcontent" attribute to the ruleset element.

Platform is currently selected by checkMixedContentHandling during initialization. We could just append |tor to localPlatformRegexp if Tor is on.

Tor is considered enabled if testProxySettings sets proxy_test_successful to true. It uses https://check.torproject.org/, but what if Tor is on but check.torproject.org is off or there's a temporary connection issue?

Here's my proposal:

  1. Add "tor" to localPlatformRegexp if testProxySettings says that Tor is on
  2. Replace platform="mixedcontent" with platform="tor" in src/chrome/content/rules/*.onion.xml
  3. Create new ruleset with platflatform="tor" in order to rewrite domains with theirs .onion counterparts if they exist
  4. Enhance testProxySettings: testing an .onion service and/or allow to override the test with a parameter (optional)

frafra avatar Jan 09 '16 11:01 frafra

This may make things a bit slower. Although this is a great idea I would defiantly like to see this added.

zero77 avatar Jan 10 '16 12:01 zero77

There actually was a fork for that: https://github.com/chris-barry/darkweb-everywhere

fuglede avatar Jan 15 '16 21:01 fuglede

Referring to the discussion in #7094 and #5085 we won't redirect from public hosts to hidden ones. To redirect http to https on .onion hosts we need to update our tests (see patches provided in #5085).

J0WI avatar Sep 27 '16 21:09 J0WI

Tor Browser already included HTTPS Everywhere by default. How about adding a new function to detect the browser? If the user is using Firefox, redirect to https. If not, redirect to .onion.

My pull request have 3 URLs: http, https, onion. https://github.com/EFForg/https-everywhere/pull/11009

ghost avatar Jul 11 '17 03:07 ghost

@UsernameLoginIsAlreadyTaken

Tor Browser already included HTTPS Everywhere by default. How about adding a new function to detect the browser? If the user is using Firefox, redirect to https. If not, redirect to .onion.

Some of Tor Project devs already "discussed with the HTTPS everywhere people over the years, but it's unclear whether the team has the firepower and energy to handle such a task, or whether it's worth it at all.

As an alternative here is a more general and abstract approach to solving the UX problem: https://lists.torproject.org/pipermail/tor-dev/2016-October/011514.html" https://lists.torproject.org/pipermail/tor-talk/2017-March/043027.html

HTTPSNowhere avatar Jul 13 '17 11:07 HTTPSNowhere

Following @Hainish's comment in https://github.com/EFForg/https-everywhere/issues/10007#issuecomment-321595470:

TB no longer enables platform="mixedcontent" rules. See trac.torproject.org/projects/tor/ticket/21323

I did some testing and onion rules are indeed disabled. This means platform="tor" is now necessary for those rules.

Bisaloo avatar Aug 10 '17 17:08 Bisaloo

That would be harder to test too.

ghost avatar Aug 10 '17 17:08 ghost

I think we should have this preference order (for Tor Browser only): HTTPS over .onion > HTTPS > HTTP over .onion > HTTP

ghost avatar Aug 10 '17 17:08 ghost

@Bisaloo Does that mean we can delete all platform="mixedcontent" rules?

ghost avatar Aug 10 '17 17:08 ghost

No, users may still want to enable them. This simply means that platform="mixedcontent" rulesets are now considered default_off by all browsers.

Bisaloo avatar Aug 10 '17 17:08 Bisaloo

@Bisaloo Are you completely sure we still need them? These websites are broken with mixed content blocking on and disabling mixed content blocking is a security risk.

ghost avatar Aug 10 '17 18:08 ghost

@koops76, please refer to https://github.com/EFForg/https-everywhere/issues/9971 for a more detailed discussion about platform="mixedcontent" rulesets.

Bisaloo avatar Aug 10 '17 18:08 Bisaloo

I don't see why we need a platform attribute at all for .onion URLs. The worst thing that happens is someone who enters an onion URL such as http://facebookcorewwwi.onion is redirected to https://facebookcorewwwi.onion in a normal browser. In either case, the resolution fails. So what's the advantage here?

I think we should just remove platform='mixedcontent' from onion rulesets. It seems a little hacky, anyway. The only reason we're calling these rulesets mixedcontent is because then they will redirect within the Tor Browser, not because they actually have mixed content on that page.

Hainish avatar Aug 10 '17 20:08 Hainish

@Hainish I think a platform would still be helpful to pass out fetch tests. We had a PR about this, but I can't find it anymore.

Edit: Got it :) #5085 And this is also related: #11806

J0WI avatar Aug 10 '17 21:08 J0WI

@J0WI Or we could just access all domains that end in .onion over Tor during the fetch test.

ghost avatar Aug 10 '17 22:08 ghost

#11988

ghost avatar Aug 19 '17 14:08 ghost

@J0WI thanks for the tip. I'm going to close this issue for the reasons described above in https://github.com/EFForg/https-everywhere/issues/3798#issuecomment-249998001

Hainish avatar Aug 23 '17 00:08 Hainish