
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
claude-secure-installer
Advanced tools
🔐 通过mTLS代理安全安装Claude Code的npm包
npm install -g @yourcompany/claude-secure-installer
# 使用默认配置快速安装
claude-secure install
# 或者使用自定义配置
claude-secure install --proxy https://your-proxy:3130 --cert-path ./mycerts
# 一键安装,使用默认配置
claude-secure install
这会自动:
# Step 1: 生成客户端证书
claude-secure setup-certs \
--server-cert /path/to/server.crt \
--server-key /path/to/server.key \
--output ./certs
# Step 2: 配置npm代理
claude-secure config \
--proxy https://8.216.35.106:3130 \
--cert-path ./certs
# Step 3: 安装Claude Code
npm install -g @anthropic-ai/claude-code
const { oneClickInstall, quickInstall } = require('@yourcompany/claude-secure-installer');
// 快速安装
await quickInstall();
// 自定义安装
await oneClickInstall({
proxyUrl: 'https://your-proxy:3130',
certPath: './mycerts',
serverCert: '/path/to/server.crt',
serverKey: '/path/to/server.key',
cleanup: true
});
| 选项 | 描述 | 默认值 |
|---|---|---|
-p, --proxy <url> | 代理服务器地址 | https://8.216.35.106:3130 |
-c, --cert-path <path> | 证书文件路径 | ./certs |
--skip-cert-setup | 跳过证书设置 | false |
| 选项 | 描述 | 默认值 |
|---|---|---|
-s, --server-cert <path> | 服务器证书路径 | 必须 |
-k, --server-key <path> | 服务器私钥路径 | 必须 |
-o, --output <path> | 输出目录 | ./certs |
| 选项 | 描述 | 默认值 |
|---|---|---|
-p, --proxy <url> | 代理服务器地址 | https://8.216.35.106:3130 |
-c, --cert-path <path> | 证书文件路径 | ./certs |
安装完成后会生成以下文件:
certs/
├── client.crt # 客户端证书
├── client.key # 客户端私钥
└── ca.crt # CA证书(服务器证书副本)
Q: 连接超时或拒绝连接
A: 检查代理服务器是否启动,防火墙是否开放端口
Q: 证书验证失败
A: 确保客户端证书由正确的CA签发,检查证书路径
Q: npm配置错误
A: 运行 claude-secure config 重新配置代理设置
如果需要手动清理npm配置:
npm config delete proxy
npm config delete https-proxy
npm config delete cert
npm config delete key
npm config delete ca
npm config set strict-ssl true
# 克隆项目
git clone https://github.com/yourcompany/claude-secure-installer.git
# 安装依赖
cd claude-secure-installer
npm install
# 本地测试
npm link
claude-secure --help
# 启用详细输出
DEBUG=claude-secure* claude-secure install
MIT License
如有问题请提交 GitHub Issues
FAQs
一键安装Claude Code的安全工具,自动生成证书,支持mTLS代理
We found that claude-secure-installer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.