mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix some scripting issues
This commit is contained in:
parent
2158478894
commit
97bbc77162
11 changed files with 129 additions and 53 deletions
|
|
@ -36,7 +36,8 @@ if (command === "setup") {
|
|||
// Pass remaining arguments to runCommand
|
||||
const runArgs = process.argv.slice(3);
|
||||
runCommand(runArgs);
|
||||
} else if (command === "generate-cert") {
|
||||
} else if (command === "_generate-cert") {
|
||||
// Internal command for installer
|
||||
// Pass remaining arguments to generateCertCommand
|
||||
const certArgs = process.argv.slice(3);
|
||||
generateCertCommand(certArgs);
|
||||
|
|
@ -59,9 +60,7 @@ function writeHelp() {
|
|||
ui.writeInformation(
|
||||
`Available commands: ${chalk.cyan("setup")}, ${chalk.cyan(
|
||||
"teardown"
|
||||
)}, ${chalk.cyan("setup-ci")}, ${chalk.cyan("run")}, ${chalk.cyan(
|
||||
"generate-cert"
|
||||
)}, ${chalk.cyan("help")}, ${chalk.cyan("--version")}`
|
||||
)}, ${chalk.cyan("setup-ci")}, ${chalk.cyan("run")}, ${chalk.cyan("help")}, ${chalk.cyan("--version")}`
|
||||
);
|
||||
ui.emptyLine();
|
||||
ui.writeInformation(
|
||||
|
|
@ -84,11 +83,6 @@ function writeHelp() {
|
|||
"safe-chain run"
|
||||
)}: Run the proxy as a standalone service. Sets system-wide proxy environment variables. Options: --verbose`
|
||||
);
|
||||
ui.writeInformation(
|
||||
`- ${chalk.cyan(
|
||||
"safe-chain generate-cert"
|
||||
)}: Generate CA certificate for MITM proxy. Options: --output <directory>`
|
||||
);
|
||||
ui.writeInformation(
|
||||
`- ${chalk.cyan(
|
||||
"safe-chain --version"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import path from "path";
|
|||
import fs from "fs";
|
||||
import os from "os";
|
||||
|
||||
const certFolder = path.join(os.homedir(), ".safe-chain", "certs");
|
||||
const certFolder = process.env.SAFE_CHAIN_CERT_DIR || path.join(os.homedir(), ".safe-chain", "certs");
|
||||
const ca = loadCa();
|
||||
|
||||
const certCache = new Map();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue