How vernesong/openclash works
OpenClash is an OpenWrt LuCI client for managing the Mihomo proxy core. The principal workflow is an administrator using LuCI to import a subscription or configuration, select and start the core, then monitor it through status, logs, or a dashboard. Documented capabilities also include configuration editing and backup, core updates, access control, firewall modes, and modular overrides. The tree supports these subsystem paths, but most runtime wiring was not sampled; the graph therefore limits sourced relationships and marks the documented core integration separately.
Main entry points: etc/openclash Mihomo core · cbi/openclash LuCI pages · init.d/openclash OpenClash service · openclash.lua LuCI controller
Components 20
LuCI interface
- LuCI pages
luci-app-openclash/luasrc/model/cbi/openclash - LuCI controller
luci-app-openclash/luasrc/controller/openclash.lua - Status interface
luci-app-openclash/root/www/luci-static/resources/openclash/js/status.js
Configuration
- Config editor
luci-app-openclash/root/www/luci-static/resources/openclash/js/config_edit.js - Config and subscription
luci-app-openclash/root/www/luci-static/resources/openclash/js/config_upload.js - YAML processing
luci-app-openclash/root/usr/share/openclash/YAML.rb - UCI and overrides
luci-app-openclash/root/usr/share/openclash/uci.rb - Router config files
luci-app-openclash/root/etc/config/openclash - Override modules
luci-app-openclash/root/etc/openclash/overwrite
Proxy runtime
- OpenClash service
luci-app-openclash/root/etc/init.d/openclash - Runtime scripts
luci-app-openclash/root/usr/share/openclash/openclash.sh - Mihomo core
luci-app-openclash/root/etc/openclash - Firewall and access control
luci-app-openclash/root/usr/share/openclash/openclash.sh
Operations
- Core and data updates
luci-app-openclash/root/usr/share/openclash/openclash_update.sh - Logs and diagnostics
luci-app-openclash/root/usr/share/openclash/log.sh - Setup guide
luci-app-openclash/root/www/luci-static/resources/openclash/js/guide.js
Dashboards
- MetacubeXD panel
luci-app-openclash/root/usr/share/openclash/ui/metacubexd - Zashboard panel
luci-app-openclash/root/usr/share/openclash/ui/zashboard
Other components
- Router administrator
- Router traffic
Connections 16
- Router administrator → LuCI pages: configures
README.md - LuCI pages → Config and subscription: imports config
- LuCI pages → Config editor: edits config
- LuCI pages → OpenClash service: manages core
- OpenClash service → Mihomo core: starts core
- Router administrator → Mihomo core: selects core
- Status interface → LuCI controller: requests action
luci-app-openclash/root/www/luci-static/resources/openclash/js/status.js - LuCI controller → OpenClash service: dispatches
- Router traffic → Mihomo core: is proxied
- Mihomo core → Firewall and access control: uses modes
- Router administrator → Override modules: customizes
README.md - Router administrator → Core and data updates: updates core
README.md - Router administrator → Logs and diagnostics: checks diagnostics
- Router administrator → Setup guide: follows setup
- Mihomo core → MetacubeXD panel: serves dashboard
- Mihomo core → Zashboard panel: serves dashboard