Fast Tunnel 1.0.2, MIT licence

FTP, MySQL and SSH in one browser tab.

A self-hosted PHP app with a file manager, a MySQL client and an SSH terminal behind one login, in place of FileZilla, phpMyAdmin and PuTTY.

  1. git clone \
  2. https://github.com/arizu-id/fast-tunnel.git
  3. cd fast-tunnel
  4. composer install --optimize-autoloader
  5. chmod -R 775 temp_ssh/ plugins/

Then open https://your-domain/install/ in a browser.

Free under the MIT licence. You host it, so there is no account and no subscription.

Three desktop apps, one tab

Each module talks to its own kind of server. Saved connections share one sidebar, so going from a file to a table to a shell is a click, not another program.

  1. FTPport 21in place of FileZilla
    Fast Tunnel connected to a demo FTP server: saved connections on the left and the remote folder tree of a sample PHP shop

    File manager and code editor

    • Browse the remote folder tree and open files as tabs
    • Drag and drop files to upload them, or drag folders to move them
    • Right-click to rename or delete items and create new files and folders
    • Edit in Monaco, the editor inside VS Code, and save with Ctrl+S

    Built onPHP FTP extension in passive mode, Monaco Editor

  2. MySQLport 3306in place of phpMyAdmin
    Fast Tunnel connected to a demo MySQL server, with the database explorer listing sample databases and the tables of demo_store

    Database client

    • Browse databases and tables page by page
    • Run your own queries in the SQL tab, with an EXPLAIN button
    • Edit or delete rows in tables with a single-column primary key
    • Add, edit or drop columns, truncate or drop tables, drop databases

    Built onPDO MySQL

  3. SSHport 22in place of PuTTY
    Fast Tunnel web terminal signed in to a demo SSH server, with colour output from git log, ls, systemctl, df and a log tail

    Web terminal

    • A login shell with a real PTY, so htop, vim and nano work
    • Output streams to the browser over Server-Sent Events
    • Resizing the window resizes the remote terminal
    • Idle sessions close on their own after one hour

    Built onphpseclib 3, xterm.js

All three panes are crops of real screenshots from a test install, connected to local demo servers filled with sample data.

What happens when you connect

Your browser never talks to your servers directly. Fast Tunnel sits in between, on a server you control.

  1. browser

    You, in any browser

    You sign in to Fast Tunnel and pick a saved connection. Serve it over HTTPS so this hop is encrypted.

  2. fast-tunnel / api.php

    Fast Tunnel, on your server

    • Checks your session and the CSRF token on every POST
    • Decrypts your saved connections for your signed-in session
    • Opens the FTP, MySQL or SSH connection from the server
  3. ftp :21 · mysql :3306 · ssh :22

    Your other servers

    They see a connection from your Fast Tunnel server, on the port you saved for each one.

Where your server passwords live

Fast Tunnel holds the keys to your other servers, so here is how the code guards them. Every point below can be checked in the repository.

Saved connections
Host, username, password and database name are encrypted with AES-256-GCM before they reach the database, each with its own random 12-byte IV. They are decrypted again for your signed-in session when the app loads or uses them, so a strong login password matters.
The key
The installer generates a random 256-bit key and writes it to config.php. The .htaccess blocks that file from the web and .gitignore keeps it out of Git.
Your login
Passwords are stored as bcrypt hashes. Five wrong passwords from one IP within 15 minutes block that IP until the window passes. The session is tied to your IP address and browser, with an HttpOnly, SameSite=Strict cookie.
Every API call
One gateway, api.php, checks the session first. Every POST must also carry an X-CSRF-Token header, compared with hash_equals.
Backup files
Exported connections are encrypted in your browser with a password you choose: PBKDF2 with SHA-256 and 100,000 iterations, then AES-GCM.
Plugin uploads
Since version 1.0.1, ZIP files are checked for path traversal and executable file types before they are unpacked. The fix followed a report through VulDB, submission 990501.
public static function encrypt(string $plain):string{
$key=hex2bin(ENCRYPTION_KEY);
$iv=random_bytes(12);
$cipher=openssl_encrypt($plain,'aes-256-gcm',$key,OPENSSL_RAW_DATA,$iv,$tag,'',$tagLen=16);
return base64_encode($iv.$tag.$cipher);
}
Lines 120 to 125 of backend/Auth.php, copied as they are. Decrypt reverses the steps and refuses any value whose GCM tag does not match.

Inside the workspace

Real screens from a running install, with the Aurora Borealis theme. Pick a tab the way you would in the app.

Fast Tunnel connected to an FTP server, with the folder tree of a PHP project and four open file tabs
Saved connections on the left show live latency from the Ping Monitor plugin. The middle column is the remote folder tree, and every file you open becomes a tab.

Also in the repository

A few files and folders worth knowing about before you install.

Install it on your own server

You need a server with PHP, a MySQL database and a domain or subdomain to point at it. The web installer handles the rest.

  1. Give it its own address

    Point the root of a domain or subdomain at the folder, for example tunnel.example.com. The app uses root paths like /api/ and /login, so a subfolder will not work.

  2. Clone and install dependencies

    Clone the repository and run Composer, which pulls in phpseclib for the SSH terminal.

  3. Make two folders writable

    The web server needs write access to temp_ssh/ and plugins/, and to the app folder while the installer writes config.php.

  4. Run the installer

    Open /install/ in your browser. It checks PHP and its extensions, asks for the database, then creates your admin account and the encryption key.

  5. Sign in and add connections

    Add your first FTP, MySQL or SSH connection from the sidebar. It is saved encrypted for next time.

git clone https://github.com/arizu-id/fast-tunnel.git
cd fast-tunnel
composer install --optimize-autoloader
chmod -R 775 temp_ssh/ plugins/
chown -R www-data:www-data temp_ssh/ plugins/

Apache needs mod_rewrite for the bundled .htaccess. Then open https://your-domain/install/.

Requirements

PHP
8.0 or newer. The installer stops on anything older.
PHP extensions
pdo, pdo_mysql, openssl, curl, json, ftp, session and zip
mbstring is recommended for the language plugin
Database
MySQL or MariaDB for Fast Tunnel's own tables: users, saved connections and login attempts
Web server
Apache with mod_rewrite, or Nginx with the included nginx.sample.conf
Composer
To install phpseclib 3, the SSH library
SSH terminal
PHP must be allowed to start a background process (exec, or popen on Windows) and run the PHP command-line binary
Address
The root of a domain or subdomain, served over HTTPS

Free to use, free to change

Fast Tunnel is released under the MIT licence. Run it for yourself or for your clients, read every line, and change whatever you need.

  • Full PHP and JavaScript source on GitHub
  • FTP, MySQL and SSH modules
  • Four plugins: languages, themes, ping monitor and FTP proxy
  • Docker Compose file and an Nginx sample config
  • Changelog, security policy and troubleshooting guide

Good to know

The file manager speaks plain FTP, so files and FTP passwords travel unencrypted between your Fast Tunnel server and the FTP server. SFTP is on the planned list. The SSH terminal signs in with a password; private key login is not supported yet.

MIT licence, on GitHub

Free

No account, no licence key

  • Latest release: version 1.0.2
  • Bug reports through GitHub Issues
  • Security reports by email, as SECURITY.md describes
  • Free for personal and commercial use
Open the repository (opens in a new tab)

Questions before you install

Is Fast Tunnel really free?

Yes. The full source is on GitHub under the MIT licence, so you can use it for yourself or for client work, change it and redistribute it. There is no licence key and no account.

Does it support SFTP or FTPS?

Not yet. The file manager uses plain FTP through PHP's FTP extension in passive mode. SFTP is on the planned list in the changelog. If you need encryption today, use the SSH terminal for the server instead of FTP.

Can I log in to SSH with a private key?

Not in the current version. The terminal signs in with a username and password, which are stored encrypted like every other saved connection.

Where are my server passwords stored?

In Fast Tunnel's own MySQL database, encrypted with AES-256-GCM. The key is generated by the installer and saved in config.php, which the bundled .htaccess blocks from the web and .gitignore keeps out of Git.

Can I install it in a subfolder like example.com/fast-tunnel?

Use the root of a domain or subdomain instead, such as tunnel.example.com. The app calls root paths like /api/ and /login, and the .htaccess expects /install/ at the top level.

Will it run on shared hosting?

The FTP and MySQL modules only need PHP 8.0 and the listed extensions. The SSH terminal starts a background PHP process with exec (popen on Windows), so it will not work on hosts that disable those functions.

The terminal output arrives late or in bursts. What is wrong?

On Nginx, response buffering holds back the Server-Sent Events stream. The included nginx.sample.conf turns off fastcgi_buffering and proxy_buffering for exactly this reason.

Can more than one person use it?

The installer creates one admin account. Role-based access for several users is on the roadmap for version 2.0.

How do I move my saved connections to another install?

Export them from the sidebar. The file is encrypted in your browser with a password you choose. On the other install, import the file and enter the same password. Connections that already exist there are skipped.

Can I write my own plugin?

Yes. A plugin is a folder in plugins/ with an info.json file and optional plugin.js, plugin.css and plugin.php files. You can also upload a plugin as a ZIP file from the Plugins window.

Put your servers in one tab

Clone it, run Composer and open /install/ in your browser. The blog post walks through Fast Tunnel in more detail.

git clone https://github.com/arizu-id/fast-tunnel.git