People use Tor for various reasons these days. Journalists use them
to accept whisleblower submissions, people with restricted internet
access use it to jump those blockades, people with concerns about their
privacy use it, people with bad intensions use it for obvious reasons
etc. Tor has around 2 million users per month and today, in this post, I want to tell you how I, as a (student) developer, use Tor.
There is an awesome feature in Tor called Hidden Services where Tor provides anonymity to the servers hosting a website. Tor provides you with an .onion address (just like .com or .in domain) after the Hidden Service is set up. Tor Hidden Services can also function behind a Firewall or NAT which means, if you have a website running on localhost of your machine, then you can start a Hidden Service and serve the same website on Tor and anybody on Tor can visit it even if your machine is behind a NAT and has a private IP address. I wanted to expose the website running on my local network to the external internet and didn’t wanted to use services like ngrok or online hosting like 000webhost. I took advantage of Hidden Service feature by hosting my project (website) on Tor and shared the .onion address with a few friends to test it out. Of course, in order to access my Hidden Service, my friends had to open the onion address in a Tor Browser. Tor Hidden Service gives anyone the power to host their own websites for free and make them accessible worldwide instantly!
I also wanted to embed Tor into Android apps so that they can connect to my Hidden Service. After struggling for a few days to find suitable libraries, I finally succeeded in finding one (I have forked it to my account. You can take a look at it here). You can create truly decentralized apps if you start a Hidden Service from your app (so that it acts as a server and a client at the same time) and make other instances of your app communicate using each others’ .onion addresses. Here is one desktop app that does it.
There are endless possiblities of what you can do with Tor as a developer. But, you may say that it is very complicated to setup a Hidden Service. Well, it was. I was able to setup my Hidden Service within minutes using Docker. For example, if you already have Docker and Docker-Compose installed on your (Linux) system, then just create a docker-compose.yml file in any directory and put the following into it:
Now, just open the terminal in that directory and run
Thanks for reading.
There is an awesome feature in Tor called Hidden Services where Tor provides anonymity to the servers hosting a website. Tor provides you with an .onion address (just like .com or .in domain) after the Hidden Service is set up. Tor Hidden Services can also function behind a Firewall or NAT which means, if you have a website running on localhost of your machine, then you can start a Hidden Service and serve the same website on Tor and anybody on Tor can visit it even if your machine is behind a NAT and has a private IP address. I wanted to expose the website running on my local network to the external internet and didn’t wanted to use services like ngrok or online hosting like 000webhost. I took advantage of Hidden Service feature by hosting my project (website) on Tor and shared the .onion address with a few friends to test it out. Of course, in order to access my Hidden Service, my friends had to open the onion address in a Tor Browser. Tor Hidden Service gives anyone the power to host their own websites for free and make them accessible worldwide instantly!
I also wanted to embed Tor into Android apps so that they can connect to my Hidden Service. After struggling for a few days to find suitable libraries, I finally succeeded in finding one (I have forked it to my account. You can take a look at it here). You can create truly decentralized apps if you start a Hidden Service from your app (so that it acts as a server and a client at the same time) and make other instances of your app communicate using each others’ .onion addresses. Here is one desktop app that does it.
There are endless possiblities of what you can do with Tor as a developer. But, you may say that it is very complicated to setup a Hidden Service. Well, it was. I was able to setup my Hidden Service within minutes using Docker. For example, if you already have Docker and Docker-Compose installed on your (Linux) system, then just create a docker-compose.yml file in any directory and put the following into it:
Now, just open the terminal in that directory and run
docker-compose up.
You will have a complete ready-to-use LAMP stack and you will get a
Tor Hidden Service link (.onion address) printed in your terminal as
well. It cannot get more easier than that! Let me know your thoughts on
this.Thanks for reading.
Comments
Post a Comment