caddytls: Set local_ip, not remote_ip (#6952)
Follow-up on 35c8c2d92d
where I was a dum-dum
pull/6983/head
parent
737936c06b
commit
105eee671c
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue