SquidGuard XMLRPC Sync - has anybody done that ?

  • Hi,

    I have different pfsense on different locations but on all locations the same squid configuration and so on.
    Packages like freeradius2 or squid3 have a sync feature.

    I would like to know if anybody has done or would like to add the XMLRPC sync feature to squidguard package ?

    I really appreciate your help!

  • bump

  • Hello everybody,

    I tried to implement the XMLRPC Sync option for squidguard. I made it possible that the .XML files for the following categories will be transferred from one pfsense to another:

    • General Settings

    • Common ACL

    • Group ACL

    • Target Categories

    • Times

    • Rewrites

    My problem/question is:
    To apply settings I made in squidguard I have to go to "General Settings" and then first press "save" and then press "apply".
    I am unsure which functions I need to call that this happens in the "correct" order.

    I am using this function to reconfigure and restart squidguard on the remote host:

    function squidguard_all_after_XMLRPC_resync() {
    	log_error("SquidGuard: Finished XMLRPC process. It should be OK. For more information look at the host which started sync.");

    I would really appreciate your help if someone could test this in your environment and tell me if the sync is working and the configuration on the remote host will be correctly applied.

    You need at least the following files to change on your pfsense:

    • squidguard.inc

    • squidguard.xml

    • squidguard_sync.xml

    Thank you very much for your feedback! Any help on code changes is appreciated, too  ;D


  • try to call it only on apply function.

  • @marcelloc:

    try to call it only on apply function.

    Hehe, "where" is the Apply-function ? php, html and java is not my friend ;-))
    Can you show me the function in the .inc files ? Or the lines ?

    And are you sure that only "Apply" will be enough on the remote host ?

    Or do you mean that the sync should only start when clicking on "Apply" and not on both - "Save" and "Apply" ? That would make sense.

  • @Nachtfalke:

    Hehe, "where" is the Apply-function ? php, html and java is not my friend ;-))

    I think that a good place(just a fast look, not a deep look ;) ) to put it is in squidguard_configurator.inc file at function sg_reconfigure()

    or include it before sg_reconfigure and exec sg_reconfigure after update.

Log in to reply