简体中文 | English
A modern SSH port forwarding management tool with a beautiful web interface and comprehensive API.
- 🚀 Modern Interface - Responsive design for desktop and mobile devices
- 📋 Configuration Management - Auto-parse SSH config files (
~/.ssh/configformat) - 🔄 Persistent Storage - Auto-restore port forwarding settings after restart
- ⚡ Real-time Monitoring - Display connection status and duration
- 🔌 Rich API - Complete REST API support
- 🛡️ Secure & Reliable - SSH key-based authentication
- 📊 Status Management - Detailed connection management and error handling
- Clone the repository:
git clone https://github.com/SonglinLife/sstunnel-web.git
cd sstunnel-web- Install dependencies:
npm install- Prepare SSH configuration file:
# Copy your SSH config or create a new one
cp ~/.ssh/config ./ssh-config- Start the server:
npm start # Default port 7432
npm start -- --port 8080 # Custom port
npm start -- --help # Show help- Open your browser and navigate to:
http://localhost:7432
- Select SSH host, set local and remote ports, and start port forwarding!
SSH config file should follow standard ~/.ssh/config format:
Host production-server
HostName prod.example.com
User admin
Port 22
IdentityFile ~/.ssh/prod_key
Host development-server
HostName 192.168.1.100
User developer
Port 22
IdentityFile ~/.ssh/id_rsa
GET /api/health- Health checkGET /api/status- System statusGET /api/ssh-configs- Get SSH configuration list
POST /api/forward- Create port forwardingGET /api/connections- Get active connectionsDELETE /api/forward/:key- Stop specific forwardingDELETE /api/connections- Stop all forwarding
GET /api/ports/check/:port- Check port availabilityPOST /api/test-ssh- Test SSH connection
# Create port forwarding
curl -X POST http://localhost:7432/api/forward \
-H 'Content-Type: application/json' \
-d '{"host":"production-server","localPort":8080,"remotePort":80}'
# Get active connections
curl http://localhost:7432/api/connections
# Stop all forwarding
curl -X DELETE http://localhost:7432/api/connections- Local Development - Forward remote database ports to local
- Service Debugging - Access internal services on remote servers
- Secure Access - Safely access remote resources through SSH tunnels
- Team Collaboration - Centralized SSH port forwarding management
- Auto-save port forwarding configurations
- Auto-restore forwarding after server restart
- Batch management and cleanup support
- Port occupation detection and prompts
- SSH connection status monitoring
- Detailed error messages and solutions
- Gradient backgrounds and glassmorphism effects
- Real-time status updates
- Mobile-responsive design
- Backend: Node.js + Express
- SSH: ssh2 library
- Frontend: Vanilla JavaScript + Modern CSS
- Configuration: SSH Config Parser
- Node.js 14.0+
- SSH key configuration
- SSH access to target servers
Start development mode (auto-reload):
npm run devThis project is licensed under the MIT License.
Issues and Pull Requests are welcome!
- Fork this repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you find any issues, please submit them on the Issues page.
For questions, please contact us through GitHub Issues.
SSHTunnel Web - Making SSH port forwarding simple and elegant ✨
