Torsocks and IPFS

Hi all,

I’ve recently started playing around with an application called Superhighway84 which is a sort of cross between Usenet and IRC running on IPFS. I can run it just fine with Torsocks. I have a question though, how can I see and verify if my connection is really running through Tor?

Thanks!

1 Like

Hi @jsevans :slight_smile:

There’s a number of different ways to check Tor is running correctly when using the terminal. This is one example,

If torsocks is already enabled then toggle off:

$ source torsocks off
Tor mode deactivated. Command will NOT go through Tor anymore.

First, check what your current IP address is (without Tor):

$ wget -qO - https://api.ipify.org; echo

147.232.135.100

Toggle torsocks on:

$ source torsocks on

Then run the same command but preface it with torsocks:

$ torsocks wget -qO - https://api.ipify.org; echo

162.247.74.200

Here’s another example:

This command will check your connection at check.torproject.org to ensure it’s working & also enable you to debug if there’s any problem:

curl --socks5 localhost:9050 --socks5-hostname localhost:9050 -s https://check.torproject.org/ | cat | grep -m 1 Congratulations | xargs

Hi @ukmr, my question isn’t about torsocks so much as it is about IPFS. I’ve been using torsocks for years and I know how it works. However, using a client connected to IPFS is different.

Let’s take a similar example, IRC. If I use torsocks + IRC client and then connect to an IRC server, that server will return my IP (I can confirm that is from an exit node) as well as other information.

If I use this superhighway84 client to connect to IPFS, then there is nothing to relay back the information of how I’m connecting. Furthermore, IPFS works a little like bittorrent. There will be multiple connections going to multiple peers, not just one.

How can I tell, on my machine, if my connections to IPFS via the superhighway84 client are truly going through Tor? If this isn’t possible, I understand. However, it seems like there should be a way for me to see if my connections are going to a guard node or not from my machine.

one way would be to create a virtual machine with a host only network interface. on the host you could make the socks proxy available to the VM. run you superhighway84 client in the VM pointing to the proxy on your host…

1 Like

Do you mean something like Tails where every connection is running through Tor? That might work if I’m only concerned with connecting through Tor. However, I also need to verify that I am connecting only through Tor.

Also, going the VM route, is there a way I could use Wireshark to monitor the network interface to see if connections are running to a Guard node?

no, not like tails - just setup a “usual” VM and give it a host only network (Host-only adapter/networking), so the VM itself has no internet connectivity without using a proxy.
point every application from the VM that needs internet to a tor-enabled socks proxy on the host.

you can also use wireshark to track, where connections are going to - but this does not make sure, they do not go anywhere else in the future…

1 Like