Просмотр исходного кода

doctor: surface both public IPs in SNI-DNS mismatch message

Closes #486.

The previous message read "Hostname X is resolved to Y addresses, not
Z" with Z being either the detected IPv4 or IPv6 (whichever was set
first), which made dual-stack mismatches confusing — a hostname
resolving to v6 only on a host with v4 detected and v6 undetected
printed "not <v4>" without hinting that v6 was the missing piece.

The reworked template lists the resolved DNS records and both public
addresses (or "<not detected>" when missing) so the gap is obvious:

    Hostname X resolves to "<v6>", but the proxy's public IP is
    1.2.3.4 (IPv4) / <not detected> (IPv6) — none of the resolved
    addresses match

Pure message change.
doctor/sni-dns-message
Alexey Dolotov 6 дней назад
Родитель
Сommit
fbc5b51573
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      internal/cli/doctor.go

+ 1
- 1
internal/cli/doctor.go Просмотреть файл

@@ -56,7 +56,7 @@ var (
56 56
 		template.New("").Parse("  ✅ IP address {{ .ip }} matches secret hostname {{ .hostname }}\n"),
57 57
 	)
58 58
 	tplEDNSSNIMatch = template.Must(
59
-		template.New("").Parse("  ❌ Hostname {{ .hostname }} {{ if .resolved }}is resolved to {{ .resolved }} addresses, not {{ if .ip4 }}{{ .ip4 }}{{ else }}{{ .ip6 }}{{ end }}{{ else }}cannot be resolved to any host{{ end }}\n"),
59
+		template.New("").Parse("  ❌ Hostname {{ .hostname }} {{ if .resolved }}resolves to {{ .resolved }}, but the proxy's public IP is {{ if .ip4 }}{{ .ip4 }}{{ else }}<not detected>{{ end }} (IPv4) / {{ if .ip6 }}{{ .ip6 }}{{ else }}<not detected>{{ end }} (IPv6) — none of the resolved addresses match{{ else }}cannot be resolved to any host{{ end }}\n"),
60 60
 	)
61 61
 
62 62
 	tplOFrontingDomain = template.Must(

Загрузка…
Отмена
Сохранить