()
| 350 | await execAsync("sudo systemctl disable wireproxy || true"); |
| 351 | return "✅ wireproxy 已停止"; |
| 352 | } catch (e: any) { |
| 353 | return `❌ wireproxy 停止失败: ${htmlEscape(e?.message || e)}`; |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | static async restart(): Promise<string> { |
| 358 | const binCheck = await SystemExecutor.run(`test -f ${WIREPROXY_BINARY}`); |
| 359 | if (!binCheck.success) { |
| 360 | return `❌ WireProxy 未安装,无法重启。请先使用 <code>${htmlEscape(mainPrefix)}warp w</code> 安装。`; |
| 361 | } |
| 362 | |
| 363 | try { |
no test coverage detected