# Adding a Proxy Core or Notifier
`proxy-pilot` is designed so new proxy cores and notification channels can be added without modifying `src/engine/`.
## Adding a New Proxy Core (e.g. `sing-box`)
1. Create a new module under `src/core/<name>/mod.rs` (e.g. `src/core/singbox/mod.rs`).
2. Implement the `ProxyCore` trait defined in `src/core/mod.rs`:
- `name()`
- `is_installed()` / `install()`
- `active_profile()` / `switch_profile(outbound_tag)`
- `reload()`
3. Export the module in `src/core/mod.rs`.
4. Register the new `core.kind` value in the CLI factory (`src/cli/`).
5. Add unit tests covering config parsing and atomic outbound switching using `tempfile`.
## Adding a New Notifier (e.g. SMS, Email, Heartbeat)
1. Create a new file under `src/notify/<channel>.rs` (e.g. `src/notify/sms.rs`).
2. Implement the `Notifier` trait defined in `src/notify/mod.rs`:
- `channel_name()`
- `send(event: &AlertEvent)`
3. Add the optional configuration struct in `src/config/mod.rs` and document it in `config.example.yaml`.
4. Wire the notifier in `src/cli/` when enabled in config.
5. Add unit tests verifying payload formatting and error handling without making live network calls.