Compare commits

..

5 Commits

Author SHA1 Message Date
rootmelo92118
8cd2762ca2 Update thescoregroup (#3054) 2025-12-17 01:35:23 +08:00
Loyalsoldier
2a6d6fb120 Docs: fix lint and link (#3069) 2025-12-17 01:20:21 +08:00
Loyalsoldier
a4da81130d Chore: update dependencies (#3068) 2025-12-17 01:05:10 +08:00
Loyalsoldier
4d45b17cd8 Chore: refine code (#3067) 2025-12-17 00:45:09 +08:00
Loyalsoldier
d8bd29ce92 Fix: incorrect lowercase for regexp rules (#3066) 2025-12-17 00:17:43 +08:00
5 changed files with 62 additions and 43 deletions

View File

@@ -94,13 +94,13 @@ full:www.google.com
> The following types of rules are **NOT** fully compatible with the ones that defined by user in V2Ray config file. Do **Not** copy and paste directly. > The following types of rules are **NOT** fully compatible with the ones that defined by user in V2Ray config file. Do **Not** copy and paste directly.
* Comment begins with `#`. It may begin anywhere in the file. The content in the line after `#` is treated as comment and ignored in production. - Comment begins with `#`. It may begin anywhere in the file. The content in the line after `#` is treated as comment and ignored in production.
* Inclusion begins with `include:`, followed by the file name of an existing file in the same directory. - Inclusion begins with `include:`, followed by the file name of an existing file in the same directory.
* Subdomain begins with `domain:`, followed by a valid domain name. The prefix `domain:` may be omitted. - Subdomain begins with `domain:`, followed by a valid domain name. The prefix `domain:` may be omitted.
* Keyword begins with `keyword:`, followed by a string. - Keyword begins with `keyword:`, followed by a string.
* Regular expression begins with `regexp:`, followed by a valid regular expression (per Golang's standard). - Regular expression begins with `regexp:`, followed by a valid regular expression (per Golang's standard).
* Full domain begins with `full:`, followed by a complete and valid domain name. - Full domain begins with `full:`, followed by a complete and valid domain name.
* Domains (including `domain`, `keyword`, `regexp` and `full`) may have one or more attributes. Each attribute begins with `@` and followed by the name of the attribute. - Domains (including `domain`, `keyword`, `regexp` and `full`) may have one or more attributes. Each attribute begins with `@` and followed by the name of the attribute.
> **Note:** Adding new `regexp` and `keyword` rules is discouraged because it is easy to use them incorrectly, and proxy software cannot efficiently match these types of rules. > **Note:** Adding new `regexp` and `keyword` rules is discouraged because it is easy to use them incorrectly, and proxy software cannot efficiently match these types of rules.
@@ -113,10 +113,10 @@ To generate a section:
1. Remove all the comments in the file. 1. Remove all the comments in the file.
2. Replace `include:` lines with the actual content of the file. 2. Replace `include:` lines with the actual content of the file.
3. Omit all empty lines. 3. Omit all empty lines.
4. Generate each `domain:` line into a [sub-domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/config.proto#L21). 4. Generate each `domain:` line into a [sub-domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/routercommon/common.proto#L21).
5. Generate each `keyword:` line into a [plain domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/config.proto#L17). 5. Generate each `full:` line into a [full domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/routercommon/common.proto#L23).
6. Generate each `regexp:` line into a [regex domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/config.proto#L19). 6. Generate each `keyword:` line into a [plain domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/routercommon/common.proto#L17).
7. Generate each `full:` line into a [full domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/config.proto#L23). 7. Generate each `regexp:` line into a [regex domain routing rule](https://github.com/v2fly/v2ray-core/blob/master/app/router/routercommon/common.proto#L19).
## How to organize domains ## How to organize domains
@@ -130,8 +130,8 @@ Attribute is useful for sub-group of domains, especially for filtering purpose.
## Contribution guideline ## Contribution guideline
* Fork this repo, make modifications to your own repo, file a PR. - Fork this repo, make modifications to your own repo, file a PR.
* Please begin with small size PRs, say modification in a single file. - Please begin with small size PRs, say modification in a single file.
* A PR must be reviewed and approved by another member. - A PR must be reviewed and approved by another member.
* A script will verify your pull request to test whether your PR is correct or not every time you update the PR. Only the PR which passes the test will be merged. Please go to the Action label to get detailed information if you didn't pass it. We also provide the file which has been generated to make you test. - A script will verify your pull request to test whether your PR is correct or not every time you update the PR. Only the PR which passes the test will be merged. Please go to the Action label to get detailed information if you didn't pass it. We also provide the file which has been generated to make you test.
* After a few successful PRs, you may apply for manager access to this repository. - After a few successful PRs, you may apply for manager access to this repository.

View File

@@ -4,13 +4,18 @@
60plusmilfs.com 60plusmilfs.com
analqts.com analqts.com
ashleysageellison.com ashleysageellison.com
asiancoochies.com
autumn-jade.com autumn-jade.com
beascoremodel.com beascoremodel.com
bigboobalexya.com
bigboobbundle.com bigboobbundle.com
bigboobdaria.com
bigboobspov.com bigboobspov.com
bigboobvanessay.com
bigtitangelawhite.com bigtitangelawhite.com
bigtithitomi.com bigtithitomi.com
bigtithooker.com bigtithooker.com
bigtitkatiethornton.com
bigtitterrynova.com bigtitterrynova.com
bigtitvenera.com bigtitvenera.com
blackandstacked.com blackandstacked.com
@@ -23,11 +28,13 @@ bustydustystash.com
bustyinescudna.com bustyinescudna.com
bustykellykay.com bustykellykay.com
bustykerrymarie.com bustykerrymarie.com
bustylezzies.com
bustylornamorgan.com bustylornamorgan.com
bustymerilyn.com bustymerilyn.com
bustyoldsluts.com bustyoldsluts.com
bustysammieblack.com bustysammieblack.com
cherrybrady.com cherrybrady.com
chicksonblackdicks.com
chloesworld.com chloesworld.com
christymarks.com christymarks.com
cock4stepmom.com cock4stepmom.com
@@ -37,6 +44,7 @@ crystalgunnsworld.com
daylenerio.com daylenerio.com
desiraesworld.com desiraesworld.com
dianepoppos.com dianepoppos.com
ebonythots.com
eboobstore.com eboobstore.com
evanottyvideos.com evanottyvideos.com
feedherfuckher.com feedherfuckher.com
@@ -45,14 +53,19 @@ getscorecash.com
grannygetsafacial.com grannygetsafacial.com
grannylovesbbc.com grannylovesbbc.com
grannylovesyoungcock.com grannylovesyoungcock.com
hairycoochies.com
homealonemilfs.com homealonemilfs.com
hornyasianmilfs.com
ibonedyourmom.com ibonedyourmom.com
ifuckedtheboss.com ifuckedtheboss.com
jessicaturner.co.uk
jessicaturner.com jessicaturner.com
joanabliss.com joanabliss.com
juliamiles.com juliamiles.com
karinahart.com karinahart.com
karlajames.com karlajames.com
latinacoochies.com
latinmommas.com
leannecrowvideos.com leannecrowvideos.com
legsex.com legsex.com
linseysworld.com linseysworld.com
@@ -73,6 +86,7 @@ pickinguppussy.com
pornloser.com pornloser.com
pornmegaload.com pornmegaload.com
reneerossvideos.com reneerossvideos.com
roxired.com
sarennasworld.com sarennasworld.com
scoreclassics.com scoreclassics.com
scoregroup.com scoregroup.com

8
go.mod
View File

@@ -1,14 +1,14 @@
module github.com/v2fly/domain-list-community module github.com/v2fly/domain-list-community
go 1.24 go 1.24.0
require ( require (
github.com/v2fly/v2ray-core/v5 v5.38.0 github.com/v2fly/v2ray-core/v5 v5.42.0
google.golang.org/protobuf v1.36.8 google.golang.org/protobuf v1.36.11
) )
require ( require (
github.com/adrg/xdg v0.5.3 // indirect github.com/adrg/xdg v0.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect github.com/golang/protobuf v1.5.4 // indirect
golang.org/x/sys v0.34.0 // indirect golang.org/x/sys v0.38.0 // indirect
) )

16
go.sum
View File

@@ -8,13 +8,13 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/v2fly/v2ray-core/v5 v5.38.0 h1:DjpBP9dyzpFfCNGg+C6FnEkFDT3pfe29I0leYtNbKNY= github.com/v2fly/v2ray-core/v5 v5.42.0 h1:lyJrN3BDmu7lnVeMIlonAct8TSSHpIrNYP6/uYAbIBk=
github.com/v2fly/v2ray-core/v5 v5.38.0/go.mod h1:PHM3drDx9mbme6xE8fRZT979wNPHWCbCIPreAIqxqUw= github.com/v2fly/v2ray-core/v5 v5.42.0/go.mod h1:TyECxvulzqeaiFK14qNwhcoYOGnVmBkAj3Bs2MkVrNU=
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

35
main.go
View File

@@ -2,7 +2,6 @@ package main
import ( import (
"bufio" "bufio"
"errors"
"flag" "flag"
"fmt" "fmt"
"os" "os"
@@ -107,7 +106,7 @@ func (l *ParsedList) toProto() (*router.GeoSite, error) {
}) })
default: default:
return nil, errors.New("unknown domain type: " + entry.Type) return nil, fmt.Errorf("unknown domain type: %s", entry.Type)
} }
} }
return site, nil return site, nil
@@ -117,7 +116,7 @@ func exportPlainTextList(list []string, refName string, pl *ParsedList) {
for _, listName := range list { for _, listName := range list {
if strings.EqualFold(refName, listName) { if strings.EqualFold(refName, listName) {
if err := pl.toPlainText(strings.ToLower(refName)); err != nil { if err := pl.toPlainText(strings.ToLower(refName)); err != nil {
fmt.Println("Failed: ", err) fmt.Println("Failed:", err)
continue continue
} }
fmt.Printf("'%s' has been generated successfully.\n", listName) fmt.Printf("'%s' has been generated successfully.\n", listName)
@@ -143,17 +142,23 @@ func parseDomain(domain string, entry *Entry) error {
if len(kv) == 2 { if len(kv) == 2 {
entry.Type = strings.ToLower(kv[0]) entry.Type = strings.ToLower(kv[0])
entry.Value = strings.ToLower(kv[1])
if strings.EqualFold(entry.Type, RuleTypeRegexp) {
entry.Value = kv[1]
} else {
entry.Value = strings.ToLower(kv[1])
}
return nil return nil
} }
return errors.New("Invalid format: " + domain) return fmt.Errorf("invalid format: %s", domain)
} }
func parseAttribute(attr string) (*router.Domain_Attribute, error) { func parseAttribute(attr string) (*router.Domain_Attribute, error) {
var attribute router.Domain_Attribute var attribute router.Domain_Attribute
if len(attr) == 0 || attr[0] != '@' { if len(attr) == 0 || attr[0] != '@' {
return &attribute, errors.New("invalid attribute: " + attr) return &attribute, fmt.Errorf("invalid attribute: %s", attr)
} }
// Trim attribute prefix `@` character // Trim attribute prefix `@` character
@@ -166,7 +171,7 @@ func parseAttribute(attr string) (*router.Domain_Attribute, error) {
attribute.Key = strings.ToLower(parts[0]) attribute.Key = strings.ToLower(parts[0])
intv, err := strconv.Atoi(parts[1]) intv, err := strconv.Atoi(parts[1])
if err != nil { if err != nil {
return &attribute, errors.New("invalid attribute: " + attr + ": " + err.Error()) return &attribute, fmt.Errorf("invalid attribute: %s: %v", attr, err)
} }
attribute.TypedValue = &router.Domain_Attribute_IntValue{IntValue: int64(intv)} attribute.TypedValue = &router.Domain_Attribute_IntValue{IntValue: int64(intv)}
} }
@@ -179,7 +184,7 @@ func parseEntry(line string) (Entry, error) {
var entry Entry var entry Entry
if len(parts) == 0 { if len(parts) == 0 {
return entry, errors.New("empty entry") return entry, fmt.Errorf("empty entry")
} }
if err := parseDomain(parts[0], &entry); err != nil { if err := parseDomain(parts[0], &entry); err != nil {
@@ -285,7 +290,7 @@ func ParseList(list *List, ref map[string]*List) (*ParsedList, error) {
refList := ref[refName] refList := ref[refName]
if refList == nil { if refList == nil {
return nil, errors.New(entry.Value + " not found.") return nil, fmt.Errorf("list not found: %s", entry.Value)
} }
attrEntrys := createIncludeAttrEntrys(refList, attr) attrEntrys := createIncludeAttrEntrys(refList, attr)
if len(attrEntrys) != 0 { if len(attrEntrys) != 0 {
@@ -300,7 +305,7 @@ func ParseList(list *List, ref map[string]*List) (*ParsedList, error) {
pl.Inclusion[InclusionName] = true pl.Inclusion[InclusionName] = true
refList := ref[refName] refList := ref[refName]
if refList == nil { if refList == nil {
return nil, errors.New(entry.Value + " not found.") return nil, fmt.Errorf("list not found: %s", entry.Value)
} }
newEntryList = append(newEntryList, refList.Entry...) newEntryList = append(newEntryList, refList.Entry...)
} }
@@ -341,14 +346,14 @@ func main() {
return nil return nil
}) })
if err != nil { if err != nil {
fmt.Println("Failed: ", err) fmt.Println("Failed:", err)
os.Exit(1) os.Exit(1)
} }
// Create output directory if not exist // Create output directory if not exist
if _, err := os.Stat(*outputDir); os.IsNotExist(err) { if _, err := os.Stat(*outputDir); os.IsNotExist(err) {
if mkErr := os.MkdirAll(*outputDir, 0755); mkErr != nil { if mkErr := os.MkdirAll(*outputDir, 0755); mkErr != nil {
fmt.Println("Failed: ", mkErr) fmt.Println("Failed:", mkErr)
os.Exit(1) os.Exit(1)
} }
} }
@@ -358,12 +363,12 @@ func main() {
for refName, list := range ref { for refName, list := range ref {
pl, err := ParseList(list, ref) pl, err := ParseList(list, ref)
if err != nil { if err != nil {
fmt.Println("Failed: ", err) fmt.Println("Failed:", err)
os.Exit(1) os.Exit(1)
} }
site, err := pl.toProto() site, err := pl.toProto()
if err != nil { if err != nil {
fmt.Println("Failed: ", err) fmt.Println("Failed:", err)
os.Exit(1) os.Exit(1)
} }
protoList.Entry = append(protoList.Entry, site) protoList.Entry = append(protoList.Entry, site)
@@ -401,7 +406,7 @@ func main() {
os.Exit(1) os.Exit(1)
} }
if err := os.WriteFile(filepath.Join(*outputDir, *outputName), protoBytes, 0644); err != nil { if err := os.WriteFile(filepath.Join(*outputDir, *outputName), protoBytes, 0644); err != nil {
fmt.Println("Failed: ", err) fmt.Println("Failed:", err)
os.Exit(1) os.Exit(1)
} else { } else {
fmt.Println(*outputName, "has been generated successfully.") fmt.Println(*outputName, "has been generated successfully.")