Is Tor PluginTransport Webtunnel/Lyrebird available on OpenWrt armv7?

I'm using ea8500. Currently there is a tor package for openwrt ipq806x (armv7) but there seems to be no support for PluginTransport webtunnel, the official tor browser bundles a binary lyrebird (used to be a separate bin called webtunnel) to facilitate that however that is x86 or aarch64 only. See dist.torproject.org, there is no tor-expert-bundle or tor browser prebuilt binaries for armv7.

Any ideas how to cross compile lyrebird for ea8500 or wider armv7 routers?

Thanks.

Can you point to the source code if your wish, preferably in the form of github PR?

The main repo of lyrebird for webtunnel transport is here.

The tor browser bundle arm build progress is doc'ed here and it seems arm build will be available soon (yet).

@abij

Webtunnel bridge binary is not supplied through repo as far as I can tell, but it can be very easily cross-built on Linux host.

This is an example of how one might do this for mt7621 based router:

git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel
cd webtunnel/main/client
GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build

Of course, you should have an up-to-date Go package installed in your system, and modify GOARCH value depending on your router's architecture.

After that, you can copy the resulting client binary to your router, via scp or some other way, and add the following to your torrc:

UseBridges 1
ClientTransportPlugin webtunnel exec [absolute path to your webtunnel client binary goes here]
Bridge [webtunnel bridge line from bridges.torproject.org goes here]

You can suppy "Bridge" line with different bridges multiple times in your torrc, so you can add one, two or more if you like.

After this, you can start your Tor manually and check for any issues. In my case it works pretty much out of the box with zero issues (tested on mt7621 and 23.05.5).

You may also want to strip debug symbols from the resulting binary. In that case, you should modify the compile line like this:

GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -ldflags="-s -w"

This can help you to shrink the binary by anywhere from 200-300 KB to 2-3 MB, depending on the arch.

1 Like

@abij

I've just worked with another ARMv7 machine I had to cross-compile Go stuff for, and it seems that you can easily cross-build Lyrebird binary as well.

In your case, you'll want to:

  1. Clone the Lyrebird repo
  2. Go to lyrebird/cmd
  3. Build like this:

GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-s -w" .

This should produce a lyrebird binary in the cmd directory, which you can use with your ARMv7 based router - at least it runs on my ARMv7 debug board on regulard Armbian.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.