2025-01-07 23:15:18 +09:00
|
|
|
use super::*;
|
2025-01-04 07:35:04 +09:00
|
|
|
|
2025-01-07 23:15:18 +09:00
|
|
|
pub fn cmds() -> impl Iterator<Item = Command> {
|
|
|
|
|
let cfg = ["config", "cfg"];
|
|
|
|
|
let autoproxy = ["autoproxy", "ap"];
|
|
|
|
|
|
|
|
|
|
[
|
2025-01-20 22:50:45 +09:00
|
|
|
command!([cfg, autoproxy, ["account", "ac"]], "cfg_ap_account_show")
|
|
|
|
|
.help("Shows autoproxy status for the account"),
|
2025-01-07 23:15:18 +09:00
|
|
|
command!(
|
2025-01-15 03:52:32 +09:00
|
|
|
[cfg, autoproxy, ["account", "ac"], Toggle],
|
2025-01-20 22:50:45 +09:00
|
|
|
"cfg_ap_account_update"
|
|
|
|
|
)
|
|
|
|
|
.help("Toggles autoproxy for the account"),
|
|
|
|
|
command!([cfg, autoproxy, ["timeout", "tm"]], "cfg_ap_timeout_show")
|
|
|
|
|
.help("Shows the autoproxy timeout"),
|
2025-01-07 23:15:18 +09:00
|
|
|
command!(
|
2025-01-08 18:31:59 +09:00
|
|
|
[
|
|
|
|
|
cfg,
|
|
|
|
|
autoproxy,
|
|
|
|
|
["timeout", "tm"],
|
2025-01-15 03:52:32 +09:00
|
|
|
any!(Disable, Reset, ("timeout", OpaqueString::SINGLE)) // todo: we should parse duration / time values
|
2025-01-08 18:31:59 +09:00
|
|
|
],
|
2025-01-20 22:50:45 +09:00
|
|
|
"cfg_ap_timeout_update"
|
|
|
|
|
)
|
|
|
|
|
.help("Sets the autoproxy timeout"),
|
2025-01-07 23:15:18 +09:00
|
|
|
]
|
|
|
|
|
.into_iter()
|
|
|
|
|
}
|