Would using the firmware-selector to include libopenssl into a new 25.12.2 image sidestep the issue for you? Yes, openssl is large, but perhaps it fits for your $unspecified_device that way nevertheless (and you really need to upgrade to a supported version anyways).
I don't think tor will run on only 128MB. Some time ago I installed tor on a RPi zero with 512MB ram. But without swap it crashed within a few hours. With swap it was stable, but the microSD card weared out in a few week.
Raspbian. And AFAIK there is no relay/client distinction. There is Tor, which can be configured as relay, end- and/or entry point or none.
But my setup was running as relay, on 1Mbit.
Tracking down odd behavior in an old unsupported OpenWrt release just isn’t that attractive. Putting shared libraries in /tmp (default location for ram) isn’t a good idea to start with and even more so for security related libraries like OpenSSL.
Newer OpenWrt releases include ways to include extra packages in the base install where they end up in the squashfs based /rom which achieves higher compression than than ubifs based /overlay. For flash starved devices this can give extra breathing room.
I upgraded to recent apk-based release, and now I can't install anything to /tmp, even info command doesn't work:
## not sure it's needed
# mkdir -p /tmp/root/etc
# cp -r /etc/apk/ /tmp/root/etc/
# apk info tor -p /tmp/root/ --root-tmpfs=yes
ERROR: Unable to read database: No such file or directory
ERROR: Failed to open apk database: No such file or directory
Already mentioned several times: build the extra packages into the base image of a still supported OpenWrt release. A lot of work went into the image builder - at least try it.
I appreciate the efforts, but in this case I'm afraid they are not helpful:
as owrt image grows, only 384 KiB free space left after fresh latest release installation (other than the flash size, the device itself is quite capable - TP-Link Archer C6 v2, 8/128 MiB).
Additionally, tor now depends on libopenssl3 which requires 4,5 MiB vs ~900 KiB earlier.
So I doubt I can do anything to fit it on flash.
And the whole installation would require 25 MiB now:
# apk --root /tmp/root/ add hostip
(1/2) Installing libsodium (1.0.20-r1)
Executing libsodium-1.0.20-r1.post-install
* execve: No such file or directory
ERROR: lib/apk/exec/libsodium-1.0.20-r1.post-install: exited with error 127
(2/2) Installing hostip (2019.08.20~07ac3825-r3)
Executing hostip-2019.08.20~07ac3825-r3.post-install
* execve: No such file or directory
ERROR: lib/apk/exec/hostip-2019.08.20~07ac3825-r3.post-install: exited with error 127
2 errors; 38.3 MiB in 225 packages
Well, the execve: No such file or directory makes me believe it is more complicated to setup the environment... No idea what additional files need to copied now, but I guess that's the way to go?
Thank you for trying out, I faced that error too, but the packages themselves are apparently got installed, maybe in somewhat inconsistent state.
I managed to run tor from console, some more tweaking are probably needed to run it properly (symlinks from /tmp/root/.. to /.., LD_LIBRARY_PATH=/tmp/root/usr/lib:/tmp/root/lib, etc.).
But yeah, the first error I faced was because of missed that /lib/apk/, so it seems is a way to go indeed if there is no more seamless way..
Thanks again!
Well, you know, you could always try extroot instead... You would need to have a small usb drive for that and the drivers installed, but that is possible by creating a custom image with firmware selector with only minimal packages to save space. Once extroot is configured, you can install all other basic packages and finally tor and have it running normally (still no relay due to high ram requirements).