tunki
v0.1.0
Published
Expose local servers to the internet with a single command
Maintainers
Readme
Tunki
Self-hosted TCP tunnel for exposing local servers to the internet. A lightweight alternative to ngrok. Single binary for both server and client. Zero dependencies.
Features
- Self-hosted: Full control over your data and infrastructure.
- Multiplexing: Multiple streams over a single TCP connection.
- Resilient: Automatic reconnection and heartbeat monitoring.
- Zero Dependencies: Built with standard Node.js libraries.
Installation
npm install -g tunkiUsage
Server
Start the tunnel server on a public machine (e.g., VPS).
tunki server --port 4000Client
Expose a local HTTP server (e.g., running on port 3000).
tunki http 3000 --server example.com:4000Expose a local TCP service (e.g., SSH on port 22).
tunki tcp 22 --server example.com:4000Protocol
Tunki uses a custom binary protocol over TCP.
- Control Connection: Persistent connection for signaling and multiplexing.
- Frames: Binary frames with header (Type, ID, Length) and payload.
- Heartbeat: Periodic PING/PONG frames to ensure connectivity.
Contributing
This project is in active development. Contributions are welcome!
- Report issues and request features via GitHub Issues
- Submit pull requests for bug fixes and improvements
- Follow the existing code style and architecture
License
MIT
