How ushan0v/forkop works
Forkop is a LuCI front end for configuring and operating a router proxy/VPN service. Users enter through LuCI pages to manage server and routing configuration, inspect dashboard and live connection data, run diagnostics, or check and apply component updates. The sampled code shows tab controllers coordinating service methods, runtime state, and rendered UI. The README also describes backend capabilities such as subscriptions, DNS/routing features, and proxy integrations; their implementation is outside this tree, so those are not mapped as internal components.
Main entry points: main.js LuCI pages · store.service.ts UI state store · initController.ts Diagnostics · main.ts Frontend exports
Components 22
LuCI interface
- LuCI pages
luci-app-forkop/htdocs/luci-static/resources/view/forkop/main.js - Dashboard
fe-app-forkop/src/forkop/tabs/dashboard/initController.ts - Diagnostics
fe-app-forkop/src/forkop/tabs/diagnostic/initController.ts - Connection monitoring
fe-app-forkop/src/forkop/tabs/monitoring/initController.ts - Component updates
fe-app-forkop/src/forkop/tabs/updates/initController.ts - Frontend exports
fe-app-forkop/src/main.ts
Runtime operations
- Service methods
fe-app-forkop/src/forkop/methods/index.ts - Shell RPC methods
fe-app-forkop/src/forkop/methods/shell/index.ts - Custom methods
fe-app-forkop/src/forkop/methods/custom/index.ts - Service status fetch
fe-app-forkop/src/forkop/fetchers/fetchServicesInfo.ts - Runtime state refresh
fe-app-forkop/src/forkop/services/runtimeUiState.service.ts - Clash API
- Forkop service
- Diagnostic checks
fe-app-forkop/src/forkop/tabs/diagnostic/checks
Configuration
- Proxy server setup
luci-app-forkop/htdocs/luci-static/resources/view/forkop/server.js - Routing sections
luci-app-forkop/htdocs/luci-static/resources/view/forkop/section.js - Service settings
luci-app-forkop/htdocs/luci-static/resources/view/forkop/settings.js - Local devices
luci-app-forkop/htdocs/luci-static/resources/view/forkop/local_devices.js - OpenWrt UCI
Shared state
- UI state store
fe-app-forkop/src/forkop/services/store.service.ts - UI state mapping
fe-app-forkop/src/forkop/services/uiState.service.ts
Other components
- Router operator
Connections 33
- Router operator → LuCI pages: opens pages
- LuCI pages → Frontend exports: loads exports
- Frontend exports → Dashboard: exposes tab
- Frontend exports → Diagnostics: exposes tab
- Frontend exports → Connection monitoring: exposes tab
- Frontend exports → Component updates: exposes tab
- LuCI pages → Proxy server setup: opens page
- LuCI pages → Routing sections: opens page
- LuCI pages → Service settings: opens page
- LuCI pages → Local devices: opens page
- Proxy server setup → OpenWrt UCI: reads/writes config
- Routing sections → OpenWrt UCI: reads/writes config
- Service settings → OpenWrt UCI: reads/writes config
- Local devices → OpenWrt UCI: reads/writes config
- Dashboard → Custom methods: loads sections
- Dashboard → Service status fetch: fetches status
- Diagnostics → Diagnostic checks: runs checks
- Diagnostics → Service status fetch: fetches status
- Diagnostics → Runtime state refresh: refreshes state
- Component updates → Runtime state refresh: refreshes state
- Connection monitoring → Clash API: reads connections
- Service status fetch → Runtime state refresh: refreshes state
- Service status fetch → Shell RPC methods: queries status
- Runtime state refresh → Shell RPC methods: fetches state
- Shell RPC methods → Forkop service: calls service
- Custom methods → Forkop service: calls service
- Runtime state refresh → UI state mapping: applies snapshot
- UI state mapping → UI state store: updates state
- Service status fetch → UI state store: stores status
- Dashboard → UI state store: reads state
- Diagnostics → UI state store: reads/writes state
- Connection monitoring → UI state store: reads state
- Component updates → UI state store: reads/writes state