initial: bootstrap from BukidBountyApp base
This commit is contained in:
23
scripts/tunnel.sh
Normal file
23
scripts/tunnel.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Cloudflare Tunnel Script for BukidBounty App
|
||||
# This script uses Docker to create a temporary Cloudflare tunnel for port 9522
|
||||
|
||||
echo "🚀 Starting Cloudflare Tunnel for localhost:9522..."
|
||||
echo "----------------------------------------------------"
|
||||
|
||||
# Check if Docker is installed
|
||||
if ! command -v docker &> /dev/null
|
||||
then
|
||||
echo "❌ Error: Docker is not installed. Please install Docker to run this tunnel."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if a token was provided as an argument
|
||||
if [ -z "$1" ]; then
|
||||
echo "ℹ️ No token provided. Creating a temporary 'trycloudflare.com' tunnel..."
|
||||
docker run --rm -it --network host cloudflare/cloudflared tunnel --url http://localhost:9522
|
||||
else
|
||||
echo "ℹ️ Using provided Cloudflare Tunnel token..."
|
||||
docker run --rm -it --network host cloudflare/cloudflared tunnel --no-autoupdate run --token "$1"
|
||||
fi
|
||||
Reference in New Issue
Block a user