Onioncat ist written in a portable manner, thus it runs on almost all operating systems, even on Windows. This document describes how to run Onioncat on a Windows 10 installation together with the Tor browser bundle.
The Windows part of the code was already written in 2008, hence Onioncat on Windows is nothing new. This document is here to meet recent versions of Windows, Tor, and Onioncat.
If you read this article you probably know what you are doing, aren’t you?
Windows is not the type of operating system which is known for its good security. Onioncat is solely used in conjunction with Tor or I2P, both being anti-surveillance tools. If you intend to use Onioncat you are probably in a situation where security matters and you should consider to use a system which is designed for such circumstances, e.g. Tails, or some other Linux distributions which are much more transparent than Windows.
If you don’t know how to use these other systems but you really need high security you should probably seek advice from somebody near you.
If you’re still happy with Windows go ahead and read on.
Onioncat needs a tunnel device which is a virtual Ethernet adapter. Windows does not natively support such an adapter but OpenVPN includes the necessary driver. Hence you need to download and install OpenVPN from here https://openvpn.net/community-downloads/. Choose the right Windows version. During the setup procedure you can choose the components to install. You can leave the default settings but actually you just need the “TAP Virtual Ethernet Adapter”.
Download and install Tor. It seems that Tor for Windows can only be downloaded as the Tor Browser Bundle but that doesn’t matter. Download and install it from here: https://www.torproject.org/download/. Before running the Tor browser we have to configure it which is explained in the next step.
Download the precompiled Windows 10 files of Onioncat from here: https://www.cypherpunk.at/ocat/download/Windows/. Unzip the archive. The file contains two EXE files and a DLL. Copy these three files to C:\Windows\System32 (note: if you don’t like that, you can keep the files where ever like).
Before starting the Tor browser (which will start a local Tor node) we need to configure a hidden service.
Open the “File Explorer” and navigate to the folder “This PC > Desktop > Tor Browser > Browser > TorBrowser > Data > Tor”. The folder contains the configuration file of Tor named
Right-click it, chose “Open with” and select the Notepad. Make sure that the Tor browser is not running because otherwise it will overwrite the file after you edited it. The Notepad will open the file and show its contents. Copy the following lines into it. They configure two hidden services for Onioncat.
HiddenServiceDir TorBrowser\Data\Tor\onioncat_hsv2 HiddenServiceVersion 2 HiddenServicePort 8060 127.0.0.1:8060 HiddenServiceDir TorBrowser\Data\Tor\onioncat_hsv3 HiddenServiceVersion 3 HiddenServicePort 8060 127.0.0.1:8060
Save the file and close the Notepad. Now you can start the Tor browser (there should be an icon on your desktop) and click on “Connect”.
After it started successfully, again go to the File Explorer to the same directory (“This PC > Desktop > Tor Browser > Browser > TorBrowser > Data > Tor”). Two additional folders should have appeared: “onioncat_hsv2” and “onioncat_hsv3”. Navigate into “onioncat_hsv2”, there’s a file named “hostname”. Open it with the Notepad (right-click -> “Open with” -> “Notepad”). The file contains the onion ID of your v2 hidden service, e.g.
2e6c3gboyngav2rq.onion. Keep the file open, you will need this string in the next step.
Configure and Run Onioncat
Now we create a shortcut to run Onioncat. Right-click on the desktop, then “New->Shortcut” and either browse to the ocat.exe (which you copied to C:\Windows\System32\ocat.exe) or just paste the path to it into the text field:
C:\Windows\System32\ocat.exe (adjust the path if you keep it somewhere else on your hard drive). Then click “Next” and “Finish”.
Your shortcut icon appears on the desktop. Now right-click on it again and choose “Properties”. The properties window will open. We need to add some command line arguments to Onioncat in the “Target” field:
-t 9150 -U 2e6c3gboyngav2rq.onion. Copy the .onion name from the “hostname file” we opened above. Finally, the entry should look like this:
C:\Windows\System32\ocat.exe -t 9150 -U 2e6c3gboyngav2rq.onion
-t 9150 is used to tell Onioncat the SOCKS port of Tor. By default this is 9050 but with the Tor browser bundle it was change to 9150. Option
-U tells Onioncat to use bidirectional mode (instead of unidirectional). This increases the speed of the connection setup and it may be easier in combination with v3 hidden services (Read Onioncat and Tor hidden services v3 for more information.).
Click “Ok” and start Onioncat simply by double-clicking the shortcut icon. A command window will open and Onioncat will output a bunch of messages like the following:
Tor is running, Onioncat is running, you are ready to test the setup. Actually you need a second Onioncat node somewhere. Of course, a single Onioncat instance doesn’t make much sense 😉
Try to ping another running Onioncat node. Get its IPv6 address and open a command window (type
cmd in the Windows search bar on the bottom of the screen and press enter). Now enter the command
ping followed by the IPv6 address of the target node. It may take a while (a few seconds) until the first pings will get replied.
C:\Users\dummy> ping fd87:d87e:eb43:4506:3bbb:9faf:5877:4319 Pinging fd87:d87e:eb43:4506:3bbb:9faf:5877:4319 with 32 bytes of data: Request timed out. Reply from fd87:d87e:eb43:4506:3bbb:9faf:5877:4319: time=249ms Reply from fd87:d87e:eb43:4506:3bbb:9faf:5877:4319: time=361ms Reply from fd87:d87e:eb43:4506:3bbb:9faf:5877:4319: time=263ms Ping statistics for fd87:d87e:eb43:4506:3bbb:9faf:5877:4319: Packets: Sent = 4, Received = 3, Lost = 1 (25% loss), Approximate round trip times in milli-seconds: Minimum = 249ms, Maximum = 361ms, Average = 291ms