Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] SOCKSv5 proxy support #149

Open
GoogleCodeExporter opened this issue May 26, 2015 · 2 comments
Open

[PATCH] SOCKSv5 proxy support #149

GoogleCodeExporter opened this issue May 26, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant