The First Documented Project: Darknet Metrics
So, I recently had an idea for an experiment. I wondered about the TOR Network and how people connect in it. In case you have never tried to use TOR, I would strongly recommend you to. Here are the basics:
When using the TOR browser, you can still access normal (clear web) websites via normal urls; e.g. https://example.com. But there is also an additional type of URL: an onion address. This is a long string of random characters which ultimately point to the server the website is hosted on. Unlike with normal URLs, when you create an onion address you have no control over which characters appear in which order. This makes remembering onion addresses mostly impractical. From what I've seen so far, most users get around this by using bookmarks for the sites that are noteworthy and exist. Additionally, there exist some sites whose sole purpose is to catalog and list all known onion sites. One example of this would be tor.taxi, but the legitimacy can hardly be verified in such cases. In the real world, most exchange of onion addresses happens in forums and chat rooms.
The Idea
I want to know how much traction and attention a random link in a chat room is able to achieve. I want to do this by hosting my own onion service. To realize such a project, I've considered a few possibilities:
A website which...
- ... sends an API request to an API server to catalog the number of visitors with an empty page
- ... has a single red button in the middle with an incrementing counter for clicks
- ... has a single span as a counter, measuring how often a site was accessed
Unfortunately, all options have their own respective up- and downsides which makes deciding quite a bit more difficult. Exemplary, simply making a button to log interaction would only measure the interaction with the site; not when it is accessed. Since I do not expect the website to be flooded with requests and users, I believe there will be a big difference between the number of users (potentially accidentally) clicking on the onion link and users willing to interact with the website to click a button. Additionally, I need to find a way to make the website work without the use of JavaScript, as many TOR users have disabled it for security purposes. Currently I do not have a satisfactory solution on how to create API requests without the use of JavaScript; especially since I would prefer not to use PHP, as I am not quite as familiar with it yet. Nonetheless, I settled for implementing aspects of all different ideas to have a variety.
Starting Out
Since the website will have such a simple design, I am not going to design a full UI/UX-Plan and simply start coding.
Okay, update: I first started programming in HTML and CSS until I realized that I won't be able to use JavaScript (since it's TOR...) So, I started using Flask. It's very rough code but it does not need to survive for long since the project will stay up only for a limited time anyway.
The current version of the deployed code can be found on Github under the following URL: https://github.com/Erebos132/darknet-metrics
It will be deployed using Gunicorn + Flask.
Actual deployment will be a topic for a future post as I will take a short break from the project before starting work on it again.