@papesambandour/network-tools
v1.3.0
Published
SSH Tunnel Manager with SSL Certificate Generation - Global CLI Tool
Maintainers
Readme
Network Tools
A powerful SSH tunnel manager with SSL certificate generation and server management capabilities, featuring a modern web interface with real-time monitoring.
Features
- SSH Tunnel Management: Create and manage SSH tunnels with local port forwarding
- SSL Server Profiles: Save and reuse SSH server configurations
- SSL Certificate Generation: Create self-signed certificates for development
- Reverse Proxy: Dynamic reverse proxy with support for API and streaming routes
- SSH Terminal: Interactive SSH terminal in the browser
- Real-Time Monitoring: Live logs via WebSocket connection
- Modern Web Interface: Responsive design with intuitive controls
Quick Start
Installation
Global Installation (Recommended)
# Install from npm
npm install -g network-tools
# Or install from a .tgz file
npm install -g network-tools-1.0.1.tgzVerify Installation
network-tools --versionUsage
Start the application:
network-toolsThen open your browser at: http://localhost:3001
Configuration
You can customize the application using environment variables:
# Change the port
PORT=8080 network-tools
# Set custom SSH key path
SSH_KEY_PATH=~/.ssh/custom_key network-toolsOr create a .env file:
PORT=3001
CLIENT_URL=http://localhost:3000
SSH_KEY_PATH=~/.ssh/id_rsaUsing the Application
1. Creating an SSH Tunnel
- Open http://localhost:3001
- Click "New Tunnel"
- Fill in the tunnel configuration:
- Name: Descriptive name for your tunnel
- SSH Host: Your SSH server address
- SSH Port: SSH port (default: 22)
- SSH User: Your username
- Authentication: Password or SSH key path
- Local Port: Port on your machine
- Remote Host: Target host (e.g., localhost, database.internal)
- Remote Port: Target port
- Click "Create Tunnel"
Example: Access a remote web server locally
Name: Remote Web Server
SSH Host: server.example.com
Local Port: 8080
Remote Host: localhost
Remote Port: 80Access via: http://localhost:8080
2. Managing SSL Server Profiles
Save frequently used SSH servers for quick tunnel creation:
- Go to the "SSL Servers" tab
- Click "New Server"
- Configure:
- Server Name: e.g., "Production Server"
- Host: IP or domain
- Port: 22 (default)
- User: SSH username
- Authentication: Password or SSH key
- Description: Optional notes
- Click "Add Server"
When creating tunnels, you can now select a saved server and all SSH fields will auto-fill!
3. Generating SSL Certificates
Create self-signed certificates for development:
- Go to "SSL Certificates" tab
- Click "Generate Certificate"
- Configure:
- Common Name: Domain or hostname (e.g., localhost, myapp.local)
- Country, State, City: Location information
- Organization: Your company/team name
- Validity: Days until expiration
- Click "Generate Certificate"
- Download the certificate and private key
Use Cases:
- Local HTTPS servers
- Development environments
- Testing SSL/TLS functionality
4. Reverse Proxy Routes
Configure dynamic reverse proxy routes to backend services:
- Go to "Reverse Proxy Manager" module from home
- Click "New Route"
- Configure:
- Path: Route path (e.g.,
/api-auth) - Target: Backend URL (e.g.,
http://backend.example.com) - Type:
APIfor REST APIs (uses Axios)Streamfor file downloads, WebSocket, streaming (uses http-proxy-middleware)
- Proxy: Optional proxy server (e.g.,
http://proxy:3128) - Headers: Custom HTTP headers
- Path: Route path (e.g.,
- Click "Create"
- Copy the Internal URL (e.g.,
http://localhost:3001/api-auth) - Use it in your applications!
Features:
- Dynamic route creation without restart
- Support for proxy servers
- Custom headers per route
- Enable/disable routes on the fly
- Test connectivity before creation
- Copy internal URL with one click
Documentation: See Reverse Proxy Module section in ARCHITECTURE.md for detailed information
5. SSH Terminal
Interactive SSH terminal directly in your browser:
- Go to "SSH Terminal" tab
- Connect to any SSH server
- Execute commands in real-time
- Multiple terminal sessions support
6. Real-Time Logs
Monitor all tunnel activity in the "Logs" tab:
- Connection status updates
- Error messages
- Configuration changes
- Auto-scroll to newest logs
Common Use Cases
Database Access Through Jump Server
SSH Host: jump-server.com
SSH User: admin
Local Port: 5432
Remote Host: postgres.internal
Remote Port: 5432Connect your database client to localhost:5432
Accessing Internal Web Services
SSH Host: bastion.company.com
Local Port: 8080
Remote Host: internal-app.local
Remote Port: 80Access internal app via http://localhost:8080
Secure HTTPS Tunnel
SSH Host: gateway.example.com
Local Port: 8888
Remote Host: secure-api.internal
Remote Port: 443Access API via https://localhost:8888
Reverse Proxy Use Case
Path: /github-api
Target: https://api.github.com
Type: API
Proxy: http://corporate-proxy:8080
Headers: Authorization: token ghp_xxxxxAccess GitHub API via http://localhost:3001/github-api/users/octocat
Benefits:
- Bypass CORS restrictions
- Centralize authentication
- Route through corporate proxy
- Add custom headers automatically
Authentication Methods
Using SSH Keys (Recommended)
Generate a key if needed:
ssh-keygen -t rsa -b 4096 -f ~/.ssh/my_keyCopy to server:
ssh-copy-id -i ~/.ssh/my_key.pub [email protected]In the app, set:
- SSH Key Path:
~/.ssh/my_key - SSH Password: (leave empty)
- SSH Key Path:
Using Password
Simply enter your SSH password in the SSH Password field.
Troubleshooting
Command Not Found
# Check npm global bin path
npm config get prefix
# Add to PATH (Linux/macOS)
export PATH="$(npm config get prefix)/bin:$PATH"
# Windows
set PATH=%PATH%;%APPDATA%\npmPort Already in Use
# Find process using the port
lsof -i :3001
# Kill the process
kill -9 <PID>
# Or use a different port
PORT=8080 network-toolsTunnel Connection Issues
Verify SSH access:
ssh user@host -p portCheck SSH key permissions:
chmod 600 ~/.ssh/id_rsaReview logs in the application's Logs tab
WebSocket Connection Issues
- Check if proxies/firewalls are blocking WebSocket connections
- Try disabling VPN temporarily
- Check browser console (F12) for errors
CLI Options
# Start with custom port
PORT=8080 network-tools
# Specify SSH key path
SSH_KEY_PATH=~/.ssh/custom_key network-tools
# Show version
network-tools --version
# Show help
network-tools --helpRequirements
- Node.js >= 14.x
- npm >= 6.x
- SSH access to target servers
- Modern web browser (Chrome, Firefox, Safari, Edge)
Security Best Practices
- Use SSH keys instead of passwords when possible
- Set correct permissions on SSH keys:
chmod 600 ~/.ssh/id_rsa - Never commit SSH keys or passwords to version control
- Use self-signed certificates for development only
- Regularly update the package:
npm update -g network-tools
Documentation
Main Documentation
- README.md: This file - Getting started guide
- ARCHITECTURE.md: Complete technical architecture and detailed documentation
Reverse Proxy Module
All reverse proxy documentation is now consolidated in ARCHITECTURE.md under the Reverse Proxy Module section:
- Complete reverse proxy documentation
- Usage guide with examples (curl, JavaScript, Python)
- Visual examples and workflow
- Feature summary and changelog
- Quick start guide (30-second setup)
- Use cases and best practices
- Troubleshooting guide
Testing
- test-reverse-proxy.sh: Automated test script for reverse proxy
Support
- Documentation: See documentation files above for detailed information
- Issues: Report bugs or request features via your package repository
- Logs: Check the real-time logs in the application for debugging
License
MIT
Author
Pape Samba Ndour
Ready to manage your SSH tunnels with ease!
