Puck's Random Website

I made Google help Iranian women access an uncensored internet

Have you heard about Snowflake? It's a nice initiative by the Tor project that helps people in countries where the internet is censored, to access a free, uncensored internet. Only downside: it significantly slows down the internet for them, unless you do it my way.

Snowflake is a decentralised system created by the Tor project (known from Tor browser) to enable people in countries where the internet is censored (such as China, Russia and increasingly also Iran) to access the internet freely. This is done by letting users from those countries connect to users in countries where the internet is freely accessible, and through them, access the internet freely. All abracadabra to you? The Tor project made a diagram to explain, but to be honest I find my explanation simpler than that. Sure, that diagram explains in more detail how exactly it works, but it doesn't make much clearer (or at least not to my neurodivergent mind). So here's a diagram I made that shows what happens when you have Snowflake up and running on your computer:


So just with a little piece of software, you can make a difference for those in countries with censored internet! There's just one thing: if you have a slow internet connection, then the internet will be slow for the person connecting through your computer, too. After all, all their traffic will go through your computer, and an internet connection is as fast as the slowest node.

So while my home internet connection isn't all too slow, it's not the fastest either and if a lot of users are connecting to my Snowflake proxy, it could definitely drain my internet connection and make my webserver (which I run at home) unreachable. Which I seriously don't want to happen, especially not because I run several websites of activist groups on it.

No worries, I already wrote earlier about Google Colab, in my post about password hashing. Could I run a Snowflake proxy on Google's computers? I found this a nice challenge for a very good cause: if I succeed, I can have a Snowflake proxy running on a system that is as fast as the internet itself. Users would be able to connect to and through it without delay. And if I fail, I can make a nice blog post about it, because I make a lot of posts about things that fail, right?

It turns out, a Snowflake proxy requires SSH for secure connections (otherwise the Iranian government in my diagram above could just sniff the data between you and the woman accessing your system and block that). And Colab doesn't have SSH capabilities, because Google blocked that when people en masse started to run SSH servers on Google Colab. Bummer?

Maybe not. Google offers different ways of using their servers, another one is Cloud Shell. This is basically a web-based SSH service to their servers, and like on Colab, it offers root access. Just open it in your browser and do whatever you like with it. And yes, it supports "normal" SSH.

And so, off I went. The instructions I found seemed easy. First install docker-compose using apt:
sudo apt -y install docker-compose

This automatically installs everything you need to run the Snowflake proxy. Then, all we need is the proxy itself. I downloaded it from the Tor project's website. Then it was a matter of just running it with docker-compose up -d snowflake-proxy. Sadly, an error is what I got.


What could go wrong here? A quick look at the file I had downloaded from the Tor project's website showed me that it requires docker-compose version 3.8, but apt installed version 3.3 instead. It seemed like version 3.8 doesn't really have any notable new functionality though, so it was really a matter of changing the required version in the yml-file to 3.3.


I have uploaded the new file to my webserver in case you want to try this too. For me, it was now just a matter of trying again:
docker-compose up -d snowflake-proxy


And this time, it worked just fine! You can use docker-compose ps to see it running! So there you have it: you can run a Snowflake proxy on Google Cloud, making it as fast as any Google website!

If you want easy steps to do the same, just go to Cloud Shell and copy-paste the following command:
sudo apt -y install docker-compose;wget https://www.puckbarton.nl/docker-compose.yml;docker-compose up -d snowflake-proxy


Press enter. After a while, you should see a message that the snowflake-proxy has been created. That's when you're done. Leave the browser tab open in order to keep it running.



Last modified: 25 October 2022 20:44:19.
Links PhotosHome Instagram Facebook LinkedInAll blog posts
Viruswaarheid