Code Monkey home page Code Monkey logo

Comments (20)

Nick-White avatar Nick-White commented on May 20, 2024

+1 This is the feature I'm waiting the most because there are many ads that go through all the filter subscriptions...

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

For now you can report these to us:
https://github.com/AdguardTeam/ExperimentalFilter/issues

Or you can read AG logs and find out what is not blocked:
https://github.com/AdguardTeam/ExperimentalFilter/wiki/Android

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

@Revertron here is a list of comments for the first filtering log implementation

Filtering log icon

Use this icon for the navigation menu item:
filtering_log_icons.zip

Please let me know what sizes do you need.

Action bar

We need an option to clear the filtering log
Put it in the action bar.
Use the same icon we have in the user filter/whitelist.

"Enabled" should the same size/weigth as action bar title has.

Empty filtering log

Use the same icons and layout as in the case of user filter/whitelist.
Text: Filtering log is empty

Log item

Time and URL color should be of our regular gray color.

from adguardforandroid.

Revertron avatar Revertron commented on May 20, 2024

For small icons (as 24dp in UI) we use these sizes: 96, 72, 48, 24, 36 pixels.

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

@Revertron got it, what color do we need for the navigation menu?

from adguardforandroid.

Revertron avatar Revertron commented on May 20, 2024

Other icons have $757575 color.

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

Color indication

Change the line background color to indicate request status.

Regular requests: no indication.
Blocked requests: #fff4f2 (pressed state: #ffb6a9)
Whitelisted requests: #defae5 (pressed state: #98ffb2)

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

Log item details fields should depend on the event type. However, there are some common requirements.

Common requirements

  1. Tap on a field should automatically copy it's value to the clipboard. We should also show a toast about it.
  2. The Status field possible values: Processed, Blocked, Threat, Whitelisted, Redirect. The latter makes sense for Web request type only.
  3. Event type field possible values are Web request, DNS request, HTTPS tunnel
  4. Application field name depends on the app type and can be App, Browser, System app
  5. Filtering rule field is visible in two cases only: if the status is either Blocked or Whitelisted.
  6. Possible buttons in the item details footer: BLOCK, UNBLOCK (raised buttons), OPEN (flat button). OPEN button opens request URL in the default browser. OPEN is available for regular web requests with GET method only.
  7. Remote Address field format is 127.0.0.1:443 for IPv4 and [2001:4860:4860::8888]:443 for IPv6. Use IpAddressUtils.toString() method to get the proper format for it. Do not show this field if value is empty.

Regular web request fields

  • Event type
  • Application
  • Domain
  • Remote Address
  • Status (You should use Redirect status whenever redirectUrl field is not empty.)
  • Filtering rule
  • Request URL
  • Source URL (do not show if empty or null)
  • Redirect URL (show it if status is Redirect)
  • Content type (no need to translate, just use the enum value)
  • Start time (format: 18:45.123) (we don't really need date here)
  • Elapsed time (format: 123 ms)
  • Size (format: ↓123KB ↑5KB)

Please note, that Event type in the case of regular web request also contains HTTP method value.
It should look like:

Value: Web request (GET)
Field name: Event type

DNS request fields

  • Event type
  • Domain
  • Status
  • Filtering rule
  • Start time
  • Elapsed time
  • Size

Tunnel request fields

  • Event type
  • Application
  • Domain
  • Remote Address
  • Status
  • Filtering rule
  • Start time
  • Elapsed time
  • Size

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

Filtering log menu item icon:
filtering_log_icons.zip

Fields icons:
filtering_log_fields_icons.zip

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

@Revertron just caught a crash:

22:52:00.037 [main] ERROR c.a.a.c.CustomExceptionHandler - Thread: Thread[main,5,main]; Uncaught exception:

java.lang.UnsupportedOperationException: null
    at java.util.AbstractList.add(AbstractList.java:148) ~[na:0.0]
    at android.widget.ArrayAdapter.insert(ArrayAdapter.java:255) ~[na:0.0]
    at com.adguard.android.ui.FilteringLogActivity$3.run(FilteringLogActivity.java:119) ~[na:0.0]
    at android.os.Handler.handleCallback(Handler.java:751) ~[na:0.0]
    at android.os.Handler.dispatchMessage(Handler.java:95) ~[na:0.0]
    at android.os.Looper.loop(Looper.java:154) ~[na:0.0]
    at android.app.ActivityThread.main(ActivityThread.java:6119) ~[na:0.0]
    at java.lang.reflect.Method.invoke(Native Method) ~[na:0.0]
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) ~[na:0.0]
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) ~[na:0.0]

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

Rules constructor issues:

  1. Does not work properly for DNS requests
  2. Patterns should start with ||
  3. Add one more option: [x] Apply to the APPNAME requests only. In case if this box is checked, add $app modifier to the rule text.

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

I see that startappexchange.com SDK sometimes sends a GET request with URL length more than 20000. Actually, every time I start ru.sports app, I see this request. We'd better handle long URLs specifically.

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

Add $important modifier support to the rules constructor dialog.

  1. Add a checkbox: Give a higher priority to the rule
  2. By default, this checkbox should be disabled.
  3. However, if you try to unblock a URL blocked with an $important rule, or block a whitelisted URL, make it checked.

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

Handle third-party flag in a smart way

  1. If web request is third-party, "Apply to third party requests only" option should be checked.
  2. Otherwise, let it be unchecked.

from adguardforandroid.

Revertron avatar Revertron commented on May 20, 2024

Done.

from adguardforandroid.

Alex-302 avatar Alex-302 commented on May 20, 2024

Issues:

  1. Incorrect content type for Web-Socker connections
    wss://ws.hghit.com/ws
    Content type = Document
    Add @@||hdrezka.me^$content and go to hdrezka.me;
  2. After clearing, filtering log again contains the records;
  3. Request sorting is strange - requests from the page are located before request to the page [Moved to #1074]

image

  1. Elements, which was removed from HTML are not displayed(like in Adguard for Windows) [Moved to #1075]

from adguardforandroid.

ameshkov avatar ameshkov commented on May 20, 2024

Just fixed point 1.

Regarding point 3, this is by design (at least for now). We should fix it eventually, but we'd better move it to a separate issue.

from adguardforandroid.

Alex-302 avatar Alex-302 commented on May 20, 2024

Regarding point 3

done
#1074

from adguardforandroid.

Alex-302 avatar Alex-302 commented on May 20, 2024

Added
4. Elements, which was removed from HTML are not displayed(like in Adguard for Windows)

from adguardforandroid.

Revertron avatar Revertron commented on May 20, 2024

Fixed point 2.

from adguardforandroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.