Last active
July 8, 2024 02:01
-
-
Save Erisa/4015ae12211434b8f2f64ac1d731b830 to your computer and use it in GitHub Desktop.
Install the Cloudflare Daemon (cloudflared) in Termux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo 'NOTE: You can now install cloudflared directly from Termux repos.' | |
echo 'NOTE: To install it from source instead, open the script and comment out the next two lines.' | |
pkg install cloudflared | |
exit | |
# ^ comment out these lines to proceed with the script | |
echo "--upgrading packages" | |
yes "" | pkg update | |
echo "-- installing dependancies: golang git debianutils make" | |
yes "" | pkg install golang git debianutils make | |
echo "-- downloading cloudflared source" | |
git clone https://github.com/cloudflare/cloudflared.git --depth=1 | |
cd cloudflared | |
sed -i 's/linux/android/g' Makefile | |
echo "-- building and installing cloudflared" | |
make cloudflared | |
install cloudflared /data/data/com.termux/files/usr/bin | |
echo "-- done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to run
apt update
thenapt install cloudflared
orpkg run cloudflared
, don't need root for commands without su or sudo.