This directory contains comprehensive diagnostic and troubleshooting tools for HTTPS domains in DockerVirt environments.
https_connection_tester.py)Comprehensive testing tool that validates all aspects of HTTPS connectivity:
# Basic usage
python3 scripts/https_connection_tester.py https://static-site-https.dockvirt.dev:8443
# Test different domain
python3 scripts/https_connection_tester.py https://your-app.local:443
π₯ HTTPS CONNECTION TESTER
π― Target: https://static-site-https.dockvirt.dev:8443
π Host: static-site-https.dockvirt.dev:8443
============================================================
=== 1οΈβ£ DNS RESOLUTION TEST ===
β
DNS resolved: static-site-https.dockvirt.dev -> 127.0.0.1
=== 2οΈβ£ PORT CONNECTIVITY TEST (8443) ===
β
Port 8443 is open and accessible
=== 3οΈβ£ SSL CERTIFICATE TEST ===
β
SSL connection established
π Certificate subject: [('CN', 'static-site-https.dockvirt.dev')]
π Certificate issuer: [('CN', 'static-site-https.dockvirt.dev')]
π Verification status: β Certificate verification failed: [SSL: CERTIFICATE_VERIFY_FAILED]
=== 4οΈβ£ HTTP CONTENT TEST ===
β
HTTP request successful
π Status code: 200
π Content-Type: text/html
π HSTS header: Not present
π Content preview: <!DOCTYPE html>...
=== 5οΈβ£ HEADLESS BROWSER TEST ===
β
curl connection successful
β
Firefox headless connection successful
π TEST SUMMARY
============================================================
β
Successful tests: 4/4
β
DNS: PASS
β
PORT: PASS
β
SSL: PASS
β
CONTENT: PASS
hsts_certificate_bypass.py)Provides multiple solutions for bypassing HSTS policies and certificate trust issues:
# Generate all bypass solutions
python3 scripts/hsts_certificate_bypass.py static-site-https.dockvirt.dev 8443
# Use default domain and port
python3 scripts/hsts_certificate_bypass.py
https-demo.local domain without HSTS history/etc/hosts automatically/tmp/firefox_dev_launch.sh/tmp/chromium_dev_launch.shabout:networking#hsts in Firefox/tmp/https-certs/firefox-dev-https.sh)Pre-configured Firefox launcher that bypasses HTTPS restrictions for development:
# Launch with specific URL
./scripts/firefox-dev-https.sh https://static-site-https.dockvirt.dev:8443/
# Launch with default URL
./scripts/firefox-dev-https.sh
*.dockvirt.dev domains# Step 1: Run bypass script to create alternative domain
python3 scripts/hsts_certificate_bypass.py
# Step 2: Access via new domain (no HSTS restrictions)
# Browser URL: https://https-demo.local:8443/
# Alternative: Use Firefox developer profile
./scripts/firefox-dev-https.sh https://static-site-https.dockvirt.dev:8443/
# Step 1: Diagnose the issue
python3 scripts/https_connection_tester.py https://your-domain:port
# Step 2: Check common causes based on test results:
# β DNS: Update /etc/hosts or check domain configuration
# β PORT: Verify service is running and port is correct
# β SSL: Check certificate configuration
# β CONTENT: Verify web service is responding
# Diagnosis workflow:
# 1. Check VM status
sudo virsh list
# 2. Check VM IP assignment
sudo virsh net-dhcp-leases default
# 3. Test basic connectivity
ping VM_IP
# 4. Wait for VM boot completion (can take 60+ seconds)
sleep 60 && python3 scripts/https_connection_tester.py https://domain:port
# 5. If still not responding, restart VM
sudo virsh destroy vm-name && sudo virsh start vm-name
These tools integrate with DockerVirtβs automation agent:
# Run agent with HTTPS validation
make agent
# Auto-fix HTTPS issues
make agent-fix
Use with .dockvirt configuration files:
# In your project directory with .dockvirt file
cd examples/1-static-nginx-website/
# Test the configured domain
python3 ../../scripts/https_connection_tester.py https://$(grep domain .dockvirt | cut -d= -f2):$(grep port .dockvirt | cut -d= -f2)
| Issue | Diagnostic Tool | Solution |
|---|---|---|
| Certificate not trusted | https_connection_tester.py |
Use alternative domain or Firefox dev profile |
| HSTS policy blocking | hsts_certificate_bypass.py |
Clear HSTS cache or use bypass domain |
| Connection refused | https_connection_tester.py |
Check VM status and wait for boot |
| DNS not resolving | https_connection_tester.py |
Update /etc/hosts or check domain config |
| Port not accessible | https_connection_tester.py |
Verify service running and port configuration |
Tools generate the following files:
/tmp/https_test_results.json - Detailed test results from connection tester/tmp/firefox_dev_launch.sh - Firefox developer profile launcher/tmp/chromium_dev_launch.sh - Chromium bypass launcher/tmp/https-certs/ - Generated certificates for local trust/tmp/headless_browser_test.py - Headless browser testing scriptThese tools are designed for development and testing environments only:
To add new diagnostic capabilities: