
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
@feng3d/chuantou-client
Advanced tools
内网穿透转发系统的客户端,运行在内网机器上,将本地服务暴露到公网。
npm install @feng3d/chuantou-client
# 使用默认配置
chuantou-client
# 指定服务器地址
chuantou-client --server ws://your-server.com:9000
# 指定认证令牌
chuantou-client --token your-token
# 指定代理配置
chuantou-client --proxies "8080:http:3000:localhost,8081:ws:3001"
# 使用配置文件
chuantou-client --config /path/to/config.json
import { Controller, ProxyManager } from '@feng3d/chuantou-client';
const config = {
serverUrl: 'ws://your-server.com:9000',
token: 'your-token',
proxies: [
{ remotePort: 8080, protocol: 'http', localPort: 3000, localHost: 'localhost' },
{ remotePort: 8081, protocol: 'websocket', localPort: 3001, localHost: 'localhost' }
]
};
const controller = new Controller(config);
const proxyManager = new ProxyManager(controller);
await controller.connect();
| 参数 | 说明 | 默认值 |
|---|---|---|
--config | 配置文件路径 | ~/.chuantou/client.json |
--server | 服务器地址 | ws://localhost:9000 |
--token | 认证令牌 | jidexiugaio |
--proxies | 代理配置 | 8080:http:3000:localhost,8081:ws:3001 |
remotePort:protocol:localPort:localHost
remotePort - 公网端口protocol - 协议类型 (http 或 ws)localPort - 本地端口localHost - 本地地址(可选,默认 localhost)示例:
8080:http:3000:localhost - 将公网 8080 端口的 HTTP 请求转发到本地 3000 端口8081:ws:3001 - 将公网 8081 端口的 WebSocket 连接转发到本地 3001 端口配置文件路径:~/.chuantou/client.json
{
"serverUrl": "ws://your-server.com:9000",
"token": "your-token",
"reconnectInterval": 5000,
"maxReconnectAttempts": 10,
"proxies": [
{ "remotePort": 8080, "protocol": "http", "localPort": 3000, "localHost": "localhost" },
{ "remotePort": 8081, "protocol": "websocket", "localPort": 3001, "localHost": "localhost" }
]
}
客户端具有自动重连功能,当与服务器的连接断开时,会自动尝试重新连接。
ISC
FAQs
The npm package @feng3d/chuantou-client receives a total of 5 weekly downloads. As such, @feng3d/chuantou-client popularity was classified as not popular.
We found that @feng3d/chuantou-client 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.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.