Torifying Lagrange

A great thing about gemini is that gemtext documents tend to be very lightweight, and so it usually does not take very long to load them over Tor. So, assuming Tor does a reasonably good job at hiding your IP address, and throwing in all the built-in privacy benefits of Gemini, one can enjoy a comfortable feeling of privacy while browsing Gemini capsules. It is easy to torify Lagrange with torsocks, by simply running "torsocks lagrange".

I ran into a serious problem, however, in using a torified lagrange: for some unknown reason, the background task which handles refreshing your feeds will (apparently) lockup, causing the feeds never to finish refreshing, and driving one of your CPU cores to switch to space-heater mode (100% usage forever). This only happens once every few times you refresh your feeds, but since lagrange (1.13.6) is hardcoded to refresh your feeds every 16 minutes, then inevitably you will switch back to Lagrange to find that the feed refresher has gotten stuck in this infinite-loop-like behavior.

I tried to debug the problem using gdb. First I had to build lagrange with debugging symbols. I record some notes on that here for my own records:

The resulting executable works fine for normal gdb debugging sessions. However, if you try to run it with torsocks, gdb will not be useful because torsocks is blocking the expected signals:

So, I hit a wall there. Nevertheless, it occurred to me that, since I only need to refresh my feeds once per day, I could just disable automatic feed refreshing, and refresh them manually as needed. If the problem reoccurred, I would still have to restart lagrange, but only once or maybe twice per day at worst, which would be no great burden.

As I mentioned, the refresh timer is hardwired in. But I just needed to comment out two lines in the source code, and then rebuild.

Proxied content from gemini://

Gemini request details:

Original URL
Status code
Proxied by

Be advised that no attempt was made to verify the remote SSL certificate.