mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-04 04:48:00 +03:00
2.2 KiB
2.2 KiB
Backend and core-integration guidance
- A backend owns protocol parsing/export, editor factories, runtime materialization, process integration, statistics, validation, and native-TUN capability for its core. Register these through plugin capabilities instead of adding shared-manager conditionals.
- The JSON/document submitted to a core is the runtime authority. Build it from a deep/runtime copy; never mutate the persisted profile while preparing connection, routing, logging, testing, or TUN state.
- Preserve full user-authored core documents and unknown supported fields. Report a lossless-compatibility failure instead of silently compiling or deleting unsupported configuration.
Native TUN policy
For a normal connection:
- If the Furious native-TUN option is enabled, replace any runtime native TUN with the generated TUN; mark TUN handled and do not start application tun2socks.
- If the option is disabled and the user document contains native TUN, preserve it unchanged; mark TUN handled and do not start tun2socks.
- If neither exists, do not inject native TUN; global TUN mode may use tun2socks.
- Proxy-only operations such as speed/latency tests explicitly strip native TUN from their own temporary copy.
Never remove an explicit user TUN merely because an application toggle is off, and never run native TUN plus application tun2socks together.
Runtime and UI
- Core runtimes expose actionable
startError(), exact resource ownership, bounded startup/shutdown, and deterministic cleanup. Process-backed runtimes additionally own and reap their exact child process. Keep platform exit codes semantically intact. - Keep runtime modules importable without constructing editor widgets. Use literal, discoverable lazy imports/registrations so Nuitka includes every editor family without per-editor command changes.
- Backend editors follow
Furious/Qt/AGENTS.md; factories create fresh transient editors and registries retain factories/classes, not editor instances.
Verification
- Test URI/mapping round trips, malformed input, runtime document equality, original-document immutability, all native-TUN matrix cases, proxy-only stripping, failed core startup, and cleanup.