Conversation
|
@WendelHime, I might have already asked this before, but why CSV? It would be easier to just use the sing-box JSON format? {
"domain": [ ... ],
"domain_suffix": [ ...],
...
}And include the link to the sing-box documentation (https://sing-box.sagernet.org/configuration/route/rule/#structure)? This would simplify the code as we wouldn't need to convert it and it would pass all the checking/validation off to sing-box. |
|
With the addition of so many rulesets, we should probably sort them by rule type (smart-routing, ad-block, etc.) using subdirectories, at least the CSVs. It will make it much easier to maintain. |
This repository is the result of this ticket, the goal is to make it easier for anyone to contribute, but I agree that JSON format would also work |
…n/rulesets into feat/adding-social-domains
Created directories at 8b7d484 |
garmr-ulfr
left a comment
There was a problem hiding this comment.
LGTM! Just one suggestion.
Most of these domains were extracted from: github.com/v2fly/domain-list-community
--
This pull request adds support for the
domain_regexrule type in the CSV-to-rule-set conversion logic and introduces several new CSV files containing domain and package name rules for various platforms and services. The main focus is on expanding the rule set coverage for popular platforms such as Facebook, Google, Discord, and others, including both general and region-specific domains.Core logic improvement:
domain_regexrule type in theconvertCSVToPlainRuleSetfunction inmain.go, allowing regex-based domain rules to be included in rule sets.New and expanded rule sets:
Google and Firebase platforms:
csv/cn-google.csv,csv/cn-google-play.csv,csv/cn-google-trust-services.csv, andcsv/cn-firebase.csvwith a comprehensive list of domains and regex rules for Google services and Firebase, including China-specific domains. [1] [2] [3] [4]Facebook platforms:
csv/facebook.csv,csv/facebook-ads.csv, andcsv/facebook-dev.csvwith extensive domain and package name rules for Facebook, its ads, and developer-related services. [1] [2] [3]Other major platforms:
csv/android.csv), Discord (csv/discord.csv), Blogspot (csv/blogspot.csv), LinkedIn China (csv/cn-linkedin.csv), Dart (csv/dart.csv), Fastlane (csv/fastlane.csv), Flutter (csv/flutter.csv), Golang (csv/golang.csv), and Firebase (csv/firebase.csv), each listing relevant domains for their respective platforms. [1] [2] [3] [4] [5] [6] [7] [8] [9]This PR is part of getlantern/engineering#2912