Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid Windows Update regular expression

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 3 Posters 3.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lweidig
      last edited by

      We are running pfSense 2.0-RC3 (and most recent updates), along with Squid 2.7.9_4.1.  We are trying to get Windows Updates to cache and tried the rule shown in the Wiki docs.  We get the following message in /var/squid/log/cache.log when we try to use that rule (as it appears others are):

      2011/06/30 16:08:17| parse_refreshpattern: Invalid regular expression '([^.]+.|)(download|(windows|)update|).(microsoft.|)com/.*.(cab|exe|msi|msp)': empty (sub)expression

      Using a web based regex parser it appears to be a valid pattern.  Does anybody have a solution to this?  Is there any way to have squid give us more detail on what it does not like about that expression?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • C
        cbrunet
        last edited by

        I have the same problem.

        1 Reply Last reply Reply Quote 0
        • N
          Nachtfalke
          last edited by

          Try this:

          
          refresh_pattern -i .*microsoft\.com/.*\.(cab|exe|msi|msp) 129600 100% 129600 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private;
          refresh_pattern -i .*windowsupdate\.com/.*\.(cab|exe|msi|msp) 129600 100% 129600 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private;
          
          

          –-edit---
          Did you post the whole line ?
          there is the time missing  1440 100% 1440 and then the subexpressions like reload-into-ims

          1 Reply Last reply Reply Quote 0
          • C
            cbrunet
            last edited by

            Finally, I modified the regexp to:

            refresh_pattern ([^.]+.)?(download|(windows)?update).(microsoft.)?com/.*.(cab|exe|msi|msp|psf) 4320 100% 43200 reload-into-ims;range_offset_limit -1;

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.