• Categories
  • Recent
  • Tags
Collapse
  1. Home
  2. Minim
  3. Won't block 3rd party properly

Won't block 3rd party properly

Scheduled Pinned Locked Moved Minim
bugminimmajor
64 Posts 2 Posters 10.5k Views 2 Watching
  • 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.
  • SweetPS Offline
    SweetPS Offline
    SweetP
    wrote on last edited by
    #40

    I’ve also added wildcard support,
    I just need to figure out how to make it obvious in the UI.
    😊

    Also, currently domains with a wildcard will override subdomain rules…
    I’ll see if there’s anything I can do about that

    ~
    Russell
    SweetPProductions.com

    N 1 Reply Last reply
    1
    • SweetPS SweetP

      I’ve also added wildcard support,
      I just need to figure out how to make it obvious in the UI.
      😊

      Also, currently domains with a wildcard will override subdomain rules…
      I’ll see if there’s anything I can do about that

      N Offline
      N Offline
      NickC
      wrote on last edited by NickC
      #41

      @SweetP said in Won't block 3rd party properly:

      Also, currently domains with a wildcard will override subdomain rules…
      I’ll see if there’s anything I can do about that

      I would think this to the expected behaviour. Once the user adds a wildcard root domain all subdomain rules should be ignored.
      It would be great if the ruleset would automatically be pruned once the user whitelists the root domain with the wildcard, but that’s a nice to have mostly. 👷

      1 Reply Last reply
      0
      • SweetPS Offline
        SweetPS Offline
        SweetP
        wrote on last edited by
        #42

        Ive fixed the subdomain issue.
        I just need to try and make it user friendly and discoverable.

        I'll release once I find a solution
        🙂

        ~
        Russell
        SweetPProductions.com

        1 Reply Last reply
        1
        • SweetPS Offline
          SweetPS Offline
          SweetP
          wrote on last edited by SweetP
          #43

          Ive released v4.1 in my Store, and it will be available in the App Store after review by Apple
          🙂

          ~
          Russell
          SweetPProductions.com

          N 2 Replies Last reply
          1
          • SweetPS SweetP

            Ive released v4.1 in my Store, and it will be available in the App Store after review by Apple
            🙂

            N Offline
            N Offline
            NickC
            wrote on last edited by
            #44

            @SweetP Awesome. Looking forward to giving it a go.

            Thank you, Russell. Have a great weekend! 🎊

            1 Reply Last reply
            0
            • SweetPS SweetP

              Ive released v4.1 in my Store, and it will be available in the App Store after review by Apple
              🙂

              N Offline
              N Offline
              NickC
              wrote on last edited by NickC
              #45

              @SweetP Something seems to be wrong. The update just hit a moment ago and Minim seems to be blocking everything by default and ignores the Block Rules tab. Regardless of the options in Block Rules tab, the only rules written are the default

                {
                  "trigger" : {
                    "url-filter" : ".*"
                  },
                  "action" : {
                    "type" : "ignore-previous-rules"
                  }
                },
                {
                  "trigger" : {
                    "url-filter" : ".*"
                  },
                  "action" : {
                    "type" : "block"
                  }
                },
              

              I think the resource-type trigger field is missing from the default block rules and just the action (i.e. block) is being generated, thus blocking every URL.👨‍💻

              1 Reply Last reply
              0
              • SweetPS Offline
                SweetPS Offline
                SweetP
                wrote on last edited by
                #46

                That’s odd,
                I’ll take a look when I get home tonight.

                ~
                Russell
                SweetPProductions.com

                1 Reply Last reply
                1
                • SweetPS Offline
                  SweetPS Offline
                  SweetP
                  wrote on last edited by SweetP
                  #47

                  Your’e right,
                  I’ve released v4.1.1, and it’s waiting for review with Apple now

                  ~
                  Russell
                  SweetPProductions.com

                  N 1 Reply Last reply
                  1
                  • SweetPS SweetP

                    Your’e right,
                    I’ve released v4.1.1, and it’s waiting for review with Apple now

                    N Offline
                    N Offline
                    NickC
                    wrote on last edited by NickC
                    #48

                    @SweetP Update just hit. Seems to work well, except for a small issue with the way www and non-www domains get handled.

                    If you go to www.google.com and add an exception for it, Minim’s list will have google.com without the www part
                    This means that with the current behaviour it won’t load resources unless the user manually fixes the exceptions list and adds the www back.

                    I think the regex for www matching is broken because of the extra escape char \ after www:

                    ^https?:\/\/(www\\.)?google.com[:\/]
                    
                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      NickC
                      wrote on last edited by
                      #49

                      Also, if you completely unblock all resources for www.google.com, since no other "url-filter" rules gets generated and only the default "unless-domain” google.com gets added (without www part) the exception won’t apply.

                      I think the default behaviour of stripping the www part when adding an exception to Minim is no longer valid with this new better handling of domain/subdomain separation. In essence, www is a subdomain and should be treated as such. 🙂

                      SweetPS 1 Reply Last reply
                      0
                      • N NickC

                        Also, if you completely unblock all resources for www.google.com, since no other "url-filter" rules gets generated and only the default "unless-domain” google.com gets added (without www part) the exception won’t apply.

                        I think the default behaviour of stripping the www part when adding an exception to Minim is no longer valid with this new better handling of domain/subdomain separation. In essence, www is a subdomain and should be treated as such. 🙂

                        SweetPS Offline
                        SweetPS Offline
                        SweetP
                        wrote on last edited by
                        #50

                        @NickC said in Won't block 3rd party properly:

                        I think the default behaviour of stripping the www part when adding an exception to Minim is no longer valid with this new better handling of domain/subdomain separation. In essence, www is a subdomain and should be treated as such. 🙂

                        Ill look into this
                        as im also doing some www assumptions elsewhere in code.
                        but good points 👍

                        ~
                        Russell
                        SweetPProductions.com

                        N 1 Reply Last reply
                        1
                        • SweetPS SweetP

                          @NickC said in Won't block 3rd party properly:

                          I think the default behaviour of stripping the www part when adding an exception to Minim is no longer valid with this new better handling of domain/subdomain separation. In essence, www is a subdomain and should be treated as such. 🙂

                          Ill look into this
                          as im also doing some www assumptions elsewhere in code.
                          but good points 👍

                          N Offline
                          N Offline
                          NickC
                          wrote on last edited by
                          #51

                          @SweetP Thanks.

                          Also, don’t know if you saw my previous comment re the regex handling/typo. However, if you decide to remove the www handling part of the code, of course that comment would no longer apply. 🤓

                          1 Reply Last reply
                          0
                          • SweetPS Offline
                            SweetPS Offline
                            SweetP
                            wrote on last edited by
                            #52

                            v4.1.2 should be available now
                            🙂

                            ~
                            Russell
                            SweetPProductions.com

                            N 1 Reply Last reply
                            1
                            • SweetPS SweetP

                              v4.1.2 should be available now
                              🙂

                              N Offline
                              N Offline
                              NickC
                              wrote on last edited by
                              #53

                              @SweetP All seems to be working as expected. Thank you for doing this, Russell. With these changes Minim has become quite a fierce content blocker for Safari. Nothing quite like it. 👏

                              SweetPS 1 Reply Last reply
                              0
                              • N NickC

                                @SweetP All seems to be working as expected. Thank you for doing this, Russell. With these changes Minim has become quite a fierce content blocker for Safari. Nothing quite like it. 👏

                                SweetPS Offline
                                SweetPS Offline
                                SweetP
                                wrote on last edited by
                                #54

                                @NickC said in Won't block 3rd party properly:

                                @SweetP All seems to be working as expected. Thank you for doing this, Russell. With these changes Minim has become quite a fierce content blocker for Safari. Nothing quite like it. 👏

                                That’s great,
                                Thanks for all the great feedback and suggestions.

                                ~
                                Russell
                                SweetPProductions.com

                                1 Reply Last reply
                                1
                                • N Offline
                                  N Offline
                                  NickC
                                  wrote on last edited by NickC
                                  #55

                                  @SweetP Sadly, I think I found a bug 😕

                                  When adding www.youtube.com as an exception to default blocking rules, all third-party resources get loaded as well, despite explicit blocking in both Minim's default and the exceptions list.

                                  {
                                      "trigger" : {
                                        "load-type" : [
                                          "third-party"
                                        ],
                                        "resource-type" : [
                                          "script",
                                          "font",
                                          "style-sheet",
                                          "popup",
                                          "image",
                                          "media",
                                          "svg-document",
                                          "document",
                                          "raw",
                                          "ping",
                                          "fetch",
                                          "websocket",
                                          "other"
                                        ],
                                        "url-filter" : "^https?:\/\/www.youtube.com[:\/]"
                                      },
                                      "action" : {
                                        "type" : "block"
                                      }
                                    }
                                  

                                  These are the rules that get added and the standard unless-domain = www.youtube.com for the default blocking policy.

                                  From what I could tell, everything should work as expected, however, third-party resources all load.

                                  All other behaviour in Minim seems to work as expected, but as soon as you add an exception with first-party resources unblocked, somehow third-party get loaded as well despite the rule seemingly being correct.

                                  SweetPS 1 Reply Last reply
                                  0
                                  • N Offline
                                    N Offline
                                    NickC
                                    wrote on last edited by NickC
                                    #56

                                    @SweetP Another bug, if you unblock by default all first-party resources, the generic block rule for first-party gets generated but with an empty array for resource-type which blocks all resources, thus completely preventing any page from loading. 👷

                                      {
                                        "trigger" : {
                                          "resource-type" : [
                                    
                                          ],
                                          "load-type" : [
                                            "first-party"
                                          ],
                                          "url-filter" : ".*"
                                        },
                                        "action" : {
                                          "type" : "block"
                                        }
                                      },
                                    
                                    SweetPS 1 Reply Last reply
                                    0
                                    • N NickC

                                      @SweetP Another bug, if you unblock by default all first-party resources, the generic block rule for first-party gets generated but with an empty array for resource-type which blocks all resources, thus completely preventing any page from loading. 👷

                                        {
                                          "trigger" : {
                                            "resource-type" : [
                                      
                                            ],
                                            "load-type" : [
                                              "first-party"
                                            ],
                                            "url-filter" : ".*"
                                          },
                                          "action" : {
                                            "type" : "block"
                                          }
                                        },
                                      
                                      SweetPS Offline
                                      SweetPS Offline
                                      SweetP
                                      wrote on last edited by
                                      #57

                                      @NickC said in Won't block 3rd party properly:

                                      @SweetP Another bug, if you unblock by default all first-party resources, the generic block rule for first-party gets generated but with an empty array for resource-type which blocks all resources, thus completely preventing any page from loading. 👷

                                      good catch.
                                      this is a simple fix, and it'll be in the next release

                                      ~
                                      Russell
                                      SweetPProductions.com

                                      1 Reply Last reply
                                      1
                                      • N NickC

                                        @SweetP Sadly, I think I found a bug 😕

                                        When adding www.youtube.com as an exception to default blocking rules, all third-party resources get loaded as well, despite explicit blocking in both Minim's default and the exceptions list.

                                        {
                                            "trigger" : {
                                              "load-type" : [
                                                "third-party"
                                              ],
                                              "resource-type" : [
                                                "script",
                                                "font",
                                                "style-sheet",
                                                "popup",
                                                "image",
                                                "media",
                                                "svg-document",
                                                "document",
                                                "raw",
                                                "ping",
                                                "fetch",
                                                "websocket",
                                                "other"
                                              ],
                                              "url-filter" : "^https?:\/\/www.youtube.com[:\/]"
                                            },
                                            "action" : {
                                              "type" : "block"
                                            }
                                          }
                                        

                                        These are the rules that get added and the standard unless-domain = www.youtube.com for the default blocking policy.

                                        From what I could tell, everything should work as expected, however, third-party resources all load.

                                        All other behaviour in Minim seems to work as expected, but as soon as you add an exception with first-party resources unblocked, somehow third-party get loaded as well despite the rule seemingly being correct.

                                        SweetPS Offline
                                        SweetPS Offline
                                        SweetP
                                        wrote on last edited by
                                        #58

                                        @NickC said in Won't block 3rd party properly:

                                        @SweetP Sadly, I think I found a bug 😕

                                        When adding www.youtube.com as an exception to default blocking rules, all third-party resources get loaded as well, despite explicit blocking in both Minim's default and the exceptions list.

                                        I think this is unfortunately a limitation of the WebKit content blocking API
                                        😞

                                        It looks as though you can load third party content via a first party script....

                                        The only reliable way I could find to block all third party content on YouTube was to block all first and third party requests for the following domains:

                                        • *doubleclick.net
                                        • *ggpht.com
                                        • *googleapis.com
                                        • *gstatic.com
                                        • *ytimg.com

                                        in an update, ill remove the filter for adding domains to minim via the main app

                                        ~
                                        Russell
                                        SweetPProductions.com

                                        N 1 Reply Last reply
                                        1
                                        • SweetPS SweetP

                                          @NickC said in Won't block 3rd party properly:

                                          @SweetP Sadly, I think I found a bug 😕

                                          When adding www.youtube.com as an exception to default blocking rules, all third-party resources get loaded as well, despite explicit blocking in both Minim's default and the exceptions list.

                                          I think this is unfortunately a limitation of the WebKit content blocking API
                                          😞

                                          It looks as though you can load third party content via a first party script....

                                          The only reliable way I could find to block all third party content on YouTube was to block all first and third party requests for the following domains:

                                          • *doubleclick.net
                                          • *ggpht.com
                                          • *googleapis.com
                                          • *gstatic.com
                                          • *ytimg.com

                                          in an update, ill remove the filter for adding domains to minim via the main app

                                          N Offline
                                          N Offline
                                          NickC
                                          wrote on last edited by
                                          #59

                                          @SweetP said in Won't block 3rd party properly:

                                          It looks as though you can load third party content via a first party script...

                                          That seems to be the case. I didn’t get to try any blocking with unless-top-url instead of the unless-domain. Might be a limitation of the domain selector itself when working with a URL filter. 😕

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags