Skip to main content

Cross-platform file sharing via QR code with ngrok and SSH tunneling

Project description

QRTunnel v0.1

Cross-platform file sharing via SSH reverse tunneling and QR codes. Allows sharing files with mobile devices anywhere in the world, even behind NAT/firewalls.

Features

  • Simple File Sharing: Share one or more files directly from your command line.
  • Secure Tunnels: Utilizes ngrok for secure, public HTTPS tunnels, even behind NATs and firewalls.
  • No-Auth Alternative: For Mac/Linux users, an SSH-based tunnel (localhost.run) is available, requiring no ngrok account.
  • QR Code Display: Generates a scannable QR code in your terminal for easy access on mobile devices.
  • Web Interface: Provides a simple web page for recipients to download shared files, individually or as a ZIP archive.
  • Ngrok Authtoken Management: Interactive setup and status check for your ngrok authentication token.

Installation

  1. Clone the repository:
    git clone https://github.com/your_username/qrtunnel.git
    cd qrtunnel
    
  2. Install dependencies:
    pip install pyngrok qrcode[pil]
    

Usage

Basic Sharing

To share one or more files:

python qr.py <file_path1> [<file_path2> ...]

Example:

python qr.py mydocument.pdf myimage.jpg

This will start a local HTTP server, create a public tunnel (using ngrok by default), and display a QR code. Scan the QR code with your phone to access the files.

Ngrok Authentication Setup

qrtunnel uses ngrok for reliable public tunnels. The first time you use it, or if you need to update your token, you'll be prompted to set up your ngrok authtoken. You can also do this manually:

python qr.py --setup

Follow the on-screen instructions to get and save your ngrok authtoken.

Check Ngrok Status

To check if your ngrok authtoken is configured:

python qr.py --status

No-Auth Sharing (Mac/Linux Only)

If you're on Mac or Linux and prefer not to use an ngrok account, you can use the --noauth flag. This will attempt to create an SSH tunnel via localhost.run.

python qr.py <file_path1> [<file_path2> ...] --noauth

Note: This option is not supported on Windows.

Quitting the Server

The server will run until you press q in the terminal or use Ctrl+C.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qrtunnel-1.0.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qrtunnel-1.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file qrtunnel-1.0.0.tar.gz.

File metadata

  • Download URL: qrtunnel-1.0.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qrtunnel-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b2e55fc49061ae398ab944bec0a95a2444833894457c78086fe6c60dcab58af
MD5 2b141f3383a2ce8d60c532efae57588d
BLAKE2b-256 5fa3e8a2a8719b921a713f67b24d379ae2f9243b03f495f60968a44287a3cff4

See more details on using hashes here.

File details

Details for the file qrtunnel-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: qrtunnel-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qrtunnel-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f64de1cee5699c9548366e62bae71bd2695d75bc89cd8dbd892a9dfe9180f49
MD5 93dea3e8e183b43e4001f0ae25a52d0b
BLAKE2b-256 22948e68665524d3f503fe2b8d2dae1bd7e1894c24386f0f778ef2ca471b4c40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page