<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On Feb 10, 2008, at 4:25 PM, David de Beer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>Hi, would that mean that I would have to create a tunnel for each http server that i would need to connect to?<br><br>Sounds like a lot of work, if I understand you correctly.<br><br>I know privoxy supports socks forwarding, but it does not do caching. I'm looking for something that will be able to do both.</blockquote><div><br class="webkit-block-placeholder"></div><div>Hi,<div><br class="webkit-block-placeholder"></div><div>I don't know on which platform you are running Varnish, but I've just tested the following on FreeBSD:</div><div><br class="webkit-block-placeholder"></div><div>- Install varnish</div><div>- Install tsocks (/usr/ports/net/tsocks)</div><div>- Configure tsocks to use socks proxy for connections to back-end subnet</div><div>- Start ssh tunnel like you describe in your original mailing</div><div>- Start varnish like this (example):</div><div><span class="Apple-tab-span" style="white-space: pre; ">       </span>tsocks varnishd -a listen-host:port -b backend:port -s file,/tmp/varnishcache,$((1024*1024*10))</div><div><br class="webkit-block-placeholder"></div><div>This works nicely. You might want to add -c blowfish to your sshd commandline, to minimize CPU overhead in encryption. Whether -C (compresson) makes sense or not depends on the back-end config, data types, volume and CPU cycles available.</div><div><br class="webkit-block-placeholder"></div><div>Have fun!</div></div><div>/Eirik</div><div><br class="webkit-block-placeholder"></div><br><blockquote type="cite"><br> <br>Thanks!<br><br><br><div class="gmail_quote">On Feb 10, 2008 5:10 PM, C. Handel <<a href="mailto:fragfutter@gmail.com">fragfutter@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Just create your SSH Tunnel with port forwarding (no need for Socks)<br>and point varnish to localhost:port as a source.<br><br>ssh -L 8080:<a href="http://www.example.com:80" target="_blank">www.example.com:80</a> <a href="mailto:user@sshhost.example.com">user@sshhost.example.com</a><br> <br>But you will pass all traffic through the encryption of the SSH<br>Tunnel, which will produce quite some CPU Load on both the Systems.<br><br>Greetings<br>   Christoph<br><div><div></div><div class="Wj3C7c"><br>On Feb 10, 2008 3:39 PM, David de Beer <<a href="mailto:daviddebeer@gmail.com">daviddebeer@gmail.com</a>> wrote:<br> ><br>> Greetings,<br>><br>> I have not been able to find any info on this subject: Is it possible to<br>> have proxy server forward requests to a socks server i.e. using ssh to<br>> tunnel to another machine and then poiting the local caching server to the<br> > port on the local machine (which gets forwarded to another host via)<br>><br>> something like this:<br>><br>> ssh -f -p 22 -D 45000 -l myname <a href="http://myfriends.host.net" target="_blank">myfriends.host.net</a> -N<br> ><br>> this will create a SOCKS5 server on <a href="http://127.0.0.1:45000" target="_blank">127.0.0.1:45000</a><br>><br>> Can then one basically ask the caching server to retrieve everything through<br>> socks server on <a href="http://127.0.0.1:45000" target="_blank">127.0.0.1:45000</a> ?<br> ><br>> Thanks!<br>><br>> --<br>>  recovery is forever...<br>> ..... if you can take it that long.<br></div></div>> _______________________________________________<br>> varnish-misc mailing list<br> > <a href="mailto:varnish-misc@projects.linpro.no">varnish-misc@projects.linpro.no</a><br>> <a href="http://projects.linpro.no/mailman/listinfo/varnish-misc" target="_blank">http://projects.linpro.no/mailman/listinfo/varnish-misc</a><br> ><br>><br></blockquote></div><br><br clear="all"><br>-- <br> recovery is forever...<br>..... if you can take it that long. _______________________________________________<br>varnish-misc mailing list<br><a href="mailto:varnish-misc@projects.linpro.no">varnish-misc@projects.linpro.no</a><br><a href="http://projects.linpro.no/mailman/listinfo/varnish-misc">http://projects.linpro.no/mailman/listinfo/varnish-misc</a><br></blockquote></div><br></div></body></html>