Easy SSH tunneling with FRP - One command setup for Google Colab and remote servers
Project description
🚀 FRP Tunnel - SSH Access Made Easy
Connect to Google Colab or any remote server via SSH in 30 seconds. No complex setup needed!
🎯 What This Does
- Problem: Can't SSH into Google Colab or access remote servers behind firewalls
- Solution: Creates a secure tunnel so you can SSH from anywhere
- Result: Use your favorite tools (VS Code, file transfer, etc.) with remote servers
⚡ Quick Start
Install
pip install frp-tunnel
Start Server (One-time setup)
# Auto-generates token and config
ft server
# Output:
# 🚀 Starting server...
# 🔑 Generated token: frp_abc123...
# ✅ Server started
Connect Client
# First time - specify server and token
ft client --server YOUR_SERVER_IP --token YOUR_TOKEN --port 6003
# Multiple ports (SSH + RDP)
ft client --server YOUR_SERVER_IP --token YOUR_TOKEN --port 6003 --port 6004
# Add more ports later (reuses existing config)
ft client-add-port 6005 6006
# Remove ports
ft client-remove-port 6005
# Then SSH normally
ssh -p 6003 user@YOUR_SERVER_IP
🎮 Commands
# Server
ft server # Start server (auto-gen token)
ft server -f # Force restart
ft server -r # Restart
ft server-status # Show server status
# Client
ft client --server IP --token TOKEN --port 6003 --port 6004
ft client-add-port 6005 6006 # Add ports to existing config
ft client-remove-port 6005 # Remove ports
ft client-status # Show client status
# Forward to frpc/frps
ft frpc -c ~/data/frp/frpc.yaml # Start client
ft frpc reload -c ~/data/frp/frpc.yaml # Hot reload
ft frps -c ~/data/frp/frps.yaml # Start server
# Utilities
ft token # Generate new token
ft version # Show version
ft stop # Stop all
📊 Status Display
$ ft server-status
📊 Server Status
🖥️ Server: Running
🌐 Public IP: 34.102.78.219
📄 Config: ~/data/frp/frps.ini
📋 Log: ~/data/frp/frps.log
🔧 Binary: ~/.frp-tunnel/bin/frps
👥 Active clients: 1
• ssh_6000: port 6000 (v0.52.3, 0 conns)
🔧 Configuration
Server Config (~/data/frp/frps.yaml)
bindPort: 7000
auth:
token: frp_your_token_here
webServer:
addr: 0.0.0.0
port: 7500
user: admin
password: admin
log:
to: ~/data/frp/frps.log
level: info
Client Config (~/data/frp/frpc.yaml)
serverAddr: YOUR_SERVER_IP
serverPort: 7000
auth:
token: frp_your_token_here
log:
to: ~/data/frp/frpc.log
level: info
webServer:
addr: 127.0.0.1
port: 7400
proxies:
- name: ssh_6003
type: tcp
localIP: 127.0.0.1
localPort: 22
remotePort: 6003
- name: rdp_6004
type: tcp
localIP: 127.0.0.1
localPort: 3389
remotePort: 6004
Note: Both server and client use YAML format (INI is deprecated in FRP 0.52+). The webServer section enables hot reload and dashboard access.
Use ft client-add-port and ft client-remove-port commands to manage ports easily.
🌟 Features
- ✅ Auto-download FRP binaries (no manual installation)
- ✅ Auto-generate token and config
- ✅ YAML config - Modern format with hot reload support
- ✅ Multiple ports - SSH, RDP, or any service
- ✅ Easy port management - add/remove ports without editing config
- ✅ Hot reload - Update config without disconnecting SSH
- ✅ Background mode - runs as daemon
- ✅ Multi-platform - Windows, Linux, macOS
- ✅ Dashboard - Web UI at port 7500
- ✅ API support - Query client status via REST API
- ✅ Systemd integration - Auto-start on Linux boot
- ✅ Health monitoring - Windows client with auto-monitoring (5.5h runtime limit)
🛠️ Advanced Usage
Systemd Service (Linux Server)
# Enable auto-start on boot
sudo systemctl enable frps.service
sudo systemctl start frps.service
sudo systemctl status frps.service
The service file is automatically created at /etc/systemd/system/frps.service and will restart the server automatically if it crashes.
Windows Client Monitoring
The Windows boot script includes automatic monitoring:
- Creates
C:\running.txtas a health check file - Monitors FRP client status every 50 seconds
- Auto-stops after 5.5 hours runtime
- Deleting
C:\running.txtwill stop the monitoring loop
Hot Reload (No SSH Disconnection)
# Start client with webServer enabled (auto-configured)
ft frpc -c ~/data/frp/frpc.yaml &
# Add/remove ports
ft client-add-port 6005 6006
ft client-remove-port 6004
# Hot reload - no SSH disconnection!
ft frpc reload -c ~/data/frp/frpc.yaml
Multiple Ports
Use commands to manage ports easily:
# Add multiple ports at once
ft client-add-port 6005 6006 6007
# Remove specific ports
ft client-remove-port 6005
# Or edit config manually: ~/data/frp/frpc.yaml
Dashboard Access
Visit http://YOUR_SERVER_IP:7500 (admin/admin)
API Access
curl -u admin:admin http://localhost:7500/api/proxy/tcp
📋 Requirements
- Server: Any Linux VPS (Google Cloud, AWS, DigitalOcean, etc.)
- Ports: Open ports 6000-6010 and 7000, 7500 on your server
- Client: Any computer with SSH
🙏 Acknowledgments
Special thanks to the FRP project authors for creating the excellent reverse proxy tool that makes this package possible.
⭐ Star this repo if it saved you time!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file frp_tunnel-1.1.3.tar.gz.
File metadata
- Download URL: frp_tunnel-1.1.3.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f85ed798ee1f8cbdebce91a34d7335b2f096d2c9abcc429eed8f1772320fd3b
|
|
| MD5 |
5fd83235e1c9e6ca1487d99044cbd792
|
|
| BLAKE2b-256 |
c61ba6a1939b83c20d5c6906ab194c921581394f85a65be0dc2a7c39012cd320
|
File details
Details for the file frp_tunnel-1.1.3-py3-none-any.whl.
File metadata
- Download URL: frp_tunnel-1.1.3-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c273458a6dd55ad1bc47677f5c03891abd605aefc4fafb0ae502abd1ed1c67a2
|
|
| MD5 |
35d0beacbf580925d2dd0a46cf1efec8
|
|
| BLAKE2b-256 |
31e3f93895b6825e21514858f87a45c40bbcfe843fbd5613f3144e5ae25994b7
|