Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for arrays in SetBlockList #102

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Add support for arrays in SetBlockList #102

merged 2 commits into from
Aug 14, 2024

Conversation

IAALAI
Copy link
Contributor

@IAALAI IAALAI commented Aug 4, 2024

使得 SetBlockFromFile SetBlockFromURL SetIPBlockFromFile SetIPBlockFromURL 支持数组

@IAALAI
Copy link
Contributor Author

IAALAI commented Aug 4, 2024

此次修改的时候,只保留了 blockListCompiled 和 ipBlockListCompiled ,然后把config.json,文件或者链接中的内容全部解析到一个位置

@Simple-Tracker Simple-Tracker added the enhancement New feature or request label Aug 5, 2024
Copy link
Owner

@Simple-Tracker Simple-Tracker left a comment

Choose a reason for hiding this comment

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

GitHub 的在线 diff 有些混乱, 不过看起来大体上应该是没什么问题.

config.json Outdated Show resolved Hide resolved
config.json Show resolved Hide resolved
config.go Show resolved Hide resolved
config.go Show resolved Hide resolved
config.go Show resolved Hide resolved
@IAALAI
Copy link
Contributor Author

IAALAI commented Aug 12, 2024

直接 content = StrTrim(ProcessRemark(content)) 吗?

@IAALAI
Copy link
Contributor Author

IAALAI commented Aug 13, 2024

已经修复

用的时候还遇到一件事,URL多了之后卡了一会,发现URL超时了。现在给URL加了个并发化

@IAALAI
Copy link
Contributor Author

IAALAI commented Aug 14, 2024

请求审查

@Simple-Tracker Simple-Tracker merged commit 726db1a into Simple-Tracker:dev Aug 14, 2024
33 checks passed
@Simple-Tracker
Copy link
Owner

谢谢, 已经合并.

尽管大致上没有问题了, 但有一点想法: 为 URL 引入并发的复杂性是否值得. 考虑到 URL Interval 一般都大于 300 秒, 一段时间的超时应当是可以容忍的, 特别是在首次获取完成有本地列表后, 只需要为这一动作加入异步和防止重复获取的简单锁即可. 但这不对合并构成影响.

@Simple-Tracker Simple-Tracker changed the title Add support for arrays in SetBlockListFrom Add support for arrays in SetBlockList Aug 14, 2024
@IAALAI
Copy link
Contributor Author

IAALAI commented Aug 15, 2024

你不说,我都忘了给map换成线程安全的那一种了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants