I've successfully setup a way to access the tor network via my iPhone. The only thing that's missing is .onion links. I assume that the DNS lookup fails because its not a real world valid domain extension. I was wondering how I could tell my iPhone otherwise.

Would I have to use a PAC function in the .pac file? If so, what one and where do I point it to?


To connect my iPhone to the Tor network I installed tor on my Raspberry Pi, as well as apache. I allowed Tor to accept connections from any device on the network. Placed a .pac file in the root of my web server and its contents are as follows: function FindProxyForURL(url, host){ return "SOCKS"; }

The DNS settings on my iPhone are default:


Search Domains "blah.blah.internetserviceprovider.net"

To connect to Tor I specified the proxy as automatic and to the Raspberry Pi's IP, which in this case was

So together the url was

This works perfectly to mask my IP and DNS, but .onion is not available

  • We can't tell without knowing what magical solution you've deployed. Yes, DNS will fail for anything except using Tor's DNSPort, which will provide you with a cookie IP, which when connected to will attach to the appropriate .onion. Please clarify what you've done so far, what you expected to happen and what does happen. – cacahuatl Jul 24 '16 at 22:00
  • @canonizingironize I've added what I do to connect to Tor and my default iPhone DNS settings – Ryan Jul 25 '16 at 2:52
  • Get the RPi to hook DNS requests with IPTables and direct them to a DNSPort running on the RPi. See the many posts on here about setting up isolating proxies or anonymising middleboxes. You're probably leaking DNS and other packet types to the internet in general, which will break even the location anonymity of Tor, never mind long-term identifier indistiguishability that something like Tor Browser would provide. – cacahuatl Jul 25 '16 at 3:43
  • @canonizingironize Thank you for the security tip. I do know that this system is no where near as secure as the Tor browser. The soul purpose is just to have a proxy like system that I can use on my phone. Not doing anything that would warrant people trying to track me. – Ryan Jul 25 '16 at 4:06
  • Well, opening the DNSPort on the Pi and telling your iPhone to use it for DNS resolves should solve the .onion issue, you'll also need to set the Virtual Network mapping appropriately and use Transparent Proxying. To achieve this you'd likely need to make your Pi an Anonymising Middle box, otherwise onions simply won't work, since the applications don't seem to be using SOCKS5's remote hostname functionality. – cacahuatl Jul 25 '16 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.