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

    Squid Returned to Packages *** PLEASE TEST ***

    Scheduled Pinned Locked Moved pfSense Packages
    226 Posts 46 Posters 159.0k 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.
    • D
      databeestje
      last edited by

      the port 80 check is broken. I'm fixing that now. The service check is in.

      The cache location allready made it in. You have log location changes too?

      1 Reply Last reply Reply Quote 0
      • U
        Umberto
        last edited by

        @databeestje:

        the port 80 check is broken. I'm fixing that now. The service check is in.

        The cache location allready made it in. You have log location changes too?

        I don't know what's wrong with it, but thanks for fixing it.

        Yeah the logdir works the same as the cache dir…

        But in your version in:
        function squid_resync_cache

        there is
        $cachedir = SQUID_CACHEDIR;
        that's wrong because that's still the fixed cache dir...
        it should be
        $cachedir =($settings['harddisk_cache_location'] ? $settings['harddisk_cache_location'] : '/var/squid/cache');

        same as with
        $logdir_cache = SQUID_LOGDIR . '/cache.log';
        $logdir_access = ($settings['log_enabled'] == 'on' ? SQUID_LOGDIR . '/access.log' : '/dev/null');

        that should be
                    $logdir = ($settings['log_dir'] ? $settings['log_dir'] : '/var/squid/log');

        $logdir_cache = $logdir . '/cache.log';
        $logdir_access = ($settings['log_enabled'] == 'on' ? $logdir . '/access.log' : '/dev/null');

        I tought that's all, but I'm not 100% sure, otherwise check my included file in my previous post…

        1 Reply Last reply Reply Quote 0
        • D
          databeestje
          last edited by

          port 80 check fixed, added log dir option to xml.

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

            Thanks to all those who contributed so far, my installation now at least starts up fine, and everything looks good!

            Will test the throttling later today, got to get some sleep first.

            1 Reply Last reply Reply Quote 0
            • D
              databeestje
              last edited by

              I have made it available for the public again, and the 1st succes is in. I'm off to bed.

              I think the log directory and cache directory creation is ok now and it should also populate the cache directory after changing.

              Authentication really needs testing.

              1 Reply Last reply Reply Quote 0
              • I
                ivanjong
                last edited by

                well just 1 small bug left. i dunno if this is a bug or intentional but the squid package cant work in transparent mode if the webgui is on the port 80 so have to change the port of the webgui. if this is intentional i think it's better to have a better notice to ask user to change the webgui port. anyways great job on the package it's working well now

                1 Reply Last reply Reply Quote 0
                • I
                  ivanjong
                  last edited by

                  i seen another bug again. seems like after installing the package u need to change the default cache location to another location first then change back to original or else it wont create the location and squid will fail to start with (squid): Failed to verify one of the swap directories, Check cache.log for details. Run 'squid -z' to create swap directories if needed, or if running Squid for the first time. and the blacklist is not working. seems like sullrich is kinda right this thing is cursed

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

                    The throttling now behaves as expected. Thanks to all involved.

                    1 Reply Last reply Reply Quote 0
                    • U
                      Umberto
                      last edited by

                      @ivanjong:

                      well just 1 small bug left. i dunno if this is a bug or intentional but the squid package cant work in transparent mode if the webgui is on the port 80 so have to change the port of the webgui. if this is intentional i think it's better to have a better notice to ask user to change the webgui port. anyways great job on the package it's working well now

                      No that's not a bug, you will lock yourself out of the webgui if you do that.
                      There can't be both services on the same port.

                      About creating a cache dir.
                      I'll do a reinstall to be sure, but the problem is, if you had a squid version installed allready, it could give problems, because the cache dir is allready there but for another version
                      I'll take a look at it, maybe we can cange the install procedure that it will remove the old default cahce dir if it's there during install.

                      1 Reply Last reply Reply Quote 0
                      • I
                        ivanjong
                        last edited by

                        nope mine is on fresh instalation of pfsense latest snapshot. it would not run unless i change the cache dir and change back and the blocklist is not working as well. anyways thanks for all the hardwork put into it. seems like the new squid breaks a lot of things. i'll try to test more features of the package for everyone

                        1 Reply Last reply Reply Quote 0
                        • U
                          Umberto
                          last edited by

                          I have some other update…

                          in the resync functions after
                          log_error($disk_cache_location." does not exist.  Creating.");
                          there must be mwexec("/usr/local/sbin/squid -k kill");

                          otherwise it won't make the new cahce dir

                          Ok the kill option is not that nice, but who cares? we start with a new cache dir... so it's not a problem to shut it down this way.
                          I tried to do it nice, with the shutdown function, but that takes ages

                          This will be the new code:
                                 if(!is_dir($disk_cache_location.'01/')) {
                                         log_error($disk_cache_location." does not exist.  Creating.");
                                         mwexec("/usr/local/sbin/squid -k kill");

                          But I'll give a new update later on.
                          I want to delete the old cache dir aswell, but that ain't as easy as I hope it would be.

                          P.s This peace of code fixes the problem of having to setup the cache dir twice

                          1 Reply Last reply Reply Quote 0
                          • S
                            SB
                            last edited by

                            Just a note to say thanks - the update is working here at the moment in transparent mode.

                            1 Reply Last reply Reply Quote 0
                            • D
                              dvserg
                              last edited by

                              Squid package tested on bridge in transparent mode?

                              SquidGuardDoc EN  RU Tutorial
                              Localization ru_PFSense

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

                                This is looking really good.  Transparent mode is working well, but I'm not seeing any effects of the blacklist/whitelist.  I know before I had to put an '*' in the blacklist if I wanted to fliter the web down to only the whitelisted sites.  Is this still the case or am I missing another configuration step somewhere?  I've tried adding the * but I'm still getting right through.

                                1 Reply Last reply Reply Quote 0
                                • D
                                  databeestje
                                  last edited by

                                  Newest CVS has seen some cleanups. Blacklisting appears broken to me. Can someone confirm this?

                                  1 Reply Last reply Reply Quote 0
                                  • U
                                    Umberto
                                    last edited by

                                    Databeesje I saw you didn't add the lines I sugest, but now if you change your cache dir, you have to save twice… once to let scquid "crash" and the 2nd time to actually make the cahce dir (you can't make the cache dir while squid is running) so I sugest you add the -k kill when you change the cash dir...

                                    about removing the cache, I have to figure out how I can give an hidden value in the form, so I can pass some vars while the user hits save... anyone an idea how to do that in squid?

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      databeestje
                                      last edited by

                                      Makes sense, I'll fix this.

                                      Have you been able to test blacklists? I have been unable to make them work.

                                      1 Reply Last reply Reply Quote 0
                                      • U
                                        Umberto
                                        last edited by

                                        not yet, I just arrived home…

                                        But I'll try it out..

                                        1 Reply Last reply Reply Quote 0
                                        • U
                                          Umberto
                                          last edited by

                                          I think the squid version we use has no acl support..
                                          If I just remove all acl lines and add http_access deny all
                                          you would suspect no data will get thru, but it keeps running.

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            dvserg
                                            last edited by

                                            May be one seriouse bug when installed any redirector package (squidGuard for example) who need Squid package.
                                            *** When redirector installed - we can't correctly full reinstall or delete squid package - redirector block delete Squid package ***

                                            May be need check installation known redirector packages and notify user about this.

                                            SquidGuardDoc EN  RU Tutorial
                                            Localization ru_PFSense

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