How to install ngrok in termux
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz
tar -xvzf ngrok-v3-stable-linux-arm64.tgzHow to use
./ngrokUsing installer script
curl -Ls i.isan.eu.org/ngrok | bashHow to use
ngrok| #!/data/data/com.termux/files/usr/bin/bash | |
| BOLD='\e[1m' | |
| GREEN='\e[32m' | |
| YELLOW='\e[33m' | |
| RED='\e[31m' | |
| NC='\e[0m' | |
| # From https://ngrok.com/download/linux?tab=download | |
| # URL="https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz" | |
| URL="https://i.isan.eu.org/ngrok.txz" | |
| FILE="ngrok.txz" | |
| echo -e "${BOLD}Usage:${NC} curl -Ls i.isan.eu.org/ngrok | bash" | |
| sleep 0.1 | |
| echo -e "${BOLD}Or:${NC} wget -qO- i.isan.eu.org/ngrok | bash" | |
| sleep 0.1 | |
| echo -e "${BOLD}Note:${NC} use 'bash -s -- wget' to use wget for downloading file." | |
| sleep 0.1 | |
| if [[ "$1" == "wget" ]]; then | |
| echo -e "${YELLOW}Using wget...${NC}" | |
| sleep 0.1 | |
| wget "$URL" -O "$FILE" | |
| else | |
| echo -e "${YELLOW}Using cURL...${NC}" | |
| sleep 0.1 | |
| curl -O "$URL" | |
| fi | |
| if [ -f "$FILE" ]; then | |
| echo -e "${YELLOW}Extracting...${NC}" | |
| tar -xvJf "$FILE" -C /data/data/com.termux/files/usr/bin | |
| chmod +x /data/data/com.termux/files/usr/bin/ngrok | |
| rm "$FILE" | |
| echo -ne "${BOLD}${GREEN}Paste your ngrok authtoken, [enter] to skip: ${NC}" | |
| read TOKEN </dev/tty | |
| sleep 0.1 | |
| if [ -n "$TOKEN" ]; then | |
| ngrok config add-authtoken "$TOKEN" | |
| sleep 0.1 | |
| echo -e "${GREEN}Authtoken configured!${NC}" | |
| else | |
| echo -e "${YELLOW}Authtoken configuration skipped.${NC}" | |
| fi | |
| sleep 0.1 | |
| echo -e "${BOLD}Note:${NC} to configure authtoken manually, run: ngrok config add-authtoken <token>" | |
| sleep 0.1 | |
| echo -e "${BOLD}Next step:${NC} ngrok --help" | |
| sleep 0.1 | |
| echo -e "${BOLD}Troubleshooting:${NC} if you got \"${YELLOW}WARN${NC} failed to get home directory, using \$HOME instead\" just ignore it." | |
| sleep 0.1 | |
| echo -e "${BOLD}Troubleshooting:${NC} if you got Session Status \"${RED}reconnecting (failed to dial ngrok server...${NC}\" try to turn on mobile hotspot and re-execute command, you can turn off hotspot when status already ${GREEN}online${NC}." | |
| sleep 0.1 | |
| echo -e "${BOLD}Try:${NC} ngrok http 4040" | |
| else | |
| echo -e "${RED} Something went wrong.${NC}" | |
| fi |