Skip to content

[Feature Request] Provide more information about blocked domain #558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
PeterDaveHello opened this issue Jun 8, 2022 · 9 comments
Open
Labels
🔨 enhancement New feature or request
Milestone

Comments

@PeterDaveHello
Copy link
Contributor

Will be helpful to tell the exact block list(s) that being the reason a certain domain being blocked, like Pi-Hole:

$ pihole -q aaa.bbb.ccc
 Match found in https://blocklist.example/hosts.txt:
   aaa.bbb.ccc

Right now we can only know the "group", but there could be many blocklists in a single group, if you want to find out which one is the one, that'll be pretty hard:

$ blocky query aaa.bbb.ccc
[2022-06-08 15:34:19]  INFO Query result for 'aaa.bbb.ccc' (A):
[2022-06-08 15:34:19]  INFO     reason:        BLOCKED CNAME (test)
[2022-06-08 15:34:19]  INFO     response type:              BLOCKED
[2022-06-08 15:34:19]  INFO     response:               A (0.0.0.0)
[2022-06-08 15:34:19]  INFO     return code:                NOERROR
@PeterDaveHello PeterDaveHello changed the title Provide more information about blocked domain [Feature Request] Provide more information about blocked domain Jun 8, 2022
@kwitsch
Copy link
Collaborator

kwitsch commented Jun 8, 2022

If I remember correctly the lists are aggregated per group. 🤔

So it would be quite troublesome gathering the information if the entry is duplicate in multiple lists in the same group.

I assume you'd like to get all lists with the entry?
This may really clutter the logs. 😅

Wouldn't splitting your lists in multiple groups and using all of them as your block groups be more readable?
One list per group would be a name for it's url. 🤔

@ThinkChaos
Copy link
Collaborator

Indeed, storing the list(s) a url is blocked by would increase RAM usage a fair bit.
What I do is have a group per list provider (examples: disconnect-me, blocklistproject) so it helps narrow down the problematic list.

Maybe adding a subcommand to blocky that downloads and parses the configured lists, and then prints the ones that block a specific domain would be a good approach.
That would avoid any extra resource usage until you need it, which shouldn't be too often.

@0xERR0R
Copy link
Owner

0xERR0R commented Jun 9, 2022

As mentioned by @kwitsch and @ThinkChaos , the workaround is to define one url per group. I think, we could change the internal cache representation to provide more detailed information. Maybe internal a cache struct per url or storing a additional byte with list order?

@0xERR0R 0xERR0R added the 🔨 enhancement New feature or request label Jun 20, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2022

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@PeterDaveHello
Copy link
Contributor Author

😅

@0xERR0R 0xERR0R added this to the future milestone Mar 8, 2023
@ThinkChaos
Copy link
Collaborator

I'm thinking we should probably move towards having a CLI command like blocky why <domains...> that loads the config and tells you why a domain is being blocked.
Having it separate from the server means we don't care about memory or runtime as much, so we can avoid merging groups and regexes allowing use to give precise info to the user.

@0xERR0R
Copy link
Owner

0xERR0R commented Nov 9, 2023

I'm thinking we should probably move towards having a CLI command like blocky why <domains...> that loads the config and tells you why a domain is being blocked. Having it separate from the server means we don't care about memory or runtime as much, so we can avoid merging groups and regexes allowing use to give precise info to the user.

CLI uses currently only the REST API and doesn't contain any logic. I think we can use existing cache and provide calculated result over the API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants