$ account vernesong
OpenClash is an OpenWrt/LuCI application that turns a router's admin interface into a full Clash/Mihomo proxy management system. The production code is mostly Lua CBI/controller modules, view templates with embedded JavaScript, and shell/Ruby orchestration scripts. It manages subscription downloads, YAML config generation and overwrite, core binary updates, GeoIP/GeoSite/China-route database updates, DNS/firewall integration, streaming-unlock probe and selection, and optional OIX managed-service integration. It also bundles the MetaCubeXD and zashboard single-page dashboards for live proxy monitoring and connection inspection. Architecturally, the project is an OpenWrt package: UCI configuration, an init.d service, and watchdog/procd lifecycle management. The LuCI controller exposes around 80 JSON/AJAX actions and uses low-level nixio fork/poll/pipe helpers for streaming subprocess output. The backend repeatedly combines shell scripts with Ruby-based YAML parsing and mutation to handle Clash configuration. External dependencies are significant: GitHub releases/CDNs for core and GEO data, subconverter services, the OIX API, and several IP-info services. Hardcoded URLs, vendored minified dashboard bundles, and multi-language shell/Ruby/Lua/C tooling are the main technical-drift risks. This is not a data-research repository; the data handled is operational proxy/node/routing state rather than analyzable datasets. No automated test suite is apparent in the tree; quality comes from defensive shell patterns (flock locks, ETag caching, retry loops) and feature depth rather than automated verification. The most reusable pieces are YAML.rb's merge/encryption layer, the server_url share-link parser widget, and the controller's streaming subprocess helpers.