ytrstu / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

[PATCH] SOCKSv5 proxy support #149

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm running builds in network-isolated environment where build processes can 
only access the network via a dedicated SOCKSv5 server. I'd like to make it 
possible to combine this isolation with distcc, so I've made a patch adding 
SOCKSv5 support to distcc.

The patch is quite trivial as is SOCKSv5 protocol. I've modified the 
dcc_connect_by_name() function to support DISTCC_SOCKS_PROXY environment 
variable that can be used to specify a proxy. It can either specify a hostname, 
a hostname:port pair or an absolute path to a UNIX socket. No proxy 
authentication is supported, and hostname addressing is used.

The old dcc_connect_by_name() methods (now dcc_connect_by_name_real()) are used 
to open the proxy connection. Target hostname resolution is performed by the 
SOCKSv5 server. After the proxy negotation is complete, the socket works the 
same as if it were connected to the target hostname.

Original issue reported on code.google.com by mgo...@gentoo.org on 25 Jan 2015 at 12:46

Attachments:

GoogleCodeExporter commented 9 years ago
Updated the patch not to close *p_fd explicitly. It seems that distcc does this 
on its own.

Original comment by mgo...@gentoo.org on 25 Jan 2015 at 1:53

Attachments:

GoogleCodeExporter commented 9 years ago
One more update. Missing 'break's in select that caused incorrect handling of 
IPv6 bound addresses.

Original comment by mgo...@gentoo.org on 26 Jan 2015 at 9:19

Attachments: