In short53 merged PRs across ClashFest, PasarGuard panel and mihomo. The most interesting one fixed a DB pool deadlock that made a panel endpoint return 500 for 5-25 seconds.
This page is about code I wrote for projects I don’t own. Three of them, all networking. ClashFest is an Android network client. PasarGuard panel manages proxy nodes. mihomo is the Go proxy core. Together that’s 53 merged pull requests in 2026.
I don’t maintain any of these. Every change went through someone else’s merge button.
Almost every PR has the problem and how I checked the fix in the description. Not every one has numbers: by a rough count 21 of 30 in ClashFest and 12 of 21 in PasarGuard include measurements, the mihomo ones don’t.
ClashFest: 30 PRs, all merged
ClashFest has 264 stars. It’s a fork of ClashMetaForAndroid. Between April and July 2026 I opened 30 pull requests there and all 30 were merged by the maintainer. That’s +19,566 / -4,949 lines. Looking at merged PRs in the repo, I’m the only author besides the maintainer.
The first big one reworked the dashboard, routing and live controls. After that it got narrower. Default-network failover that actually switches when the network changes (#154). Mihomo YAML parsing moved into one place (#29), and a diff preview before a config change is applied (#13).
Then I went through the app looking at what it trusts. Untrusted profiles got processing limits (#172), runtime trust boundaries got tighter (#171), and APK updates are now verified before install (#158). The last 18 PRs, mostly security and CI, were merged over two days, 10-11 July.
PasarGuard: the /sub deadlock
PasarGuard panel has 2.9k stars. I’ve had 21 PRs merged there since January 2026, by three different maintainers. They land in the dev branch first, so the newest ones aren’t in a release yet.
The one I’d point to is #1219. After saving settings or restarting the panel, the subscription endpoint /sub returned 500 for 5-25 seconds under moderate load. I reproduced it on a synthetic stand: PostgreSQL in Docker, 20,000 generated users, 40 parallel requests.
The cause was a self-inflicted pool exhaustion. A /sub request already holds a connection from the pool. On a cold settings cache it asks for a second one. The @cached() decorator had no protection against concurrent misses, so every request did the same thing at once and the pool filled up with requests waiting on each other. PostgreSQL meanwhile showed only idle connections.
The fix is a small single-flight cache: one load per key no matter how many readers, a generation counter so a stale load can’t overwrite a newer value, reload in place instead of clearing, and a warm-up before the request takes its connection. If the pool really runs out, the panel now answers 503 instead of 500. Pool size and timeouts stayed the same.
| Setup | After saving settings | After restart |
|---|---|---|
| Before, 1 worker | 40 of 40 failed | 98 of 120 failed |
| Before, 4 workers + NATS | 21 of 40 failed | 62 of 80 failed |
| After, same stand | 0 of 280 failed | 0 of 320 failed |
The PR also says where it stops: at 200 parallel requests a few percent still get 503. That’s a pool that’s actually too small, not a deadlock. Tests run against a real pool of 2 connections.
#1209 is in the same spirit. Once the NATS client gave up reconnecting and closed, the cached key-value handle stayed dead. I checked the fix against a real NATS container, restarting it mid-run, and that run turned up a second bug: notifications were waiting on the unavailable NATS. That became a second commit. Both PRs were merged three days after I opened them.
Smaller security fixes there: generated Xray client inbounds bound to loopback (#879), a limited admin can no longer edit their own limits (#1093), and CI token permissions split per job (#1102).
mihomo: two small ones
mihomo has about 36k stars. Two PRs, both merged the next day without discussion. #3537 fixes an index out of range panic in the hysteria defragger when the fragment count doesn’t match, +16 lines. #3538 is a validation fix: the websocket listener wrote 101 Switching Protocols before checking it could hijack the connection, so a plain HTTP request to the ws path got a 101.