Firmware patcher for Xiaomi routers
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
h8suga f9dd4d9f9b feat(notify): unified notification manager + webhooks + shell bell
Ships an end-to-end notification pipeline: ring buffer + persistence,
HTTP CRUD + SSE stream, backend Push() calls at ~20 async/scheduled
sites, Telegram+generic HTTP dispatcher, shell bell icon with sliding
panel, and a Notifications settings section for webhook management.

Backend (Agents U + V):
- New pkg internal/services/notify — cap-500 ring, SSE broadcast via
  events.DefaultHub topic "notifications", MarkRead / MarkAllRead /
  Delete / Clear + persistence to <dataDir>/notifications.json with
  500 ms debounced atomic write.
- Webhook dispatcher: goroutine consumes notify.PushChan, fan-out to
  every matching hook. Filters all / errors_only / warn_and_above /
  success_and_above. Retry 3× with 1/2/4 s backoff, 10 s per-request
  timeout. Telegram POST {chat_id, text=title+body, parse_mode:HTML};
  generic POST raw Notification JSON. LastError / LastSuccessAt
  stamped per attempt.
- 11 Push sites: feeds.fetch / feeds.error, routing.apply / commit /
  rollback, awg.tunnel_up / tunnel_down / handshake_recovered,
  update.available / applied / failed, pihole.enabled / disabled /
  container_restarted, auth.login / auth.failed (now with client IP
  + User-Agent via new AuthClient meta), backup.import / export,
  panic.recovered (server.go recoverer middleware), ipmeta.reload.

Frontend (Agents W + X):
- lib/notifications.ts — module-level singleton store,
  useSyncExternalStore hook, refcounted SSE + initial GET, backoff+
  jitter reconnect, optimistic UI actions, sonner-toast fallback for
  incoming errors when the panel is closed.
- NotifyBell + NotifyPanel — bell now lives in the desktop sidebar
  HEADER next to the "NFQWS2" title (was previously footer-only per
  user request), still mounted in mobile top bar. Sheet panel groups
  by Today / Yesterday / Older, filter chips (All / Errors /
  Warnings / Unread), row = colored dot + title (bold if unread) +
  2-line body + relative timestamp (Intl.RelativeTimeFormat) + source
  badge + hover dismiss X. Panel header pr-12 so the sheet's built-in
  close X no longer collides with "Clear all".
- Notifications settings under System — WebhookTable + Add/Edit
  Dialog with kind-dependent labels (Telegram bot-token URL + chat_id
  vs generic URL), inline validation, Test button hitting the backend
  test endpoint.
- All strings routed through dict.ts (en+ru) — 60+ new keys under
  notify.*.

Wiring in server.go / app.go: RegisterNotifyAPI +
RegisterNotifyWebhooksAPI + /api/notifications/stream SSE alias +
notify.InitDispatcher on boot.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 months ago
.github github: traffic: Rewrite fetch and updates 8 months ago
bench-results feat(notify): unified notification manager + webhooks + shell bell 2 months ago
bootloader Add stock uboot image for Xiaomi AC2100 (rm2100) 5 years ago
data data: Update dropbearmulti binaries (fix arch support) 9 months ago
firmware Initial commit 5 years ago
kmod kmod: Add kmods for 6.6 linux kernels (only for ARM64) 9 months ago
nfqws2-selector@859aa17f08 feat(notify): unified notification manager + webhooks + shell bell 2 months ago
python gateway: Add support https 11 months ago
recovery feat(notify): unified notification manager + webhooks + shell bell 2 months ago
rules feat(notify): unified notification manager + webhooks + shell bell 2 months ago
xmir_base gateway: Fix prompt in get_telnet and set TELNET window size: 1000x32 1 year ago
!START.bat Set forced flush mode for print 5 years ago
.DS_Store feat(notify): unified notification manager + webhooks + shell bell 2 months ago
.gitignore Enhance connect8.py with Docker daemon connection check and restart logic 3 months ago
0 feat(notify): unified notification manager + webhooks + shell bell 2 months ago
AWG_ROADMAP.md feat(notify): unified notification manager + webhooks + shell bell 2 months ago
PROBES_TODO.md docs: PROBES_TODO — plan for panel profiler (hybrid pprof + runtime/trace) 2 months ago
README.md readme: Update badges (add downloads counter) 8 months ago
activate_boot.py gateway: Change usage of run_cmd function 1 year ago
bench-server.sh feat(notify): unified notification manager + webhooks + shell bell 2 months ago
check_connect.py Add SimpleDocker cgroup escape exploit for BE7000 hackCheck=3 3 months ago
connect.py Add SimpleDocker cgroup escape exploit for BE7000 hackCheck=3 3 months ago
connect1.py connect1: Update code for using new dropbearmulti 1 year ago
connect2.py connect: Update vulnerabilities and exploits info 2 years ago
connect3.py Added xmir_base module and directory 3 years ago
connect4.py connect: Update vulnerabilities and exploits info 2 years ago
connect5.py gateway: Add function post_connect 1 year ago
connect6.py connect6: Add new exploit "datacenter7" (for RP04/RP08) 7 months ago
connect7.py connect7: Fix path for certfile 10 months ago
connect8.py Enhance connect8.py with Docker daemon connection check and restart logic 3 months ago
create_backup.py gateway: Change usage of run_cmd function 1 year ago
devtree.py devtree: Update code 1 year ago
envbuffer.py Fix stupid bugs 3 years ago
full_info_old.txt feat(notify): unified notification manager + webhooks + shell bell 2 months ago
gateway.py gateway: Fix func _install_dropbearmulti (don't use armv5) 9 months ago
install_bl.py Added xmir_base module and directory 3 years ago
install_fw.py gateway: Fix SSH-error after run "reboot" command 1 year ago
install_lang.py lang: Update lang patch scripts 2 years ago
install_ssh.py ssh: Fix sh scripts for install_ssh 8 months ago
lmo2po.py Update PO and LMO tools 4 years ago
menu.py Add SimpleDocker cgroup escape exploit for BE7000 hackCheck=3 3 months ago
passw.py Added xmir_base module and directory 3 years ago
po2lmo.py Update PO and LMO tools 4 years ago
read_dmesg.py Added xmir_base module and directory 3 years ago
read_info.py read_info: Fix error on incorrect mtd part addr 11 months ago
reboot.py gateway: Fix SSH-error after run "reboot" command 1 year ago
requirements.txt Add SimpleDocker cgroup escape exploit for BE7000 hackCheck=3 3 months ago
run.bat Set forced flush mode for print 5 years ago
run.sh run.sh: Fix tr arguments 1 year ago
shexec.py connect7: Rewrite ShellExecute code for bypassing Windows Defender 11 months ago
unlock_features.py unlockf: Change install and uninstall scripts 7 months ago
xqimage.py Added xmir_base module and directory 3 years ago
xqmodel.py xqmodel: Add RN07BW and info for RP08 10 months ago

README.md

Download latest dowloads GitHub Stars ViewCount Donations Page

XMiR-Patcher

Firmware patcher for Xiaomi routers

Usage

Windows

  • Run run.bat

Linux / Mac OS

  • Install python 3.8+ and openssl
  • Run run.sh

Donations

Donations Page