<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SSH, Subversion through SOCKS proxy on Mac OS X</title>
	<atom:link href="http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/</link>
	<description>source control for my (useless) knowledge</description>
	<lastBuildDate>Tue, 09 Mar 2010 19:59:44 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: yiming</title>
		<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/comment-page-1/#comment-3669</link>
		<dc:creator>yiming</dc:creator>
		<pubDate>Fri, 05 Mar 2010 22:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yimingliu.com/?p=471#comment-3669</guid>
		<description>Hi Dennis,

I used your script (with IPs modified for my setup), removed the &quot;server&quot; line at the end, and used it to set up a path without a default server.  I was not able to reproduce the segfault.  That setup worked for me just fine, which means I can&#039;t help you debug this directly, but also means that tsocks is supposed to handle this use case.  It is likely that our setups still differ significantly (I&#039;m using SOCKS 5, for example) that I&#039;m not triggering the code path that has the bug in it.

If you know the C language, you can try to instruct MacPorts to compile with the -g flag.  Then, you can run tsocks under GDB, which will give you the exact backtrace of which function failed at what line of source code.  At that point, we can try to see if we can fix that bug ourselves.  I&#039;m very curious as to why it doesn&#039;t seem to work for you when it works on my setup -- there must be a relatively simple fix.</description>
		<content:encoded><![CDATA[<p>Hi Dennis,</p>
<p>I used your script (with IPs modified for my setup), removed the &#8220;server&#8221; line at the end, and used it to set up a path without a default server.  I was not able to reproduce the segfault.  That setup worked for me just fine, which means I can&#8217;t help you debug this directly, but also means that tsocks is supposed to handle this use case.  It is likely that our setups still differ significantly (I&#8217;m using SOCKS 5, for example) that I&#8217;m not triggering the code path that has the bug in it.</p>
<p>If you know the C language, you can try to instruct MacPorts to compile with the -g flag.  Then, you can run tsocks under GDB, which will give you the exact backtrace of which function failed at what line of source code.  At that point, we can try to see if we can fix that bug ourselves.  I&#8217;m very curious as to why it doesn&#8217;t seem to work for you when it works on my setup &#8212; there must be a relatively simple fix.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/comment-page-1/#comment-3663</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Fri, 05 Mar 2010 03:20:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yimingliu.com/?p=471#comment-3663</guid>
		<description>Excellent blog. There&#039;s not much information out there about SOCKS support for Macs. I like you have scoured the net for an SSH client with SOCKS support. I did chance upon ZOC, and am trying out a trial version, but in the meantime I&#039;ve got tsocks from macports installed and was wondering if you&#039;ve ever hit this problem ? I can only get it to work if I specify a default SOCKS proxy, without which it segmentation faults ( no debug messages :( ), and I can&#039;t seem to get tsocks to use the path blocks to specify different SOCKS proxies for various networks.

So using the config below, I can &#039;tsocks ssh user@150.60.198.12&#039; without any problem only if a default server is specified correctly. The path stanza just seems to be ignored. And if I leave out the default server entry all together, tsocks seg faults.

local = 192.168.1.0/255.255.255.0
local = 129.39.109.0/255.255.255.0
path {
reaches = 150.60.198.0/255.255.255.0
server = 129.39.109.202 
server_type = 4
server_port = 1080
}
server = 129.39.109.202</description>
		<content:encoded><![CDATA[<p>Excellent blog. There&#8217;s not much information out there about SOCKS support for Macs. I like you have scoured the net for an SSH client with SOCKS support. I did chance upon ZOC, and am trying out a trial version, but in the meantime I&#8217;ve got tsocks from macports installed and was wondering if you&#8217;ve ever hit this problem ? I can only get it to work if I specify a default SOCKS proxy, without which it segmentation faults ( no debug messages <img src='http://blog.yimingliu.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ), and I can&#8217;t seem to get tsocks to use the path blocks to specify different SOCKS proxies for various networks.</p>
<p>So using the config below, I can &#8216;tsocks ssh <a href="mailto:user@150.60.198.12">user@150.60.198.12</a>&#8216; without any problem only if a default server is specified correctly. The path stanza just seems to be ignored. And if I leave out the default server entry all together, tsocks seg faults.</p>
<p>local = 192.168.1.0/255.255.255.0<br />
local = 129.39.109.0/255.255.255.0<br />
path {<br />
reaches = 150.60.198.0/255.255.255.0<br />
server = 129.39.109.202<br />
server_type = 4<br />
server_port = 1080<br />
}<br />
server = 129.39.109.202</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/comment-page-1/#comment-1310</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Mon, 14 Sep 2009 18:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yimingliu.com/?p=471#comment-1310</guid>
		<description>I believe this is my issue.  The server I am trying to connect to can only be resolved through the gateway.</description>
		<content:encoded><![CDATA[<p>I believe this is my issue.  The server I am trying to connect to can only be resolved through the gateway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yiming</title>
		<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/comment-page-1/#comment-1259</link>
		<dc:creator>yiming</dc:creator>
		<pubDate>Wed, 09 Sep 2009 10:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yimingliu.com/?p=471#comment-1259</guid>
		<description>That&#039;s pretty odd.  I actually have ran into DNS issues before with tsocks, but only when the final target hostname is not globally resolvable.  If you must resolve your final hostname via SOCKS, then things break.  Apparently when they patched tsocks to work with Tor, they also semi-broke the original &quot;resolve DNS hosts via SOCKS 5&quot; functionality.  There&#039;s a compile-time switch to disable the Tor-based DNS resolution entirely and force it to use the original SOCKS-based DNS resolution, but I had some trouble compiling the package using that switch.

Is your end host&#039;s DNS name resolvable only through the &quot;gateway&quot; server, or should it be globally resolvable?  If it&#039;s globally resolvable, it should try to use your usual ISP DNS server (or whatever DNS you have configured in Network preference pane).  If it&#039;s a private hostname that only the gateway knows, then you&#039;ll probably have to find some way to get DNS resolution working with tsocks.</description>
		<content:encoded><![CDATA[<p>That&#8217;s pretty odd.  I actually have ran into DNS issues before with tsocks, but only when the final target hostname is not globally resolvable.  If you must resolve your final hostname via SOCKS, then things break.  Apparently when they patched tsocks to work with Tor, they also semi-broke the original &#8220;resolve DNS hosts via SOCKS 5&#8243; functionality.  There&#8217;s a compile-time switch to disable the Tor-based DNS resolution entirely and force it to use the original SOCKS-based DNS resolution, but I had some trouble compiling the package using that switch.</p>
<p>Is your end host&#8217;s DNS name resolvable only through the &#8220;gateway&#8221; server, or should it be globally resolvable?  If it&#8217;s globally resolvable, it should try to use your usual ISP DNS server (or whatever DNS you have configured in Network preference pane).  If it&#8217;s a private hostname that only the gateway knows, then you&#8217;ll probably have to find some way to get DNS resolution working with tsocks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/comment-page-1/#comment-1255</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Tue, 08 Sep 2009 14:28:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yimingliu.com/?p=471#comment-1255</guid>
		<description>Thanks for the help, I had my local mask incorrect so my server was not in the masked range.  Now I&#039;m running into an issue where it appears that tsocks is not using remote DNS.  For better context here is my setup:

OSX 10.5
tsocks from port

tsocks.conf:
local = 127.0.0.1/255.255.255.255
server = 127.0.0.1
server_port = 1080
server_type = 5
tordns_enable = false

ssh -D 1080 user@server

I&#039;m actually trying to use this with git-svn  so I type something like:

git svn rebase

It chugs away (debug output seems to provide nothing too useful, lots of &quot;Call to close(n)&quot;  then it says &quot;Host not found&quot;.  Similarly if I say tsocks ping remote-server same thing.  However, if I ssh user@server I can ping the server that I&#039;m trying to reach so tsocks should be able to get there.  Any ideas?</description>
		<content:encoded><![CDATA[<p>Thanks for the help, I had my local mask incorrect so my server was not in the masked range.  Now I&#8217;m running into an issue where it appears that tsocks is not using remote DNS.  For better context here is my setup:</p>
<p>OSX 10.5<br />
tsocks from port</p>
<p>tsocks.conf:<br />
local = 127.0.0.1/255.255.255.255<br />
server = 127.0.0.1<br />
server_port = 1080<br />
server_type = 5<br />
tordns_enable = false</p>
<p>ssh -D 1080 user@server</p>
<p>I&#8217;m actually trying to use this with git-svn  so I type something like:</p>
<p>git svn rebase</p>
<p>It chugs away (debug output seems to provide nothing too useful, lots of &#8220;Call to close(n)&#8221;  then it says &#8220;Host not found&#8221;.  Similarly if I say tsocks ping remote-server same thing.  However, if I ssh user@server I can ping the server that I&#8217;m trying to reach so tsocks should be able to get there.  Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yiming</title>
		<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/comment-page-1/#comment-1202</link>
		<dc:creator>yiming</dc:creator>
		<pubDate>Mon, 07 Sep 2009 05:24:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yimingliu.com/?p=471#comment-1202</guid>
		<description>Hm.  I haven&#039;t run into this before, so I don&#039;t have practical advice.  Looking at the source code, that particular error is in fact issued by tsocks when it tries to connect to the SOCKS server you specified but can&#039;t.  It&#039;s kind of a catch-all error, so it&#039;s hard to tell what it&#039;s specifically doing wrong.  But error message basically does mean that it&#039;s not reaching the SOCKS server you specified in the conf file -- maybe because that server is somehow inaccessible, or you have configured the wrong one, or something else is preventing it specifically from accessing the SOCKS server.

I do need a bit more context, but I&#039;ll make some assumptions here.  If I understand your context correctly, you&#039;re trying to SSH through the gateway server G to a second, target host H, using SOCKS server S.   If you&#039;re using ssh -D, I&#039;m also assuming that you&#039;re trying to use SSH as a SOCKS server (meaning that your SOCKS server S actually sits locally on your localhost 127.0.0.1, you&#039;re using the network through G to go to H, and that you can reach G without using any proxies).  If these assumptions are not true, please let me know. 

Here&#039;s a checklist of configuration-related things (pardon me if some of these are obvious -- just trying to cover the context):
- when you ran ssh -D, you connected to G and the SOCKS server is up.  You said Firefox worked -- this should mean that you used Firefox&#039;s SOCKS5 feature to connect to your local SOCKS server at 127.0.0.1, and appear to other hosts on the Web as G) 
- tsocks.conf: server=127.0.0.1
- tsocks.conf: port= (whatever number you set after ssh -D)
- tsocks.conf: local=127.0.0.1/255.255.255.255
- that you&#039;re using tsocks when making the second SSH connection - tsocks ssh H.

If all of these are right, you might try something simple, like telnet.  If you are able to tsocks telnet your way out, then the problem might lie in SSH.  Also, make sure that you do have DNS resolution, either via your ordinary DNS server, or your SOCKS server.

If none of these help, you might try asking someone who works on tsocks or (more likely) a tsocks-spinoff project.  Sorry I can&#039;t be of more help.</description>
		<content:encoded><![CDATA[<p>Hm.  I haven&#8217;t run into this before, so I don&#8217;t have practical advice.  Looking at the source code, that particular error is in fact issued by tsocks when it tries to connect to the SOCKS server you specified but can&#8217;t.  It&#8217;s kind of a catch-all error, so it&#8217;s hard to tell what it&#8217;s specifically doing wrong.  But error message basically does mean that it&#8217;s not reaching the SOCKS server you specified in the conf file &#8212; maybe because that server is somehow inaccessible, or you have configured the wrong one, or something else is preventing it specifically from accessing the SOCKS server.</p>
<p>I do need a bit more context, but I&#8217;ll make some assumptions here.  If I understand your context correctly, you&#8217;re trying to SSH through the gateway server G to a second, target host H, using SOCKS server S.   If you&#8217;re using ssh -D, I&#8217;m also assuming that you&#8217;re trying to use SSH as a SOCKS server (meaning that your SOCKS server S actually sits locally on your localhost 127.0.0.1, you&#8217;re using the network through G to go to H, and that you can reach G without using any proxies).  If these assumptions are not true, please let me know. </p>
<p>Here&#8217;s a checklist of configuration-related things (pardon me if some of these are obvious &#8212; just trying to cover the context):<br />
- when you ran ssh -D, you connected to G and the SOCKS server is up.  You said Firefox worked &#8212; this should mean that you used Firefox&#8217;s SOCKS5 feature to connect to your local SOCKS server at 127.0.0.1, and appear to other hosts on the Web as G)<br />
- tsocks.conf: server=127.0.0.1<br />
- tsocks.conf: port= (whatever number you set after ssh -D)<br />
- tsocks.conf: local=127.0.0.1/255.255.255.255<br />
- that you&#8217;re using tsocks when making the second SSH connection &#8211; tsocks ssh H.</p>
<p>If all of these are right, you might try something simple, like telnet.  If you are able to tsocks telnet your way out, then the problem might lie in SSH.  Also, make sure that you do have DNS resolution, either via your ordinary DNS server, or your SOCKS server.</p>
<p>If none of these help, you might try asking someone who works on tsocks or (more likely) a tsocks-spinoff project.  Sorry I can&#8217;t be of more help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://blog.yimingliu.com/2009/03/05/ssh-subversion-through-socks-proxy-on-mac-os-x/comment-page-1/#comment-1201</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Mon, 07 Sep 2009 04:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yimingliu.com/?p=471#comment-1201</guid>
		<description>I&#039;m having difficulty getting this to work.  I&#039;m using the setup you described above with the ssh -D switch but when I turn on debugging via the TSOCKS_DEBUG variable I receive an error similar to the following: 04:23:39 (89730): do_resolve: error connecting to SOCKS server.  My server is running (firefox can connect to it) and I believe my ip/port/type are correct.  Any ideas?</description>
		<content:encoded><![CDATA[<p>I&#8217;m having difficulty getting this to work.  I&#8217;m using the setup you described above with the ssh -D switch but when I turn on debugging via the TSOCKS_DEBUG variable I receive an error similar to the following: 04:23:39 (89730): do_resolve: error connecting to SOCKS server.  My server is running (firefox can connect to it) and I believe my ip/port/type are correct.  Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
