1

IPFS has DNSLink and Dat has .well-known/dat for the autodiscovery of the content on their networks given a domain name (or a website in Dat's case).

So for instance, when a user visits http://facebook.com/ using Tor Browser Bundle, the browser can automatically discover if the website offers a hidden service (e.g. http://facebookcorewwwi.onion/) and can redirect (or ask to redirect) the user.

P.S. I remember reading something about Tor's solution to this (which used DNS), but cannot find it again as search results for "tor" and "dns" return irrelevant results mostly about DNS leaks.

1

1 Answer 1

3

This is now possible in Tor Browser 9.5: https://www.torproject.org/releases/tor-browser-95/

You can set the Onion-Location HTTP header or add a <meta> tag to the HTML.

See https://community.torproject.org/onion-services/advanced/onion-location/ and https://kushaldas.in/posts/onion-location-and-onion-names-in-tor-browser-9-5.html for details.

To enable this, in Apache, you need a configuration line like below for your website’s configuration.

Header set Onion-Location "http://your-onion-address.onion%{REQUEST_URI}s"

Remember to enable rewrite module.

For nginx, add the following in your server configuration.

add_header Onion-Location http://<your-onion-address>.onion$request_uri;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .