1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Stop proxying connections to localhost by default; should fix

`x11-proxy-crash'.

[originally from svn r2348]
This commit is contained in:
Simon Tatham
2002-12-18 12:18:54 +00:00
parent c583c6e85e
commit 8304f4e0dc
8 changed files with 71 additions and 1 deletions

View File

@ -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);