Check MCP configuration, SSH connectivity, backend and capabilities.
Use this first when something does not work: it explains missing
environment variables, SSH key problems and the detected Podkop/Forkop
version without changing the router.
输入参数target
Return service, sing-box, DNS and version status of the router.
输入参数target
Return sing-box features compiled into the installed Forkop core (read-only).
输入参数target
Validate a Forkop config file on the router without applying it (read-only).
输入参数path必填target
Return the status of the last Forkop installer run (read-only).
输入参数offsettarget
Return the last Forkop installer log, redacted (read-only).
输入参数target
Return model, OpenWrt version, kernel, load, memory, disk and WAN info.
输入参数target
Run read-only health checks: sing-box, nftables, FakeIP and DNS.
``full=true`` additionally runs the global network check, which can
take up to a minute because it tests real connectivity.
输入参数fulltargettimeout
Return recent router logs, filtered and redacted.
``source`` selects Forkop/Podkop journal, sing-box journal or the whole
system log. Secrets in URLs are masked before returning.
输入参数linesfiltersourcetarget
Run a read-only Forkop/Podkop CLI command from the allowlist.
Mutating commands (start, stop, reload, list_update, subscription_update,
component actions) are rejected: use dedicated tools so that backups and
rollback are applied. Output is redacted unless reveal_secrets=true.
输入参数argstargetcommand必填timeoutparse_jsonreveal_secrets
Return the full UCI configuration as structured JSON.
Secrets (subscription URLs, proxy strings, keys) are masked unless
reveal_secrets=true. The structure is identical for Forkop 1.x/2.x and
Podkop; use podkop_sections_list for a compact view.
输入参数targetpackageinclude_rawreveal_secrets
Export the UCI config as text (backup-style).
``raw`` requires reveal_secrets=true because it contains proxy URLs and
keys. By default the masked export from Forkop is returned.
输入参数modetargetreveal_secrets
Read a single UCI option or section by path, e.g. forkop.main.domain.
输入参数path必填targetreveal_secrets
Set a UCI option or list. Dry-run by default; apply=true writes, backs up and reloads.
``value_type=auto`` sets a list when ``value`` is a list, otherwise an
option. The tool preserves the backend package and never touches other
OpenWrt packages.
输入参数path必填applyvalue必填reasontargetvalue_type
Delete a UCI option. Dry-run by default; apply=true writes with backup.
输入参数path必填applyreasontarget
Create a config backup on the router (dry-run by default).
输入参数applyreasontarget
List config backups stored on the router.
输入参数limittarget
Restore a config backup by id. Dry-run shows the action; apply=true restores and reloads.
输入参数applytargetbackup_id必填
List routing sections with action, enabled flag, domain counts and lists.
This is the fastest overview of what Forkop/Podkop is doing. Child UCI
sections (subscriptions, URLTest groups, links) are counted; set
include_children=true to return them too.
输入参数targetreveal_secretsinclude_children
Return all options of one section plus its child items.
输入参数targetsection必填reveal_secretsinclude_children
Create a new routing section. Dry-run by default.
Minimal defaults are backend-specific: Forkop gets enabled=1 and the
requested action; Podkop gets connection_type=proxy. For zapret2 on
Forkop 1.x you must pass nfqws2_opt in options, otherwise the generated
config will be rejected by the core.
输入参数name必填applyactiontargetoptions
Create a Forkop 2.x tunnel child (WARP/WireGuard/OpenVPN/...). Dry-run by default.
``kind`` is one of warp, wireguard, amneziawg, tailscale,
openvpn-client, openconnect, json. Extra backend options are passed
through; secrets in preview are masked.
输入参数kind必填name必填applylabeltargetoptionssection必填
Create a generic Forkop 2.x child (urltest/fallback_group/link/interface/json/tunnel_peer).
This is a low-level escape hatch for new 2.0 entities; domain tools and
podkop_subscription_add remain the safe high-level paths. Dry-run by default.
输入参数name必填applylabeltargetoptionssection必填child_type必填
Update selected options of a section (partial update). Dry-run by default.
Use podkop_domains_add/remove for domain lists: this tool writes raw
values but does not normalize domain syntax.
输入参数applytargetoptions必填section必填
Delete a section. Child items are deleted when cascade=true.
Deleting the main section is refused unless allow_main=true; it is
usually a configuration error. Dry-run by default.
输入参数applytargetcascadesection必填allow_main
Enable or disable a section without deleting it.
输入参数applytargetenabled必填section必填
List domains of one section, normalized plus the raw stored value.
Works for all backends: Forkop 1.x keeps domain as one space-separated
string, Forkop 2.x keeps one entry per line in destinations, Podkop uses
the user_domains UCI list. Use the returned storage/option values to
understand why entries are written the way they are.
输入参数targetsection
Add domains to a section preserving the backend storage type.
Forkop 1.x keeps section.domain as a single string: the tool never turns
it into a UCI list (that would break domain_suffix matching). Forkop 2.x
writes multiline destinations, Podkop uses the user_domains list.
Duplicates are reported and not written again; invalid entries raise an
error. Dry-run by default: the diff and UCI preview are returned and the
router is untouched. With apply=true the config is written, the service
is reloaded and, if verify=true, the first added domain is resolved via
the router DNS to confirm it maps to a FakeIP address.
输入参数applytargetverifydomains必填section必填
Remove domains from a section, keeping the storage type intact.
Domains that are not present are reported in not_found and do not make
the call fail. Dry-run by default.
输入参数applytargetdomains必填section必填
Replace the whole domain set of a section.
Every entry is validated first; on Forkop 2.x comments and blank lines of
the existing destinations block are preserved. Use podkop_domains_add or
podkop_domains_remove for incremental changes. Dry-run by default.
输入参数applytargetdomains必填section必填
Find where a domain is covered by section entries.
Checks every top-level section and returns exact matches with the entry
kind (domain, zone, full, keyword, regex, ip). possible_lists shows
community lists selected in sections: their content lives on the router
as rule-sets, so the server cannot match a domain against them.
输入参数domain必填target
Suggest hosts seen in live connections but not covered by any section.
Groups hosts from the Clash API by traffic, skips IP addresses,
localhost and already covered hosts. With only_direct=true (default) only
hosts whose chain is direct are suggested, i.e. traffic that currently
bypasses the proxy and may need a rule. Feed the result to
podkop_domains_add (suggested_section is usually main).
输入参数limittargetonly_direct
Check one domain: DNS resolution, FakeIP, section coverage, HTTPS probe.
Resolves the domain through the router DNS (127.0.0.1) without touching
the configuration. fakeip=true means the domain maps to 198.18.x.x or
fc00::/18 (sing-box FakeIP ranges) and therefore goes through the proxy.
probe_http runs a curl HEAD request on the router; curl failures are
reported in http_error instead of raising.
输入参数domain必填targetprobe_http
podkop_connections_config
List routing sections with subscriptions, urltest groups, links and tunnels.
Subscription URLs and proxy strings are masked unless
reveal_secrets=true. This is a read-only map of how connections are
configured; use podkop_subscription_* to modify them.
输入参数targetsectionreveal_secrets
Add a subscription to a section. Dry-run by default; apply=true writes.
Accepts http(s):// URLs or local absolute paths (max 4096 chars).
Forkop creates a child section {section}_sub_N with sensible defaults;
Podkop writes subscription_url inline into the section.
输入参数url必填applytargetoptionssection必填
podkop_subscription_delete
Delete a subscription by name, 1-based index, tag or raw URL.
When ``section`` is given, only its children are considered. Podkop
removes the subscription_url option instead. Dry-run by default.
输入参数applytargetsectionidentifier必填
podkop_subscription_update
Refresh subscription cache on the router (apply must be true).
Uses async update with status polling when the backend supports it,
otherwise runs the blocking subscription_update command. Bounded by
``timeout`` seconds.
输入参数waitapplytargetsectiontimeout
List Clash proxy groups and nodes with delays.
With ``group``, returns that group's members (all) and its current
selection (now). Read-only.
输入参数grouptarget
Select a proxy inside a Clash group (runtime change, not config).
Dry-run shows what would be selected. apply=true performs the switch;
on Forkop 1.x this raises BackendError because runtime selection is
not supported there — that is expected behaviour.
输入参数applygroup必填proxy必填target
Run read-only proxy check and report selected-group delays.
Calls check_proxy via CLI when available; falls back to reporting
delays of currently selected proxies from Clash API history.
输入参数target
Return a monitoring snapshot: service, system, proxies, connections, traffic.
Collects everything available in one call; each part fails
independently (errors are reported in check_errors instead of raising).
Read-only and safe to call repeatedly.
输入参数toptargetinclude_connections
List live connections with optional filters (host, source_ip, chain).
``host`` and ``chain`` are case-insensitive substrings; ``source_ip``
matches exactly or as a network prefix ("192.0.2." matches all
clients in that subnet). Read-only.
输入参数hostchainlimittargetsource_ip
Measure traffic rate by sampling Clash connections twice.
Returns download/upload bps, per-connection deltas and the top
consumers. ``sample_seconds`` is clamped to 0.5..10 s. Read-only; the
call blocks for the sampling interval.
输入参数toptargetsample_seconds
Start, stop, restart, reload or toggle autostart of Podkop/Forkop.
Dry-run by default. ``stop`` is refused in read-only mode. Use
podkop_apply-style tools for config changes; this tool only controls the
service lifecycle.
输入参数waitapplyaction必填targettimeout
Update built-in lists and/or subscriptions.
This changes the router's downloaded rule sets and subscription cache,
so apply=true is required. Long operations are bounded by ``timeout``.
输入参数kindwaitapplytargettimeout