chore: release v0.4.27

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
decolua
2026-05-09 22:48:07 +07:00
parent b184444f34
commit b39eb61c33
24 changed files with 517 additions and 229 deletions

View File

@@ -1,6 +1,6 @@
const { log, err } = require("../logger");
const DEFAULT_LOCAL_ROUTER = "http://127.0.0.1:20128";
const DEFAULT_LOCAL_ROUTER = "http://localhost:20128";
const ROUTER_BASE = String(process.env.MITM_ROUTER_BASE || DEFAULT_LOCAL_ROUTER)
.trim()
.replace(/\/+$/, "") || DEFAULT_LOCAL_ROUTER;

View File

@@ -16,7 +16,7 @@ const { isCertExpired } = require("./cert/rootCA");
const { DATA_DIR, MITM_DIR } = require("./paths");
const { log, err } = require("./logger");
const DEFAULT_MITM_ROUTER_BASE = "http://127.0.0.1:20128";
const DEFAULT_MITM_ROUTER_BASE = "http://localhost:20128";
function shellQuoteSingle(str) {
if (str == null || str === "") return "''";
@@ -576,12 +576,14 @@ async function startServer(apiKey, sudoPassword, forceKillPort443 = false) {
}
// Spawn directly — process already has admin rights
// cwd=tmpdir so process doesn't lock the install dir on Windows (EBUSY on update)
serverProcess = spawn(
process.execPath,
[effectiveServerPath],
{
detached: false,
windowsHide: true,
cwd: os.tmpdir(),
stdio: ["ignore", "pipe", "pipe"],
env: {
...process.env,
@@ -615,6 +617,7 @@ async function startServer(apiKey, sudoPassword, forceKillPort443 = false) {
serverProcess = spawn(process.execPath, [effectiveServerPath], {
detached: false,
windowsHide: true,
cwd: os.tmpdir(),
stdio: ["ignore", "pipe", "pipe"],
env: {
...process.env,