Zhenga

Private P2P network

Quick pair

Pairing 2 computers is easy with the example configuration files.

1. Hardware

Two devices running Windows, macOS or Linux.

2. The binaries

Download latest Zhenga on each of the devices and unzip to a separate directory.

3. System driver

Install Dokan on each of Windows devices or macFUSE on each of macOS devices. These are filesystem-in-userspace drivers. There is nothing to install on Linux as most Linux distributions come with fuse by default.

4. Configuration files

Example configuration files 1.cfg and 2.cfg can be found along the unzipped binary.
Find out the hostname of the 1st device on Windows, macOS or Linux. Open 2.cfg on the 2nd device with text editor and change localhost to the actual hostname of the 1nd device:

{
  "args": "-f",
  "id": "926aed63f3fccb3f",
  "peers":
  [
    {
      "name": "1",
      "id": "545cd98d3bc6981c",
      "shares":
      [
        {
          "path": "path/to/share_with_1",
          "write": false
        }
      ],
      "addrs":
      [
        "localhost:42001"
      ]
    }
  ]
}

5. Start

Firewall users must allow port 42001 for Zhenga binary. Follow the instructions for each of the device operating system.

5.1 Windows

Start command prompt by pressing Win+R, typing cmd and pressing Enter. Navigate to the location of downloaded Zhenga binary.
For 1st device issue the following command:

C:\Users\Zhen\Zhenga>zhenga.exe -c 1.cfg

For 2st device issue the following command:

C:\Users\Zhen\Zhenga>zhenga.exe -c 2.cfg

5.2 Linux

Start command prompt and navigate to the location of downloaded Zhenga binary.
For 1st device issue the following commands (use sudo where appropriate):

$ mkdir ~/1
$ ./zhengad -c 1.cfg -m ~/1

For 2nd device issue the following commands (use sudo where appropriate):

$ mkdir ~/2
$ ./zhengad -c 2.cfg -m ~/2

5.3 macOS

Running Zhenga on latest macOS versions requires explicit permission. Google has a number of solutions to this along with explanations of what code signing is and how it prevents malicious software spread.

Once done with the permission, start command prompt and navigate to the location of downloaded Zhenga binary.
For 1st device issue the following command:

/Users/Zhen/zhenga $ ./zhengad -c 1.cfg -m /Volumes/1

For 2nd device issue the following command:

/Users/Zhen/zhenga $ ./zhengad -c 2.cfg -m /Volumes/2

6. Stop

Stop Zhenga by pressing Ctrl+C in the same command prompt.

7. Congratulations!

You’ve just paired 2 devices via your own P2P network!

Please refer to quick start guide for more example setup or check the step-by-step manual for details on how to create personal configuration.