mktl

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 13 Imported by: 0

README ΒΆ

MKTL - Make Tunnel

MKTL (Make Tunnel) is a lightweight command-line tool that creates public tunnels to your local servers using various tunneling providers. It automatically downloads and manages the required binaries, making it easy to expose your local development servers to the internet.

Features

  • πŸš€ Multiple Providers: Supports ngrok, Cloudflare Tunnel (cloudflared), localtunnel, and Pinggy
  • πŸ”§ Auto-Download: Automatically downloads the required binary for your platform
  • 🎨 Colorful Output: Beautiful colored terminal output with clear status indicators
  • πŸ“¦ Single Binary: No dependencies - just download and run
  • πŸ”’ No Account Required: Most providers work without registration (cloudflared, localtunnel, pinggy)

Supported Providers

Provider Status Account Required Notes
cloudflared βœ… Stable ❌ No Fast, reliable, no setup needed
localtunnel βœ… Stable ❌ No Requires Node.js/npx
pinggy βœ… Stable ❌ No 60-minute free tier limit
ngrok βœ… Stable βœ… Yes Requires authtoken setup

Installation

Download the pre-built binary for your platform from Releases

Windows:

mktl.exe -tool cloudflared -port 3000

Linux/macOS:

./mktl -tool cloudflared -port 3000
Option 2: Install via Go
go install github.com/batmanpriv/mktl@latest

Make sure your $GOPATH/bin is in your PATH.

Option 3: Build from Source
git clone https://github.com/batmanpriv/mktl.git
cd mktl
go build -o mktl .

Quick Start

1. Start a Local Server

First, make sure you have a server running locally. For testing, you can use Python:

# Python 3
python -m http.server 3000

# Node.js
npx serve -l 3000

# PHP
php -S localhost:3000
2. Create a Tunnel

Using cloudflared (Recommended - No Account):

mktl -tool cloudflared -port 3000

Using localtunnel (Requires Node.js):

mktl -tool localtunnel -port 3000

Using pinggy (60-minute limit):

mktl -tool pinggy -port 3000

Using ngrok (Requires authtoken setup):

mktl -tool ngrok -port 3000

After running the command, you'll see output like:

═══════════════════════════════════════════════════════════════════
  [~] MKTL - Tunnel Created Successfully
═══════════════════════════════════════════════════════════════════

  [>] https://your-tunnel-url.trycloudflare.com

  [*] Press Ctrl+C to stop.

Share the URL with anyone to access your local server from anywhere.

Usage

Basic Usage
mktl -tool <provider> -port <port>
Command Line Options
Flag Description Default
-tool Tunneling provider: ngrok, cloudflared, localtunnel, pinggy ngrok
-port Local port your server is running on 8080
-list List all available providers and exit false
Examples

List available providers:

mktl -list

Create tunnel on port 3000 with cloudflared:

mktl -tool cloudflared -port 3000

Create tunnel on port 8080 with localtunnel:

mktl -tool localtunnel -port 8080

Create tunnel on port 5000 with pinggy:

mktl -tool pinggy -port 5000

Provider Setup Notes

Ngrok Setup

Ngrok requires authentication. You need to set up your authtoken:

  1. Create a free account at ngrok.com
  2. Get your authtoken from the dashboard
  3. Run once (the binary will be downloaded automatically):
    ngrok config add-authtoken <YOUR_TOKEN>
    
cloudflared

No setup required. The tool will automatically download the latest cloudflared binary for your platform.

localtunnel

Requires Node.js and npx to be installed on your system:

node --version  # Check if Node.js is installed
npx --version   # Check if npx is available
pinggy

Uses your system's SSH client. No additional setup required.

  • Windows 10+: OpenSSH is usually pre-installed
  • Linux/macOS: SSH is typically available by default
  • Termux: pkg install openssh

How It Works

  1. Platform Detection: Detects your OS (Windows, Linux, macOS) and architecture
  2. Binary Management: Downloads the appropriate binary for your platform
  3. Tunnel Creation: Launches the tunnel with the specified port
  4. URL Extraction: Parses the output to extract the public URL
  5. Display: Shows the public URL in a clear, formatted way

Troubleshooting

Port Not Listening Warning
[!] Nothing seems to be listening on localhost:3000 yet

Make sure your local server is running before creating the tunnel.

cloudflared Returns api.trycloudflare.com

If you see api.trycloudflare.com instead of a real tunnel URL:

  • Disable VPN and try again
  • Try a different network
  • Wait a few minutes and retry
  • Switch to a different provider
Timeout Errors

If you get timed out waiting for provider to report a public URL:

  • Check your internet connection
  • Some providers may be temporarily unavailable
  • Try a different provider
ngrok Authentication Error

If ngrok fails, make sure you've set up your authtoken:

ngrok config add-authtoken <YOUR_TOKEN>

File Structure

After first use, binaries are cached in:

  • Windows: %USERPROFILE%\.mktl\
  • Linux/macOS: ~/.mktl/

Development

Requirements
  • Go 1.21 or higher
Building
go build -o mktl .
Testing
go test ./...

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL