#!/bin/bash # Mycelium IPv6 Website Testing Script echo "๐ŸŒ Testing Mycelium IPv6 Website Accessibility" echo "=============================================" # Get IPv6 addresses echo "๐Ÿ” Discovering Mycelium IPv6 addresses..." IPV6_ADDRESSES=$(kubectl get nodes -o jsonpath='{.items[*].metadata.annotations.mycelium\.cloud/ip}' | tr ' ' '\n') if [ -z "$IPV6_ADDRESSES" ]; then echo "โŒ No IPv6 addresses found!" exit 1 fi echo "โœ… Found IPv6 addresses:" echo "$IPV6_ADDRESSES" | nl # Test first address FIRST_IP=$(echo "$IPV6_ADDRESSES" | head -1) URL="http://[$FIRST_IP]:8080" echo "" echo "๐Ÿงช Testing website access..." echo "Testing URL: $URL" # Test HTTP response if curl -s --connect-timeout 10 --max-time 15 -H "User-Agent: Mycelium-IPv6-Test" "$URL" > /dev/null; then echo "โœ… SUCCESS: Website is accessible!" echo "" echo "๐Ÿ“„ Website content preview:" echo "---" curl -s --connect-timeout 10 --max-time 15 "$URL" | head -20 echo "---" echo "" echo "๐ŸŽฏ All working URLs:" echo "$IPV6_ADDRESSES" | while read ip; do echo " http://[$ip]:8080" done else echo "โŒ FAILED: Cannot connect to $URL" echo "This might be due to Mycelium network connectivity or routing issues." fi echo "" echo "๐Ÿ“‹ Summary:" echo " Deployment: mycelium-website (running on port 8080)" echo " Access URLs: http://[ipv6]:8080" echo " IPv6 Count: $(echo "$IPV6_ADDRESSES" | wc -l) addresses available"