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

    Squid cachemgr

    Scheduled Pinned Locked Moved pfSense Packages
    6 Posts 2 Posters 1.9k 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
      dvserg
      last edited by

      2 marcelloc

      Need fix squid.inc line 1044 for cachemgr options (func function squid_resync_nac):

      EOD;
      
      	$settings_ch = $config['installedpackages']['squidcache']['config'][0];
      	if(!empty($settings_ch['ext_cachemanager'])) {
      		$extmgr = explode(";", ($settings_ch['ext_cachemanager']));
      		$count = 1;
      		$conf .= "\n# Allow external cache managers\n";
      //    $conf .= "acl ext_manager src ".$settings['ext_cachemanager']."\n";
      		foreach ($extmgr as $mgr) {
      			$conf .= "acl ext_manager_{$count} src {$mgr}\n" ;
      			$conf .= "http_access allow manager ext_manager_{$count}\n";
      			$count += 1;
      		}
      	}
      
      	$conf .= <<
      

      SquidGuardDoc EN  RU Tutorial
      Localization ru_PFSense

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        Thanks!

        The cachemgr option is not on nac tab.

        I'll fix it.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          Is the a reason to create one acl for each cache manager?

          # Allow external cache managers
          acl ext_manager_1 src 192.168.52.75
          http_access allow manager ext_manager_1
          acl ext_manager_2 src 192.168.63.74
          http_access allow manager ext_manager_2
          

          Isn't this a better option?

          # Allow external cache managers
          acl ext_manager src 192.168.52.75
          acl ext_manager src 192.168.63.74
          http_access allow manager ext_manager
          
          EOD;
          
          	if (is_array($config['installedpackages']['squidcache'])){
          		$settings_ch = $config['installedpackages']['squidcache']['config'][0];
          		if(!empty($settings_ch['ext_cachemanager'])) {
          	  		$extmgr = explode(";", ($settings_ch['ext_cachemanager']));
              		$conf .= "\n# Allow external cache managers\n";
          	 		foreach ($extmgr as $mgr) {
              			$conf .= "acl ext_manager src {$mgr}\n";
          	 			}
          	 		$conf .= "http_access allow manager ext_manager\n";
          			}
          		}
          
            $conf .= <<
          

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

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

            I do not see the difference, if worked. I just looked up the error in the code.

            SquidGuardDoc EN  RU Tutorial
            Localization ru_PFSense

            1 Reply Last reply Reply Quote 0
            • marcellocM
              marcelloc
              last edited by

              @dvserg:

              I do not see the difference, if worked. I just looked up the error in the code.

              Ok, I've published the new code. Thanks for the fix.

              Treinamentos de Elite: http://sys-squad.com

              Help a community developer! ;D

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

                @marcelloc:

                @dvserg:

                I do not see the difference, if worked. I just looked up the error in the code.

                Ok, I've published the new code. Thanks for the fix.

                Thanks!
                New proxy - good job!

                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.