Fetch from Socks server.

Eirik Øverby ltning at anduin.net
Sun Feb 10 17:30:44 CET 2008


On Feb 10, 2008, at 4:25 PM, David de Beer wrote:

>
> Hi, would that mean that I would have to create a tunnel for each  
> http server that i would need to connect to?
>
> Sounds like a lot of work, if I understand you correctly.
>
> I know privoxy supports socks forwarding, but it does not do  
> caching. I'm looking for something that will be able to do both.

Hi,

I don't know on which platform you are running Varnish, but I've just  
tested the following on FreeBSD:

- Install varnish
- Install tsocks (/usr/ports/net/tsocks)
- Configure tsocks to use socks proxy for connections to back-end subnet
- Start ssh tunnel like you describe in your original mailing
- Start varnish like this (example):
	tsocks varnishd -a listen-host:port -b backend:port -s file,/tmp/ 
varnishcache,$((1024*1024*10))

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.

Have fun!
/Eirik


>
>
> Thanks!
>
>
> On Feb 10, 2008 5:10 PM, C. Handel <fragfutter at gmail.com> wrote:
> Just create your SSH Tunnel with port forwarding (no need for Socks)
> and point varnish to localhost:port as a source.
>
> ssh -L 8080:www.example.com:80 user at sshhost.example.com
>
> But you will pass all traffic through the encryption of the SSH
> Tunnel, which will produce quite some CPU Load on both the Systems.
>
> Greetings
>   Christoph
>
> On Feb 10, 2008 3:39 PM, David de Beer <daviddebeer at gmail.com> wrote:
> >
> > Greetings,
> >
> > I have not been able to find any info on this subject: Is it  
> possible to
> > have proxy server forward requests to a socks server i.e. using  
> ssh to
> > tunnel to another machine and then poiting the local caching  
> server to the
> > port on the local machine (which gets forwarded to another host via)
> >
> > something like this:
> >
> > ssh -f -p 22 -D 45000 -l myname myfriends.host.net -N
> >
> > this will create a SOCKS5 server on 127.0.0.1:45000
> >
> > Can then one basically ask the caching server to retrieve  
> everything through
> > socks server on 127.0.0.1:45000 ?
> >
> > Thanks!
> >
> > --
> >  recovery is forever...
> > ..... if you can take it that long.
> > _______________________________________________
> > varnish-misc mailing list
> > varnish-misc at projects.linpro.no
> > http://projects.linpro.no/mailman/listinfo/varnish-misc
> >
> >
>
>
>
> -- 
> recovery is forever...
> ..... if you can take it that long.  
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20080210/7e05de91/attachment-0001.html>


More information about the varnish-misc mailing list