caddytls: Set local_ip, not remote_ip (#6952)

Follow-up on 35c8c2d92d where I was a dum-dum
pull/6983/head
Matthew Holt 2025-04-21 18:32:39 -06:00
parent 737936c06b
commit 105eee671c
1 changed files with 3 additions and 3 deletions

View File

@ -144,9 +144,9 @@ func (hcg HTTPCertGetter) GetCertificate(ctx context.Context, hello *tls.ClientH
qs.Set("server_name", hello.ServerName)
qs.Set("signature_schemes", strings.Join(sigs, ","))
qs.Set("cipher_suites", strings.Join(suites, ","))
remoteIP, _, err := net.SplitHostPort(hello.Conn.RemoteAddr().String())
if err == nil && remoteIP != "" {
qs.Set("remote_ip", remoteIP)
localIP, _, err := net.SplitHostPort(hello.Conn.LocalAddr().String())
if err == nil && localIP != "" {
qs.Set("local_ip", localIP)
}
parsed.RawQuery = qs.Encode()