JuliaHealth Bounty '26: status and open items (Nov 2026)

My post on the adapt-able imaging operators bounty is under review on the JuliaHealth blog (PR #88). Niklas suggested dropping its status section, which should be outdated soon as releases and fixes land, so the post ends on what I learned. Here is that list, as of the end of November 2026, for anyone who needs the loose ends:

  • The bounty. After the implementation PRs merged, Niklas asked for one more item, an evaluation of RegularizedLeastSquares with Reactant.jl, and wrote that otherwise he considers all work packages of the bounty finished and addressed. That evaluation is posted, and the last task he asked for is the blog post.

  • Releases. For multiCoil on a GPU, users of the registered packages need an MRIOperators release that contains the SensitivityOp rule from MRIReco #334; MRIReco #359 asks for it.

  • Reactant.jl. The evaluation ran CGNR and FISTA on a dense matrix, a LinearOperatorCollection product of a weighting and an FFT operator, and an MRIOperators SENSE operator, with Reactant 0.2.308 on its CPU client. No route compiles yet. The dense solvers adapt to Reactant arrays, then @compile stops at the solvers' abstract state field. The matrix-free problems stop earlier, inside adapt, where FFTOp rebuilds its FFTW plans on a Reactant array. Niklas replied that he plans to replace the abstract solver state with concrete states and let users switch backends through adapt; most of the FFT code is also due to move to a different FFT package.

  • Known limits. Niklas saw this list before calling the work packages finished; he did not rule on each item. DCTOp and DSTOp build FFTW plans and have no Adapt rule, so they stay CPU operators. Greedy randomized Kaczmarz iterates only on the CPU. DirectSolver computes an LU factorization on the array type of its operator, so solving on a GPU needs lu for that array type, which I have not checked for each backend; PseudoInverse moves its stored SVD without recomputing it. An ADMM solver initialized with a matrix of measurements (multi-column state) cannot be adapted. And the MRIReco.jl AMD GPU lane, allowed to fail in CI, segfaults in the new encodingOps test (MRIReco #393, open).

  • Accepted limit. WaveletOp's transform runs on the CPU, with GPU input and output copied through host arrays, as merged in LOC #62 and described in the LinearOperatorCollection GPU guide.

  • Metal. Metal CI jobs are merged in LOC #60 and RLS #160, and their selected Adapt tests passed on the Apple Silicon metal queue (LOC build 208, RLS build 289). The MRIReco and MRIOperators jobs passed at the head of MRIReco #343 (build 396), which is still in review. These cover the selected tests only, not every operator and solver on Metal. The Metal jobs are allowed to fail until they run green.

A Shadowrocket-style `fq on` / `fq off` for a Linux laptop, with sing-box TUN

On a trip to China, my phone had Shadowrocket: one toggle and every app worked. My Debian laptop depended on a travel router, and on any other Wi-Fi it had nothing. I wanted the same one-toggle experience, and I wanted off to leave no trace, because back home I don't need it at all.

The answer is sing-box in TUN mode, run by a systemd unit that is never enabled, plus a tiny wrapper:

#!/usr/bin/env bash
# /usr/local/bin/fq
UNIT=sing-box-fq.service
case "${1😖tatus}" in
  on)  sudo systemctl start "$UNIT" ;;
  off) sudo systemctl stop "$UNIT"
       # a crashed sing-box can leave policy rules behind
       while ip rule | grep -q 'lookup 2022'; do
         sudo ip rule del priority "$(ip rule | awk '/lookup 2022/{sub(":","",$1);print $1;exit}')"
       done ;;
  status) systemctl is-active "$UNIT"
          curl -s -m 8 -o /dev/null -w 'google %{http_code}\n' https://www.google.com/generate_204 ;;
esac
# /etc/systemd/system/sing-box-fq.service  (do NOT `systemctl enable` it)
[Service]
ExecStart=/usr/local/bin/sing-box run -c /etc/sing-box-fq/config.json -D /var/lib/sing-box-fq
StateDirectory=sing-box-fq

The config has a tun inbound with auto_route: true. Routing sends private IPs and the geosite-cn / geoip-cn rule sets direct and everything else to your VLESS/Trojan/whatever outbound. Store the rule sets as local .srs files so startup never depends on a download. fq off stops the unit, and sing-box removes its interface, its ip rules, and table 2022, so you are back to a stock network.

Three things cost me time:

ufw silently kills it. With the default (mixed/system) stack, sing-box hands TCP back to the kernel through the TUN interface. ufw's INPUT DROP drops those packets, so the TUN comes up and not a single connection gets through, with nothing in the log. Fix: sudo ufw allow in on sbfq0 (use your TUN interface name). The rule does nothing while the interface doesn't exist.

Don't exclude your LAN from the TUN. I put 192.168.0.0/16 in route_exclude_address to be safe, and that also excluded the router's DNS at 192.168.1.1. DNS then skipped sing-box, and you get poisoned answers in China. Leave private ranges out of the exclude list. sing-box's own rules still route normal LAN traffic through the main table, and only port 53 is pulled into the TUN for hijacking. Set the DNS strategy to ipv4_only if the network has no real IPv6. Otherwise apps get AAAA records and fail fast.

Tailscale bypasses your TUN on purpose. tailscaled marks its sockets with fwmark 0x80000 and has an ip rule (priority 5210) that sends them to the main table. So its control plane still goes direct and still gets blocked. Pull only its TCP (control plane and DERP, both on 443) into the TUN, and leave its UDP alone so direct WireGuard paths keep working:

ExecStartPost=-/usr/sbin/ip rule add priority 5200 fwmark 0x80000/0xff0000 ipproto tcp lookup 2022
ExecStopPost=-/usr/sbin/ip rule del priority 5200

One habit worth keeping: if you test routing changes over SSH or Tailscale, set up an automatic revert first, e.g. sudo systemd-run --on-active=180 /usr/local/bin/fq off. A bad TUN config cuts off the session you'd need to fix it.

A 64 MB travel router that gets through the GFW: sing-box, a Cloudflare tunnel, and one pinned IP

I travel to China with a TP-Link WR703N in my bag. It is a matchbox-sized router running LEDE 17.01, with a 400 MHz single-core MIPS CPU, about 60 MB of usable RAM, one Ethernet port and one 2.4 GHz radio. Everything on its Wi-Fi gets through the firewall: laptop, phone, tablet. No device needs a client app.

The hardware is an absurd place to run a modern proxy. Getting it to work well took most of a week. The final design is simple. The parts that made the difference were not the parts I expected.

The shape of it

LAN client
  -> iptables REDIRECT (all LAN TCP, except private ranges and Chinese IPs)
  -> redsocks 192.168.77.1:12346
  -> sing-box SOCKS 127.0.0.1:11081
  -> VLESS over WebSocket + TLS, h2mux
  -> Cloudflare edge (a pinned Hong Kong IP)
  -> cloudflared tunnel
  -> sing-box on a small VPS, listening on 127.0.0.1 only
  -> the internet

The VPS has no open proxy port. cloudflared dials out to Cloudflare, and Cloudflare forwards the WebSocket to sing-box on localhost. Days before this trip, the IP of another VPS I own was blocked. With this setup a blocked origin IP does not matter, because the client never connects to it. The client only ever sees Cloudflare.

…more

Bare Shadowsocks on a 60 MB travel router, with DNS over TCP (superseded)

Update 2026-11-26: this setup did not last. Plain Shadowsocks got fingerprinted and the server IP was blocked within days. The router now runs sing-box over a Cloudflare tunnel, with Chinese IPs going direct; see A 64 MB travel router that gets through the GFW.

My travel router is a LEDE 17.01 box (60MB RAM, MIPS) living behind the GFW. The "modern" stack — xray with DoH DNS and geoip routing, plus kcptun for UDP acceleration — ate ~45MB of RAM, lived on a USB stick, and kept zombifying after restarts. Meanwhile UDP on Chinese networks got worse every month: kcptun sessions died, UDP DNS relays never worked.

The fix was going backwards: bare shadowsocks-libev 3.2.1, global transparent proxy, DNS over TCP.

Global transparent proxy, no geoip — everything except private ranges rides the tunnel:

iptables -t nat -N SSRULE
for net in 0.0.0.0/8 10.0.0.0/8 127.0.0.0/8 169.254.0.0/16 \
           172.16.0.0/12 192.168.0.0/16 224.0.0.0/4 240.0.0.0/4 \
           100.64.0.0/10 <server-ip>/32; do
  iptables -t nat -A SSRULE -d $net -j RETURN   # server-IP entry avoids a redirect loop
done
iptables -t nat -A SSRULE -p tcp -j REDIRECT --to-ports 12345
iptables -t nat -A PREROUTING -i br-lan -p tcp -j SSRULE
iptables -t nat -A OUTPUT -p tcp -j SSRULE

DNS without UDP relay is the clever bit. Unpoisoned DNS has to go through the tunnel, which normally means ss-tunnel's UDP relay — which silently fails on this MIPS box: it logs "listening" but no socket ever appears in netstat. Instead, OpenWrt's tiny dns-forwarder listens on UDP locally and queries upstream over TCP:

dns-forwarder -b 127.0.0.1 -p 1053 -s 8.8.8.8:53

dnsmasq forwards to 127.0.0.1#1053 as usual; the forwarder's TCP:53 packets hit the same REDIRECT rule and ride the tunnel. You get real answers — NXDOMAIN passes through untouched, something poisoned DNS never gives you. No UDP ever leaves the router.

Total cost: 490KB of binaries, embedded in internal flash (verified by unmounting the USB stick mid-run and pulling google in 1.3s), RAM down to 28MB, procd respawns everything if it dies, and boot just works.

Sometimes the modern stack is the problem, not the solution.

Fcitx5 + Rime on a 2015 Chromebook (postmarketOS): GTK_IM_MODULE=fcitx, not fcitx5

I just got Chinese input (wubi + pinyin via Rime) working on my ASUS C100P Flip Chromebook — postmarketOS edge, armv7, 2 GB RAM, MATE on X11. Two things made it real: a minimal package set, and one environment variable half the internet gets wrong.

Install is 10 packages:

doas apk add fcitx5 fcitx5-rime fcitx5-gtk3 fcitx5-gtk4

Resist the "install everything" reflex. On armv7, fcitx5-chinese-addons doesn't exist, fcitx5-configtool needs plasma6 (never built on armhf), and the old full chain dragged in qt6-qtwebengine, which pins icu-libs-76 — on Alpine edge that froze my nodejs at Node 22 (that icu standoff is exactly why I ripped the whole thing out months ago). Rime alone covers wubi and pinyin; my schemas/dictionaries live in my dotfiles repo and get symlinked into ~/.local/share/fcitx5/rime/, so fcitx5 deploys them on first start.

Then ~/.xprofile:

export GTK_IM_MODULE=fcitx      # NOT fcitx5
export QT_IM_MODULE=fcitx       # NOT fcitx5
export XMODIFIERS="@im=fcitx5"  # yes, this one really is fcitx5

The asymmetry is not a typo. Alpine's fcitx5-gtk registers the GTK input module under the id fcitx only — the widely-documented fcitx5 alias never connects. The symptom is maddening: tray icon alive, right-click menu works, even tray "Restart" works — but fcitx5-remote stays 0 (no input context has ever connected) no matter which window has focus, and no keystroke ever reaches the daemon.

Proof in 60 seconds, using zenity as a disposable GTK app and xdotool to tap Shift into it:

export DBUS_SESSION_BUS_ADDRESS="unix:path=$(ls /tmp/dbus-* | head -1)"
GTK_IM_MODULE=fcitx5 zenity --entry & sleep 2   # fcitx5-remote → 0, dead
GTK_IM_MODULE=fcitx  zenity --entry & sleep 2   # fcitx5-remote → 1
xdotool keydown Shift_L; sleep 0.05; xdotool keyup Shift_L   # → 2: rime active

fcitx5-remote states: 0 = no client ever connected, 1 = inactive, 2 = active. A focused GTK window that never lifts you off 0 is an env problem, not a daemon problem — stop restarting fcitx5 and fix the variable.

Two traps if you debug from an ssh/agent shell. First, fcitx5 started there inherits the shell's stale DBUS_SESSION_BUS_ADDRESS and becomes an orphan daemon on a dead bus, invisible to the GUI session — take the real bus from the session process: tr '\0' '\n' < /proc/$(pgrep -n mate-session)/environ | grep ^DBUS_. Second, environment is baked at process birth: mate-terminal windows are all spawned by a factory that inherited the session's env at login, so per-window fixes don't stick — .xprofile plus one logout/login is the only global cure (mate-terminal --disable-factory buys you a single standalone window meanwhile). After that, double-tap Shift toggles Rime and the dotfiles-managed wubi86/pinyin_simp schemas come up on first deploy.