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

    Squid cache server?

    Scheduled Pinned Locked Moved Cache/Proxy
    7 Posts 5 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.
    • S
      stormrage
      last edited by

      Hi guys! I tried searching for two days already and have not found any leads on how to do this.
      I want to cache everything from website and downloaded files (movies, software, music, and more) so basically a cache server. But squid only caches websites, any way to do this?

      I saw this in a forum if you do this he says you can cache everything, but to my knowledge pfSense also has a dir for caching, so whats so different with this code? Does the package squid in pfSense has this? Thank you! :)

      TRY THIS
      
      # Uncomment and adjust the following to add a disk cache directory.
      
      #cache_dir ufs /share/MD0_DATA/.qpkg/Squid/opt/var/squid/cache 100 16 256
      
      cache_mem 8 MB
      minimum_object_size 0 bytes
      maximum_object_size 200 MB
      maximum_object_size_in_memory 512 KB
      become
      
      cache_dir ufs /share/MD0_DATA/.qpkg/Squid/opt/var/squid/cache 4000 16 256
      
      cache_mem 8 MB
      minimum_object_size 0 bytes
      maximum_object_size 200 MB
      maximum_object_size_in_memory 512 KB
      hope it would help :)
      
      1 Reply Last reply Reply Quote 0
      • G
        gratis.obake
        last edited by

        I have a similar needs like what you are asking…, with mine being with the high priority of being able to cache game updates/installs...,  then searched the web and found out that 'squid' does those things.

        and for your squid/pfSense package question, yes, pfSense do have squid packages (2 of them I believe). yet I'm not certain and I'm doubtful and many will advise making a dedicated cache server instead of building it on pfSense as it will be too messy and will be more headaches later on.

        to make it short: its best to leave pfSense as-is..., and have a dedicated squid/cache server on your LAN.

        to aid you a bit..., you need a reverse proxy, squid is one of them, you may also need some of these and/or combinations: 'nginx', 'varnish'. to name a few.
        squid can cache windows updates (you can see plenty of examples on the web).
        nginx can cache game updates/installs to some extent, look at LANCache for that.

        there are no concrete all-in-one guide to achieve it, but there are some 'commercial' versions claiming to cache plenty of things.

        good luck with your cache server

        1 Reply Last reply Reply Quote 0
        • T
          teebonaire
          last edited by

          Hi!, could someone tell if it's caching?

          ss.png
          ss.png_thumb

          1 Reply Last reply Reply Quote 0
          • M
            mattlach
            last edited by

            @gratis.obake:

            I have a similar needs like what you are asking…, with mine being with the high priority of being able to cache game updates/installs...,  then searched the web and found out that 'squid' does those things.

            and for your squid/pfSense package question, yes, pfSense do have squid packages (2 of them I believe). yet I'm not certain and I'm doubtful and many will advise making a dedicated cache server instead of building it on pfSense as it will be too messy and will be more headaches later on.

            to make it short: its best to leave pfSense as-is..., and have a dedicated squid/cache server on your LAN.

            to aid you a bit..., you need a reverse proxy, squid is one of them, you may also need some of these and/or combinations: 'nginx', 'varnish'. to name a few.
            squid can cache windows updates (you can see plenty of examples on the web).
            nginx can cache game updates/installs to some extent, look at LANCache for that.

            there are no concrete all-in-one guide to achieve it, but there are some 'commercial' versions claiming to cache plenty of things.

            good luck with your cache server

            Hmm.

            Is it possible to tell pfSense to point to an external proxy/cache server, and thus make it transparent just as with the built in package, or would you have to set up every client to use the proxy manually?

            1 Reply Last reply Reply Quote 0
            • KOMK
              KOM
              last edited by

              cache_dir ufs /share/MD0_DATA/.qpkg/Squid/opt/var/squid/cache 4000 16 256

              No, this is not where pfSense puts its squid cache.

              Hi!, could someone tell if it's caching?

              Caches are hit or miss.  Yours is not caching since it keeps scoring a miss.

              Is it possible to tell pfSense to point to an external proxy/cache server, and thus make it transparent just as with the built in package, or would you have to set up every client to use the proxy manually?

              Leave it up to the clients to discover the cache.  Some clients, like Android, must be manually configured.  Transparent caching breaks HTTPS so don't use it.

              1 Reply Last reply Reply Quote 0
              • T
                teebonaire
                last edited by

                Thanks "KOM" for the reply, there are also TCP_HITS in my access logs, but rarely, I just want to cache updates in
                that site  dl.garenanow… hope you could help me, I'll try to screenshot my squid configuration gui if that's ok

                1 Reply Last reply Reply Quote 0
                • KOMK
                  KOM
                  last edited by

                  I'm not a squid expert.  Your GUI options won't make a difference in general.  If you have content that doesn't cache then you need to enable dynamic caching and then modify your refresh patterns to compensate for the content that doesn't cache.  Test, fix, repeat until working.

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