Repository navigation
v0.40.0-tor.3
Resilience and cost: fewer failures while Reddit blocks, fewer requests through Tor, better signals for monitoring. Ideas and code from other forks, credited in fork/README.md ("Picked fixes", "Ideas from other forks").
Images (linux/amd64; this release also moves latest):
- ghcr.io/highda/redlib-tor-api:v0.40.0-tor.3
- ghcr.io/highda/redlib-tor-api-teddit:v0.40.0-tor.3
Fixed:
- A token refresh dropped mid-way (client went away) blocked every later refresh until a restart.
- Requests to Reddit had no timeouts (a stalled circuit hung them) and redirects no limit.
- GraphQL rate limits became 502, expired tokens were retried with the same token, and a 401 without a JSON body never refreshed the token.
- Deleted comments had no id; removals now say "[removed]".
sort=randomon threads answered 502.
Added:
- While Reddit blocks or rate-limits, pages and the API serve the last good copy (up to 12 h); web pages say so.
- Redlib listens right away; until the first token arrives, requests answer 503 "still connecting".
/healthz/reddit: the last 20 requests to Reddit, 503 when most failed, for a watchdog.- Real status codes on web error pages and
/raw(429, 502, 503) withRetry-After, passed on by the Teddit API. - Custom feeds
/u/<user>/m/<feed>in the Teddit API. - "More replies" and "More comments" load in place on post pages.
REDLIB_GQL_POST_COMMENTS_HASH(if Reddit rotates the comments hash) andREDLIB_SOURCE_URL(footer link and update check, default this fork).
Changed:
- Fewer round trips through Tor: post and comments fetched at once, one cache entry per thread, about pages cached 15 min, identical requests in flight share one, earlier token rollover over the onion, one retry after a quick send failure.
- Spoofed Android app versions refreshed (2026.33-2026.42).
- teddit-api logs paths without queries.
Use with Stealth-Continued 2.6.0 (2.5.0 works too).
Tested: fork/scripts/check.sh, the live smoke test through Tor (44/44; the two new checks, custom feed and sort=random, passed by hand), a simulated block (Tor stopped), the web UI in headless Chrome, and Stealth-Continued on an emulator.