1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

If you configure Unix PuTTY to use a proxy, tell it to even proxy

localhost connections, and also enable X forwarding in such a way that
it will attempt to connect to a Unix-domain X server socket, an
assertion will fail when proxy_for_destination() tries to call
sk_getaddr(). Fix by ensuring that Unix-domain sockets are _never_
proxied, since they fundamentally can't be.

[originally from svn r9688]
This commit is contained in:
Simon Tatham
2012-10-16 20:15:51 +00:00
parent 36b8d450f0
commit 58870f60e4
4 changed files with 20 additions and 0 deletions

View File

@ -285,6 +285,15 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port,
int hostip_len, hostname_len;
const char *exclude_list;
/*
* Special local connections such as Unix-domain sockets
* unconditionally cannot be proxied, even in proxy-localhost
* mode. There just isn't any way to ask any known proxy type for
* them.
*/
if (addr && sk_address_is_special_local(addr))
return 0; /* do not proxy */
/*
* Check the host name and IP against the hard-coded
* representations of `localhost'.