holo-deck-0.1.1 is not a library.
Holodeck
Features
- 🚀 Fast HTTP file server built with Hyper and Tokio
- 📤 File uploads via POST requests
- 📥 File downloads via GET requests
- 🌐 Reverse SSH tunneling for external access
- 🔒 Security - Path traversal protection
- 🔑 Smart SSH key management - Automatic key detection with priority
- 🎨 Clean output - Beautiful tunnel URL display
Quick Start
Installation
Local Server Only
# Start the server locally
# Or with cargo
The server will automatically bind to a random available port (displayed on startup)
With External Tunnel
# Start with automatic external tunnel via localhost.run
SSH_SERVER=ssh.localhost.run
The tunnel URL will be automatically displayed:
╔════════════════════════════════════════════════════════════════╗
║ TUNNEL ACTIVE ║
╠════════════════════════════════════════════════════════════════╣
║ External URL: https://abc123.lhr.life ║
╚════════════════════════════════════════════════════════════════╝
Usage Examples
List Files
# Local (use the port displayed on startup, e.g., 59830)
# External (via tunnel)
Upload a File
# Local (use your server's port)
# External
Download a File
# Local (use your server's port)
# External
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
SSH_SERVER |
SSH server address (e.g., ssh.localhost.run) | None (local only) |
SSH_USER |
SSH username | localhost |
SSH_PORT |
SSH server port | 22 |
SSH_KEY_PATH |
Path to SSH private key | None (required for key auth) |
SSH_PASSWORD |
SSH password | None (alternative to key auth) |
REMOTE_PORT |
Remote port to listen on | 80 |
RUST_LOG |
Enable debug logging | None |
Custom Configuration
# Use a specific SSH key
SSH_SERVER=ssh.localhost.run SSH_KEY_PATH=/.ssh/id_ed25519
# Use password authentication instead of key
SSH_SERVER=ssh.localhost.run SSH_PASSWORD=mypassword
# Custom remote port
SSH_SERVER=ssh.localhost.run SSH_KEY_PATH=/.ssh/id_ed25519 REMOTE_PORT=8080
# Enable debug logging
RUST_LOG=debug SSH_SERVER=ssh.localhost.run SSH_KEY_PATH=/.ssh/id_ed25519
Architecture
Holo-Deck is built with:
- Hyper - Fast HTTP implementation
- Tokio - Async runtime
- russh - Pure Rust SSH implementation
- Rust 2024 edition - Latest language features
How It Works
- HTTP Server: Binds to a random available port on localhost, handles GET/POST requests
- Reverse SSH Tunnel: Connects to SSH server (e.g., localhost.run)
- Bidirectional Proxy: Routes external traffic through SSH to local server
- File Storage: Files stored in current working directory
Security Considerations
- ✅ Path traversal protection (blocks
..and/in filenames) - ✅ Local-only HTTP server (binds to 127.0.0.1)
- ✅ SSH key authentication for tunneling
- ⚠️ No authentication on file access - suitable for temporary sharing
- ⚠️ Tunnel URLs are public - anyone with the URL can access files
Recommendation: Use Holo-Deck for temporary file sharing in trusted environments. For production use, add authentication and HTTPS.
Development
Building from Source
Running Tests
Project Structure
holo-deck/
├── src/
│ └── main.rs # HTTP server and CLI
├── Cargo.toml
├── README.md
└── logo.png
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is dual-licensed under:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
You may choose either license for your use.
Acknowledgments
- Built with ❤️ using Rust
- Inspired by Python's
http.serverand ngrok - SSH tunneling powered by russh
- Tunnel hosting via localhost.run
Changelog
See CHANGELOG.md for release history.
Made with Rust 🦀