Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am looking for a network proxy that would do the following:

If a requested URL matches a certain pattern (regular expressions would be ideal) save the transfer to a specified folder.

I'm not sure if I can achieve that with Squid (that I already have running), but I'm open to using other tools.

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

A hack to accomplish this could be to use wwwoffle: when in "online" mode, wwwoffle saves all visited pages (excluding those that match a specified regexp) into a folder. You can configure the cache folder path.

As far as I know, there is no direct method to tell WWWOFFLE which pages/URLs to save, but there could be workarounds to this:

  • if you can negate your regexp, you can tell WWWOFFLE which pages not to save

  • if your browser supports the proxy.pac JavaScript-based proxy configuration, it's straightforward to cook up a JavaScript function that directs the browser to only use the proxy for URLs that match a regexp.

  • you might be able to configure Squid to use the WWWOFFLE as a parent proxy when URL matches a certain pattern; i.e., you have browser->Squid->WWWOFFLE->Internet when the request URL matches a regexp and browser->Squid->Internet otherwise.

share|improve this answer
    
Looks like a really good option. I'll give it a try next week, see if I can get it to work. –  UrkoM Sep 15 '10 at 6:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.