@@ -17,11 +17,11 @@ BOOT_START=$(date +%s%3N 2>/dev/null || date +%s)
1717# gvproxy's TCP/UDP/ICMP forwarder. Use this address
1818# (or any of the host.* hostnames below) to reach a
1919# service the host is listening on.
20- # The host.containers .internal / host.docker .internal DNS records served
21- # by gvproxy's embedded resolver point at 192.168.127.254. We mirror that
22- # in /etc/hosts so the supervisor can reach the gateway even when
23- # gvproxy's DNS is not in resolv.conf (e.g. DHCP failed and we fell
24- # back to 8.8.8.8).
20+ # The host.openshell .internal / host.containers .internal /
21+ # host.docker.internal DNS records served by gvproxy's embedded resolver
22+ # point at 192.168.127.254. We mirror that in /etc/hosts so the supervisor
23+ # can reach the gateway even when gvproxy's DNS is not in resolv.conf
24+ # (e.g. DHCP failed and we fell back to 8.8.8.8).
2525GVPROXY_GATEWAY_IP=" 192.168.127.1"
2626GVPROXY_HOST_LOOPBACK_IP=" 192.168.127.254"
2727GATEWAY_IP=" $GVPROXY_GATEWAY_IP "
@@ -419,7 +419,12 @@ rewrite_openshell_endpoint_if_needed() {
419419 if [ " ${GATEWAY_IP} " != " ${GVPROXY_GATEWAY_IP} " ]; then
420420 fallback_ip=" $GATEWAY_IP "
421421 fi
422- for candidate in host.openshell.internal host.containers.internal host.docker.internal " $fallback_ip " ; do
422+ local candidates=" host.openshell.internal host.containers.internal host.docker.internal"
423+ if [ " $scheme " != " https" ]; then
424+ candidates=" ${candidates} ${fallback_ip} "
425+ fi
426+
427+ for candidate in $candidates ; do
423428 if [ " $candidate " = " $host " ]; then
424429 continue
425430 fi
@@ -435,6 +440,11 @@ rewrite_openshell_endpoint_if_needed() {
435440 fi
436441 done
437442
443+ if [ " $scheme " = " https" ]; then
444+ ts " WARNING: could not preflight HTTPS OpenShell endpoint ${host} :${port} ; preserving hostname for TLS verification"
445+ return 0
446+ fi
447+
438448 ts " WARNING: could not reach OpenShell endpoint ${host} :${port} "
439449}
440450
0 commit comments