I was trying to find out a way to install tor meek on OpenWRT. Can someone tell me how to cross compile the meek client with OpenWRT?


You can't cross-compile using OS, you need a cross-compiling environment and you're also required to cross-compile Go language from source. Also take a close look at special Go fork for OpenWRT

After that make a Meek source compiled =)


Meek is written in Go. It has pretty reasonable cross-platform compilation options (compared to some languages).

First, you don't only cross-compile based on the operating system, you cross-compile based on the architecture and operating system. You need to know what architecture your OpenWRT router is running on. Go supports quite a wide variety of options and since Golang 1.5 cross-compiling has been a lot easier.


Choices for $GOOS are darwin (Mac OS X 10.7 and above and iOS), dragonfly, freebsd, linux, netbsd, openbsd, plan9, solaris and windows. Choices for $GOARCH are amd64 (64-bit x86, the most mature port), 386 (32-bit x86), arm (32-bit ARM), arm64 (64-bit ARM), ppc64le (PowerPC 64-bit, little-endian), ppc64 (PowerPC 64-bit, big-endian), mips64le (MIPS 64-bit, little-endian), and mips64 (MIPS 64-bit, big-endian).

Then, to build a copy of the meek-client, lets say for Linux on ARM64 you'd run a series of commands like:

export GOPATH=`mktemp -d`
export GOARCH=arm64
export GOOS=linux
go get -u git.torproject.org/pluggable-transports/meek.git/meek-client

and this should result in a copy of meek-client built for linux on arm64 in the $GOPATH/bin/linux_arm64/ folder:

$ file $GOPATH/bin/linux_arm64/meek-client
/tmp/tmp.kovJoNMmiL/bin/linux_arm64/meek-client: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped

Then your OpenWRT's Tor then needs to be configured to use meek, assuming you installed the meek-client you built before at /usr/local/bin/meek-client and you wanted to use the google domain front you'd add some lines to your torrc like these

ClientTransportPlugin meek exec /usr/local/bin/meek-client --url=https://meek-reflect.appspot.com/ --front=https://www.google.com/
UseBridges 1
Bridge meek

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.