pexcn / daily

Poetry and far afield. 🌊
GNU General Public License v3.0
583 stars 104 forks source link

Suggestions on shadowrocket blacklist #55

Open wyf88 opened 3 years ago

wyf88 commented 3 years ago

First of all, thanks a lot for the project, which helps a LOT!! I just two minor suggestions on the rule of generating the shadowrocket blacklist, just for your consideration.

  1. Include rules of Apple/Google domains that are resolved to China IPs as DIRECT. Otherwise, domains like dl.google.com and icloud.cdn-apple.com will be proxied.
  2. Include IP ranges of Google. All should have been blocked, and given how many (sub)domains Google owns, it can be a good supplement of the domain-based rules. Here is a source that I can find.
pexcn commented 3 years ago

Thank you for your suggestions.

The first point may be completed in the next few months (also, pull request welcome 😁), I have been too busy lately, and I have almost no time to maintain the current project.

There are two problems with the second point:

  1. Need a stable data source, preferably from GitHub.
  2. Which domains or IPs have not been processed? Are there any logs?
pexcn commented 3 years ago

I think if accessing google is not through IP address, it should be processed by these lines: https://github.com/pexcn/daily/blob/3f2eecf472f0d48f1f571e34bd1438bf9a86c91c/template/shadowrocket/gfwlist.template#L13 https://github.com/pexcn/daily/blob/3f2eecf472f0d48f1f571e34bd1438bf9a86c91c/template/shadowrocket/gfwlist.template#L16

If you want to add more IP addresses to the blacklist, it should cause performance issue. I asked the author of shadowrocket more than a year ago that its rule matching algorithm uses a trie tree, so I try to keep the shadowrocket rule list around 5000 lines.

In this case, it is generally recommended to use whitelist rules.

wyf88 commented 3 years ago

Thanks. Regarding the second point, at this moment I am not aware of any missed Google domains in gfwlist. However, new domains for new Google services can often be added, but the gfwlist may not be updated in time. On the other hand, the chunks of common Google IPs are almost unchanged (so it may not be a concern for a less frequent update) and short (the impact on performance should be very minor).

Edit: it seems there is an official list here.

pexcn commented 3 years ago

but the gfwlist may not be updated in time

I think this should be the upstream project needs to handle 😂.

Edit: it seems there is an official list here.

Good point, It may be added after a long time, I am too busy.

lists: