Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
  1. #21
    Newbie
    Join Date
    Nov 2020
    Posts
    12

    Default

    I totally missed that this topic was discussing AD BLOCKER app and not Web Filter. But alas it was too late for me to edit the previous reply. The link i sent earlier can upload the normal domain lists to the Web Filter app.

    This script does what webfools' script does but a tad bit faster. Tested and can confirm it uploads the easylist OT without issues. Ta i trä!

    https://github.com/returaxel/untangl...le-adblock.ps1
    Last edited by ccdmnk; 06-20-2021 at 11:41 PM.

  2. #22
    Newbie
    Join Date
    Jan 2021
    Posts
    1

    Default

    Do I want to import this list into the Ad Blocker or Web filter app or both?

  3. #23
    Untangler jcoffin's Avatar
    Join Date
    Aug 2008
    Location
    Sunnyvale, CA
    Posts
    9,665

    Default

    Do not import into Web Filter. Frankly, there is no reason to run Ad Blocker if you have Web Filter.
    Attention: Support and help on the Untangle Forums is provided by
    volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  4. #24
    Newbie
    Join Date
    Nov 2020
    Posts
    12

    Default

    https://github.com/returaxel/untangleable-json

    One can import domain lists to webfilter and the other can take the easy list and import in Adblocker. Tested and verified with 3 lists for webfilter and easylist for adblocker, noted in the code.

    Doubt all of the domains in the filters are already in Web Filter app, although quite many of them seem to be already.

    But since this is a manual or at the very least semi manual job and domain lists change it could very well screw you over if adding a bunch of lists. I wanted the AdGuard list in there as now i can ditch my AdGuard VM.

    Any other reason not to import domain lists into webfilter @jcoffin?

    Edit: might add, the default app list in web filter catches basically every ad on the pages i visit regularly.

  5. #25
    Untangler jcoffin's Avatar
    Join Date
    Aug 2008
    Location
    Sunnyvale, CA
    Posts
    9,665

    Default

    Quote Originally Posted by ccdmnk View Post
    Any other reason not to import domain lists into webfilter @jcoffin?
    Webfilter uses a method similar to DNS lookup to determine if to block or not based on it's DB. Using blocking domain list is a glob operation. For a few it is harmless, but for 1000s of entries it creates latency and overtaxing of the CPU. Glob is not efficient.
    ccdmnk likes this.
    Attention: Support and help on the Untangle Forums is provided by
    volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  6. #26
    Newbie
    Join Date
    Aug 2021
    Posts
    1

    Default

    Quote Originally Posted by R. Shackleford View Post
    I've be playing around with this for a couple days now. Seems the original scrip gave a JSON format that is different then the one I get if export a list from Untangle Ad Blocker. When Imported the results, they were also marked in Red indicating a "Delete" of the rules so when you click save, it process and you have a blank list.

    I made some changes to the JSON output to match a test example I generated by manually adding one entry then exporting it.
    My edits to the sting and order on lines 13 and 33 has resulted in a better JSON but one small problem persists. When it converts from the CVS to JSON, the values are getting put in "" example:"blocked":"true","flagged":"true". The two values that are true should not have the "" around them. This causes a JSON extension error when you try to save.

    Anyone know how to convert the CVS to JSON with those values not in ""?

    Here's my edited version. I changed the strings on lines 13 and 33 to match the JSON export of my user added test.
    Just to clarify this, for anyone confused like I was, the problem is the JSON file being created from WebFool's script has all the TRUE and FALSE values wrapped in "". This is causing Untangle to crash when trying to save. A super simple fix is to simply run WebFools original script & then run a powershell script to replace all the "true" & "false" strings with just true & false (no "")

    Code:
    $original_file = 'c:\temp\ADImport.json'
    $destination_file =  'c:\temp\ADImport.json'
    (Get-Content $original_file) | Foreach-Object {
        $_ -replace '"true"', 'true' `
           -replace '"false"', 'false'
       
    	 } | Set-Content $destination_file
    Obviously change the file location for $original_file & $destination_file to your file/location. That's it! You should be able to upload all 60k lines to untangle without any issue.

    Cheers!
    Last edited by Lord Waffles; 08-27-2021 at 10:44 AM.

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2