#!/bin/bash set -euo pipefail # Load IP configuration SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true # Instructions for updating Cloudflare Tunnel to route to central Nginx # This script provides the commands and instructions needed echo "═══════════════════════════════════════════════════════════" echo " CLOUDFLARE TUNNEL UPDATE INSTRUCTIONS" echo "═══════════════════════════════════════════════════════════" echo "" echo "The Cloudflare tunnel uses token-based configuration managed" echo "in the Cloudflare dashboard. You need to update it manually." echo "" echo "Steps:" echo "1. Go to: https://one.dash.cloudflare.com/" echo "2. Navigate to: Zero Trust → Networks → Tunnels" echo "3. Select tunnel: b02fe1fe-cb7d-484e-909b-7cc41298ebe8" echo "4. Click 'Configure' → 'Public Hostnames'" echo "5. Update ALL hostnames to route to: http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo "" echo "Required Updates:" echo " - explorer.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - rpc-http-pub.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - rpc-ws-pub.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - rpc-http-prv.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - rpc-ws-prv.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - dbis-admin.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - dbis-api.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - dbis-api-2.d-bis.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - mim4u.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo " - www.mim4u.org → http://${IP_NGINX_LEGACY:-192.168.11.26}:80" echo "" echo "After updating, the tunnel will automatically reload within 1-2 minutes." echo "" echo "Test after update:" echo " curl https://explorer.d-bis.org/api/v2/stats" echo " curl -X POST https://rpc-http-pub.d-bis.org \\" echo " -H 'Content-Type: application/json' \\" echo " -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_chainId\",\"params\":[],\"id\":1}'" echo ""