X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/7b966c9b996d5797596942b8052e4011b77badc8..b804e1e5b96705b2f1d5bb31892a9353f9b7224c:/proxy.c diff --git a/proxy.c b/proxy.c index 83bb19f8..7c608c92 100644 --- a/proxy.c +++ b/proxy.c @@ -247,6 +247,14 @@ static int proxy_for_destination (SockAddr addr, char * hostname, int port) int hostip_len, hostname_len; char * exclude_list; + /* + * Check the host name and IP against the hard-coded + * representations of `localhost'. + */ + if (!cfg.even_proxy_localhost && + (sk_hostname_is_local(hostname) || sk_address_is_local(addr))) + return 0; /* do not proxy */ + /* we want a string representation of the IP address for comparisons */ sk_getaddr(addr, hostip, 64);