This script automates the installation of the tunnel
binary from Cloudflare, ensuring compatibility across different system architectures and environments, including Termux. It detects your system architecture, downloads the appropriate binary, and installs it with the necessary permissions.
- Automatically detects system architecture (x86-64, x86, ARM, ARM64)
- Checks if
wget
is installed, and installs it if necessary - Supports Termux environment
- Provides a progress bar and download details during binary download
- Installs the binary as
tunnel
and makes it executable from anywhere in the terminal
To install the tunnel
binary using this script, follow these steps:
-
Download the script directly from GitHub:
wget https://raw.githubusercontent.com/mashunterbd/tunnel/main/tunnel.sh
-
Make the script executable:
chmod +x tunnel.sh
- Run the script:
./tunnel.sh
wget https://raw.githubusercontent.com/mashunterbd/tunnel/main/tunnel.sh ; chmod +x tunnel.sh; ./tunnel.sh
- open windows PowerShell as a normal user:
- paste this command : for Install
winget install --id Cloudflare.cloudflared
- locate where is this executable file
Get-ChildItem -Path C:\ -Filter "cloudflared.exe" -Recurse -ErrorAction SilentlyContinue
- if the file exist on this location > directory : C:\Program Files (x86)\cloudflared
cd "C:\Program Files (x86)\cloudflared" ; ls
- Execute this command for port forwarding :
.\cloudflared-windows-amd64.exe tunnel --url (Link Past)
-
demo : .\cloudflared-windows-amd64.exe tunnel --url 192.168.0.0:8001
https://medium.com/@mashunter/free-port-forwarding-fca46640d574