Using the HA Companion App with / through Tor / SOCKS proxy

Hey there,

I tried searching the community, but couldn’t find something really.

So I’ve setup the Tor add-on successfully (which was not really hard :wink: ) and I can access my HA using a Tor Browser App. All good so far. I’ve also activated the SOCKS proxy by just setting socks: true. It also has the Container-Port mapping in the “Network” section set to 9050:9050.

When I (just for fun / testing purposes) try to connect to myonionurl.onion:9050 using a Tor Browser, it says “this port is used for something else, blabla”. So it seeeeeems(??) that it could connect to it and the port is open. Although I don’t see it in netstat -tulpen.

However: My questions are:

  1. How would I connect to the SOCKS proxy from anything outside a Tor Browser? Because I obviously can’t connect to myonionurl.onion:9050, as it’s unreachable outside a Tor Browser.
  2. Does the HA Companion App even support connecting to / through a SOCKS proxy?

Which ultimately results in the questions:
3. Can the companion app even access my instance through Tor / a SOCKS proxy, or in order to get the app working outside my home network, I really have to go through the hole punching / DynDNS path?

In the end, my ultimate goal is not even using the app, but just updating my presence / geolocaton, what the app does. So I can detect if I am home or not (Yes I know there are also other ways to detect if somebody is home, like detecting who’s on the network. But I also want to use this type of location tracking using GPS) :slight_smile:

Thanks and greetings,

Andy!

see if this page helps: https://companion.home-assistant.io/docs/troubleshooting/networking

Thanks for the link, but that’s all DynDNS setup basically :slight_smile: I saw that page before and I’m afraid that’s what I have to do… Pretty sad actually, as it makes the Tor setup pointless in a way, that I still need to do the port forwarding and dyndns setup, which I wanted to avoid using the Tor add-on.

I understand that one of the main reasons for Tor is not easy HA access, but anon browsing. But for me, it’s just easy HA access, hence I was hoping to have it working with the companion app, too.

I way playing a bit with Orbot and it’s VPN / Proxy capabilities. But that “only” makes certain apps browsing through a Tor proxy, but I could not make it so that these apps then can also access .onion URLs :confused: Maybe I just don’t know how it works…

FYI

Orbot with home assistant companion worked for me.

Can you tell us how you did it? I would appreciate it so much!

1 Like

There is nothing special in the configuration.
Just make sure you have a working onion domain name.linked to your home assistant.
install orbot
select home assistant companion in the application list. from orbot
connect to tor
configure home assistant companion to use your onion url.
and Voila

1 Like

Not working for me, i am able to access my home assistant outside network with tor browser but not able to access with home assistant configured to orbot

Oh! Really thanks!!! It working just like you said. Downloaded Orbot from PlayStore.

  1. added HA app to the list you can access
  2. Enable VPN mode
  3. Start your Tor tunnel

Then you just insert the Tor link inside your HA app, then logging as usual and that’s all. For future access you have to make sure that your Orbot tunnel has started before accessing HA though the app.

2 Likes