#!/bin/bash set -e # Start squid (daemonized) echo "Starting Squid proxy..." /usr/sbin/squid -f /etc/squid/squid.conf # Wait for squid to be ready echo "Waiting for Squid to start..." sleep 2 # Check if NGROK_AUTHTOKEN is provided if [ -z "$NGROK_AUTHTOKEN" ] || [ "$NGROK_AUTHTOKEN" = "your_ngrok_authtoken_here" ]; then echo "Error: NGROK_AUTHTOKEN environment variable is not set or not configured." echo "Please set a valid NGROK_AUTHTOKEN in your .env file." exit 1 fi # Run ngrok in the foreground echo "Starting ngrok tunnel..." exec ngrok tcp 7860 --authtoken "$NGROK_AUTHTOKEN" --log stdout