Skip to content

Instantly share code, notes, and snippets.

@palewire
Last active December 18, 2022 10:39
Show Gist options
  • Save palewire/52504f4a52d8173935d5f0cf638d0280 to your computer and use it in GitHub Desktop.
Save palewire/52504f4a52d8173935d5f0cf638d0280 to your computer and use it in GitHub Desktop.
Install The Tor Project's snowflake-proxy on a Raspberry Pi

Your Raspberry Pi can join The Tor Project network that helps Russians read censored news sites, including Twitter.

These are all the commands necessary to spin up a Snowflake proxy that gives Tor users a way around government attempts to block access.

You can also run a Snowflake proxy from your web browser with Firefox or Chrome. Standing it up on your Raspberry Pi is a way to support the system 24 hours a day. And, unlike other Tor server setups, it doesn't require a static IP address.

# Install the Go programming language
sudo apt update
sudo apt install -y golang-go
# Download the Snowflake proxy code
git clone https://git.torproject.org/pluggable-transports/snowflake.git
# Move into the proxy code directory
cd snowflake/proxy
# Set a location for the log
LOG="$(pwd)/snowflake.log"
# Start up the proxy to run silently in the background while outputting its activity to the log
nohup ./proxy >"$LOG" 2>&1 &
@sidawson
Copy link

sidawson commented Apr 1, 2022

Well, it's a Debian VM (so god knows what the hardware is), running kernel 5.10.13-x86_64 - so, not THAT old (4mo?), on debian 11.2 (5mo?). I'd get you more info, but my provider is being a bit of a dick with their logins, and, crazy busy right now, sorry.

I guess I'll try updating it all, when I have time, and give it another bash. Thanks for your time though, I appreciate it. I hope no-one else has this nonsense happen.

@sidawson
Copy link

sidawson commented Apr 1, 2022

ok, figured what the problem is, I'm x86_64, there's no x86_64 golang package (thanks go!):

$ hostnamectl
 [bits snipped, for obvious reasons]
         Icon name: computer-vm
           Chassis: vm
    Virtualization: kvm
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.16.13-x86_64
      Architecture: x86-64

$ apt install golang-go:x86_64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package golang-go:x86_64

therefore apt tries to get amd64, which pukes in all the above ways. So, no go for me (see what I did there?).

@palewire
Copy link
Author

palewire commented Apr 1, 2022

Have you tried a source installation? I see an x86_64 one here https://go.dev/dl/

@sidawson
Copy link

sidawson commented Apr 2, 2022

No, but I'm also not committed enough to want to have yet another thing to manually maintain. If I can install and it'll run (& more importantly, update) itself (as part of system updates), that's one thing. But yet another maintenance task? Nope, sorry.

@alpha14
Copy link

alpha14 commented Apr 25, 2022

@sidawson There is also a docker alternative that you can run on your raspberry Pi: https://gist.github.com/palewire/52504f4a52d8173935d5f0cf638d0280

@MOTSM-HD
Copy link

i've run this shell script several times now (always rm-ing the created files and folders) on my RPi 3.
cat snwoflake.log
always prompts
nohup: failed to run command './proxy': No such file or directory
what am i missing?

@90N45-d3v
Copy link

@MOTSM-HD You first have to build the Snowflake proxy with the following commands in the /snowflake/proxy path:
go get
go build

Run every command in the script yourself and run these two commands after cd snowflake/proxy

Or use my fixed version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment