Beginner question about which hardware to buy

I’m considering to buy a microtik router, but doubting if it can do what I’m looking for. I am on a tight budget, so I consider a hap ac lite, which I can get for 54 euro or a hap ac which is 131 euro.

I would like to install TOR and reroute all non TOR traffic through TOR. Is it possible to install TOR in routeros?

Further the difference between the devices is 64MB of ram vs 128MB. Would the lite version have enought RAM to run tor with iptables rules to reroute?

thanks in advance

Short answer:
hAP ac (lite) is not what you’re looking for.

Long answer:
You can’t install any custom programs in RouterOS, it’s not supported. The only thing that you could in theory install is whole virtualized OS, that’s a feature called MetaROUTER. It allows to run e.g. OpenWRT inside RouterOS.

But you can’t do it with hAP ac (lite), because it doesn’t have enough storage space for it. Previously, even the lowest RB models had at least 64MB flash. Current ones have only 16MB, which is just enough for RouterOS itself and that’s it.

(In theory, it could still be possible, because the feature is not disabled for low-storage models (at least my mAP lite has it, so I assume that hAPs have it too). With only essential RouterOS packages installed, used space is just a little under 10MB. A minimal system consisting of kernel + busybox + tor could perhaps fit. If you’re Linux wizard and you’re feeling lucky, you may give it a try. Otherwise forget it.)