MCPcopy
hub / github.com/alibaba/lightproxy / showGuide

Function showGuide

src/main/install.ts:140–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 // macOS big sur do not allow trust cert in any auto way
139 // show box to guide user run command
140 const showGuide = () => {
141 const cmd = `echo "Please input local login password 请输入本地登录密码" && sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${path.join(
142 dir,
143 CERT_FILE_NAME,
144 )}" && sudo cp ${formatPath(PROXY_CONF_HELPER_FILE_PATH)} ${formatPath(
145 PROXY_CONF_HELPER_PATH,
146 )} && sudo chown root:admin ${formatPath(PROXY_CONF_HELPER_PATH)} && sudo chmod a+rx+s ${formatPath(
147 PROXY_CONF_HELPER_PATH,
148 )} && touch ${INSTALL_DONE_FILE} && echo "安装完成"
149 `;
150 clipboard.writeText(cmd);
151
152 dialog.showMessageBoxSync({
153 type: 'info',
154 message: `Paste command to your Terminal and run to install cert and helper
155 (命令已复制到剪贴板)粘贴命令到终端并运行以安装并信任证书
156 `,
157 });
158 };
159 showGuide();
160 while (!fs.existsSync(INSTALL_DONE_FILE)) {
161 showGuide();

Callers 1

installCertAndHelperFunction · 0.85

Calls 1

formatPathFunction · 0.85

Tested by

no test coverage detected