Loading...
Loading...
Compare original and translation side by side
npx @feng3d/chuantou-server -p 9000 -t "my-token"npx @feng3d/chuantou-client -s ws://server:9000 -t "my-token" -p "8080:http:3000:localhost"npx @feng3d/chuantou-server -p 9000 -t "my-token"npx @feng3d/chuantou-client -s ws://server:9000 -t "my-token" -p "8080:http:3000:localhost"npx @feng3d/chuantou-server [选项]-p, --port <端口>-a, --host <地址>-t, --tokens <令牌>--tls-key <路径>--tls-cert <路径>npx @feng3d/chuantou-server [options]-p, --port <port>-a, --host <address>-t, --tokens <tokens>--tls-key <path>--tls-cert <path>npx @feng3d/chuantou-client [选项]-s, --server <URL>ws://li.feng3d.com:9000-t, --token <令牌>-p, --proxies <配置>远程端口:协议:本地端口:本地地址npx @feng3d/chuantou-client [options]-s, --server <URL>ws://li.feng3d.com:9000-t, --token <token>-p, --proxies <config>remote-port:protocol:local-port:local-address远程端口:协议:本地端口:本地地址远程端口协议httpws本地端口本地地址remote-port:protocol:local-port:local-addressremote-portprotocolhttpwslocal-portlocal-addressnpx @feng3d/chuantou-server --tls-key /path/to/key.pem --tls-cert /path/to/cert.pemwss://npx @feng3d/chuantou-client -s wss://server:9000 ...npx @feng3d/chuantou-server --tls-key /path/to/key.pem --tls-cert /path/to/cert.pemwss://npx @feng3d/chuantou-client -s wss://server:9000 ...~/.chuantou/server.jsonclient.jsonnpx @feng3d/chuantou-server -c ~/.chuantou/server.json~/.chuantou/server.jsonclient.jsonnpx @feng3d/chuantou-server -c ~/.chuantou/server.jsonundefinedundefined
访问 `http://服务器IP:8080` 即可访问本地开发服务器。
Visit `http://server-ip:8080` to access the local development server.npx @feng3d/chuantou-client -s ws://服务器IP:9000 -t "my-token" -p "8080:http:3000:localhost"http://服务器IP:8080npx @feng3d/chuantou-client -s ws://server-ip:9000 -t "my-token" -p "8080:http:3000:localhost"http://server-ip:8080npx @feng3d/chuantou-client \
-s ws://服务器IP:9000 \
-t "my-token" \
-p "8080:http:3000:localhost,8081:ws:3001:localhost,8082:http:8000:localhost"| 远程端口 | 协议 | 本地端口 | 用途 |
|---|---|---|---|
| 8080 | http | 3000 | Web 服务 |
| 8081 | ws | 3001 | WebSocket 服务 |
| 8082 | http | 8000 | API 服务 |
npx @feng3d/chuantou-client \
-s ws://server-ip:9000 \
-t "my-token" \
-p "8080:http:3000:localhost,8081:ws:3001:localhost,8082:http:8000:localhost"| Remote Port | Protocol | Local Port | Purpose |
|---|---|---|---|
| 8080 | http | 3000 | Web Service |
| 8081 | ws | 3001 | WebSocket Service |
| 8082 | http | 8000 | API Service |
undefinedundefinedundefinedundefinednpx @feng3d/chuantou-server -p 9000 -t "my-secret-token"npx @feng3d/chuantou-server -p 9000 -t "my-secret-token"
3. **启动客户端**(在本地机器):
```bash
npx @feng3d/chuantou-client \
-s ws://服务器IP:9000 \
-t "my-secret-token" \
-p "8080:http:3000:localhost"http://服务器IP:8080
3. **Start the Client** (on your local machine):
```bash
npx @feng3d/chuantou-client \
-s ws://server-ip:9000 \
-t "my-secret-token" \
-p "8080:http:3000:localhost"http://server-ip:8080| 问题 | 解决方案 |
|---|---|
| 连接失败 | 检查服务端是否运行、令牌是否正确、地址是否正确、防火墙是否开放端口 |
| 端口被占用 | 使用 |
| TLS 错误 | 服务端启用 TLS 后,客户端必须使用 |
| 隧道断开 | 客户端会自动重连,检查网络稳定性 |
| 无法访问本地服务 | 确认本地服务已启动,端口和地址配置正确 |
| Issue | Solution |
|---|---|
| Connection failed | Check if the server is running, if the token is correct, if the address is correct, and if the firewall has opened the port |
| Port occupied | Use the |
| TLS error | After enabling TLS on the server, the client must use the |
| Tunnel disconnected | The client will automatically reconnect; check network stability |
| Cannot access local service | Confirm that the local service is running, and the port and address configurations are correct |