I was planning on writing my Tor service in PHP. But I am wondering if it would be a good idea to write it in a compiled language like C++ or Rust.

The Tor service will run on a VPS hired by a hosting provider. Writing it in PHP means that anyone glancing over the content of the VPS can easily identify that a Tor service is ran and even identify what specific Tor service.

If I would make the website in a compiled language the VPS would only contain a binary file. Also, when using a compiled language I could encrypt the files used by the service, so again, the content of the website is not visible at first sight.

Note: I know that using a compiled language instead of PHP does not matter when the VPS would be investigated in detail. Also the encryption key I'd use for the files could be extracted from memory.

But I am asking if using a compiled language would lower the chance of the VPS provider noticing that a/what specific Tor service is run on their server.

1 Answer 1


Let's sort it out one by one:

  1. Even if you'll compile the sources - they can be decompiled
  2. The hoster that provides you the VPS owns a hypervisor that makes your server running as a VM. So all the memory can be snooped and hostnames, private keys e.t.c. can be extracted without a hyper-complications
  3. Only AMD SEV VM's can give you protection against pt. 1 and 2
  4. the chance of defeating a mass-scanner - yes, it will be just a bit lower, but no significant change

Try running Tor instances on one VPS, the HS on another and connect them via I2P - that setup with two different hosting providers in different jurisdictions will improve the score you're concerned about

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .