Use server name for advertised SSH host keys

Like our parent commit, if we are behind an Apache2 reverse proxy,
getLocalAddr() returns, which is not an address that a
client can use to connect to us.

Instead we should use the hostname the client asked Apache for in
the HTTP headers, as that is still present as getServerName().

Signed-off-by: Shawn O. Pearce <>
1 file changed