rotate
Control automatic proxy rotation scheduling via the daemon.
xrat rotate <action> [flags]
All rotate actions require a running daemon:
xrat daemon start
Rotation scheduling moved here from the old
xrat proxy start|status|stopcommands. Theproxynamespace now covers local proxy endpoints and host/ session integration; see proxy.
Actions
| Action | Description |
|---|---|
enable | Enable automatic proxy rotation on a fixed schedule |
disable | Disable automatic proxy rotation |
status | Show the current proxy rotation status |
now | Trigger an immediate manual rotation |
rotate enable
Enable automatic proxy rotation on a fixed schedule.
xrat rotate enable
The daemon enables the rotation scheduler using [runtime.rotation] settings
from config.toml (interval, health trigger, threshold, and cooldown). The
command also writes runtime.rotation.enabled = true atomically, so the choice
survives daemon restarts.
rotate disable
Disable automatic proxy rotation. The active proxy session keeps running; only the scheduler is disabled.
xrat rotate disable
The command writes runtime.rotation.enabled = false atomically. It does not
disconnect the active runtime.
rotate status
Show the current rotation status.
xrat rotate status [--json]
Flags
| Flag | Description |
|---|---|
--json | Print rotation status as JSON |
rotate now
Trigger an immediate manual rotation.
xrat rotate now [--config-id <ref>] [--refresh]
Flags
| Flag | Description |
|---|---|
--config-id | Force rotation to a specific enabled config ref prefix |
--refresh | Refresh URL-backed subscriptions before selecting a candidate |
Behavior
- If
--refreshis provided, re-fetches URL-backed subscriptions before anything else, so the candidate pass sees the freshest configs. - If
--config-idis provided, rotates to that specific config. - Otherwise, selects the best candidate from enabled configs:
- Runs fresh tests using
test_stagesfromconfig.toml; stored results are not reused. - Uses real-delay as the qualifying metric when run, then download, then TCP. ICMP is diagnostic and cannot qualify a candidate alone.
- Runs fresh tests using
- Runs the selected engine’s native config validator before stopping the old session.
- Starts the replacement on the same configured local inbound ports. If that post-stop handoff fails, xrat attempts to restore the previous runtime.
An explicit --config-id bypasses candidate testing and cooldown, but the
config must be enabled, different from the active config, and pass native
preflight validation. An unpinned manual rotation bypasses cooldown but still
runs fresh candidate tests.