Skip to content

adding social domains#6

Merged
WendelHime merged 18 commits intomainfrom
feat/adding-social-domains
Jan 29, 2026
Merged

adding social domains#6
WendelHime merged 18 commits intomainfrom
feat/adding-social-domains

Conversation

@WendelHime
Copy link
Collaborator

@WendelHime WendelHime commented Jan 26, 2026

Most of these domains were extracted from: github.com/v2fly/domain-list-community

--

This pull request adds support for the domain_regex rule 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:

  • Added support for parsing and handling the domain_regex rule type in the convertCSVToPlainRuleSet function in main.go, allowing regex-based domain rules to be included in rule sets.

New and expanded rule sets:

Google and Firebase platforms:

  • Added csv/cn-google.csv, csv/cn-google-play.csv, csv/cn-google-trust-services.csv, and csv/cn-firebase.csv with a comprehensive list of domains and regex rules for Google services and Firebase, including China-specific domains. [1] [2] [3] [4]

Facebook platforms:

  • Added csv/facebook.csv, csv/facebook-ads.csv, and csv/facebook-dev.csv with extensive domain and package name rules for Facebook, its ads, and developer-related services. [1] [2] [3]

Other major platforms:

  • Added new CSVs for Android (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

@garmr-ulfr
Copy link
Contributor

@WendelHime, I might have already asked this before, but why CSV? It would be easier to just use the sing-box JSON format?
"facebook.json

{
  "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.

@garmr-ulfr
Copy link
Contributor

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.

@WendelHime
Copy link
Collaborator Author

WendelHime commented Jan 27, 2026

I might have already asked this before, but why CSV?

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

@WendelHime
Copy link
Collaborator Author

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.

Created directories at 8b7d484

Copy link
Contributor

@garmr-ulfr garmr-ulfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one suggestion.

@WendelHime WendelHime merged commit b6e4f43 into main Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants