neu242 Asked: 2011-01-27 02:09:31 +0800 CST2011-01-27 02:09:31 +0800 CST 2011-01-27 02:09:31 +0800 CST How do I use MacPorts (rsync) through a SOCKS5 proxy? 772 MacPorts relies on rsync to do its job, and I rely on a SOCKS5 proxy to get full access to internet. How do I make rsync run all its queries through my proxy? mac-osx proxy rsync socks 2 Answers Voted Sirex 2011-01-27T02:14:23+08:002011-01-27T02:14:23+08:00 Sorry to just paste a url, but its explained here. Essentially you install the connect utility, add something like this to ~/.ssh/config: Host stokebloke.com ProxyCommand connect -S user@socks-server:1080 %h %p Then use: rsync --progress -avrz -e ssh src_dir/ [email protected]:~/dest_dir/ Tim 2012-05-12T06:04:37+08:002012-05-12T06:04:37+08:00 Alternatively to Sirex' answer, you can use nc(1) (netcat) to use the proxy. Again, modify your ~/.ssh/config file: Host server-prox Hostname www.server.com ProxyCommand /usr/bin/nc -x localhost:8080 %h %p then run rsync -e ssh server-prox:path/to/files and rsync (or rather ssh) will automatically use the proxy command. This assumes there is a SOCKS proxy running on localhost port 8080, which you can get with ssh -D 8080 proxyserver.com Personally I use ssh -qfxND 8080 proxyserver.com to set up a proxy tunnel, where -qfxN make the command run quietly in the background, see ssh(1).
Sorry to just paste a url, but its explained here. Essentially you install the connect utility, add something like this to
~/.ssh/config
:Then use:
Alternatively to Sirex' answer, you can use
nc(1)
(netcat) to use the proxy.Again, modify your
~/.ssh/config
file:then run
and rsync (or rather ssh) will automatically use the proxy command.
This assumes there is a SOCKS proxy running on
localhost
port 8080, which you can get withPersonally I use
to set up a proxy tunnel, where
-qfxN
make the command run quietly in the background, seessh(1)
.