mirror of
https://github.com/v2fly/domain-list-community.git
synced 2025-12-21 01:50:05 +07:00
Compare commits
5 Commits
2025122010
...
2025122015
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9807b5b0a9 | ||
|
|
920ea4a055 | ||
|
|
9f6800b6b2 | ||
|
|
d014f46c20 | ||
|
|
6f3acc3ba9 |
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -5,6 +5,11 @@ on:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "**/README.md"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
|
||||
@@ -24,6 +24,7 @@ include:comodo
|
||||
include:corel
|
||||
include:dell
|
||||
include:digitalocean
|
||||
include:dmit
|
||||
include:drweb
|
||||
include:duolingo
|
||||
include:faronics
|
||||
|
||||
@@ -18,7 +18,6 @@ ru.net
|
||||
|
||||
include:category-gov-ru
|
||||
|
||||
include:habr
|
||||
include:mailru-group
|
||||
include:okko
|
||||
include:ozon
|
||||
|
||||
@@ -11,7 +11,11 @@ ancientbooks.cn # 籍合网
|
||||
|
||||
apabi.com
|
||||
bjinfobank.com # 高校数据财经库
|
||||
blyun.com # 百链
|
||||
|
||||
# 北京百链网源信息技术有限公司
|
||||
blyun.com # 百链云图书馆
|
||||
medalink.cn # 百链学术搜索
|
||||
|
||||
chinabooktrading.com # 中国历代典籍总目
|
||||
cidp.com.cn # CIDP制造业数字资源平台
|
||||
cnbksy.com # 全国报刊索引
|
||||
|
||||
17
main.go
17
main.go
@@ -8,7 +8,6 @@ import (
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
router "github.com/v2fly/v2ray-core/v5/app/router/routercommon"
|
||||
@@ -161,20 +160,8 @@ func parseAttribute(attr string) (*router.Domain_Attribute, error) {
|
||||
return &attribute, fmt.Errorf("invalid attribute: %s", attr)
|
||||
}
|
||||
|
||||
// Trim attribute prefix `@` character
|
||||
attr = attr[1:]
|
||||
parts := strings.Split(attr, "=")
|
||||
if len(parts) == 1 {
|
||||
attribute.Key = strings.ToLower(parts[0])
|
||||
attribute.TypedValue = &router.Domain_Attribute_BoolValue{BoolValue: true}
|
||||
} else {
|
||||
attribute.Key = strings.ToLower(parts[0])
|
||||
intv, err := strconv.Atoi(parts[1])
|
||||
if err != nil {
|
||||
return &attribute, fmt.Errorf("invalid attribute: %s: %v", attr, err)
|
||||
}
|
||||
attribute.TypedValue = &router.Domain_Attribute_IntValue{IntValue: int64(intv)}
|
||||
}
|
||||
attribute.Key = strings.ToLower(attr[1:]) // Trim attribute prefix `@` character
|
||||
attribute.TypedValue = &router.Domain_Attribute_BoolValue{BoolValue: true}
|
||||
return &attribute, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user