summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLoyalsoldier <[email protected]>2022-08-29 22:34:33 +0800
committerLoyalsoldier <[email protected]>2022-08-29 23:41:01 +0800
commitcd65e109bac7533ff7328688b45e8cd05e6fcc86 (patch)
tree56ffb4dfbc329e38d7b649b4ec07b67ad2a50ae8 /README.md
parent703045963b6f293cc725d8a65de58661c55ee02c (diff)
Fix: add option overwriteList
Due to MaxMind mmdb file format constraint, the IPs and/or CIDRs of the latter written list will overwrite those of the former one when duplicated data is found. To make sure that the lists you added include all their own IPs and/or CIDRs, you must place the name of the most important list at last in option wantedList and option overwriteList of type maxmindMMDB in config file. The option overwriteList of type maxmindMMDB is used when the IPs and/or CIDRs of some lists in generated mmdb file overlap. For example, if you change the CIDRs of the list "cn", and generate the full version of Country.mmdb file which is with all countries(lists), the option overwriteList must include "cn", so that the "cn" list will be written at last, which ensures it includes all the CIDRs you specify. If the option wantedList of type maxmindMMDB is specified, no need for option overwriteList.
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/README.md b/README.md
index 795cde93..0b54cc06 100644
--- a/README.md
+++ b/README.md
@@ -167,6 +167,12 @@ These two concepts are notable: `input` and `output`. The `input` is the data so
- **clashRuleSet**:[ipcidr 类型的 Clash RuleSet](https://github.com/Dreamacro/clash/wiki/premium-core-features#ipcidr)
- **surgeRuleSet**:[Surge RuleSet](https://manual.nssurge.com/rule/ruleset.html)
+### 注意事项
+
+由于 MaxMind mmdb 文件格式的限制,当不同列表的 IP 或 CIDR 数据有交集或重复项时,后写入的列表的 IP 或 CIDR 数据会覆盖(overwrite)之前已写入的列表的数据。譬如,IP `1.1.1.1` 同属于列表 `AU` 和列表 `Cloudflare`。如果 `Cloudflare` 在 `AU` 之后写入,则 IP `1.1.1.1` 归属于列表 `Cloudflare`。
+
+为了确保某些指定的列表、被修改的列表一定囊括属于它的所有 IP 或 CIDR 数据,可在 `output` 输出格式为 `maxmindMMDB` 的配置中增加选项 `overwriteList`,该选项中指定的列表会在最后逐一写入,列表中最后一项优先级最高。若已设置选项 `wantedList`,则无需设置 `overwriteList`。`wantedList` 中指定的列表会在最后逐一写入,列表中最后一项优先级最高。
+
## CLI 功能展示
可通过 `go install -v github.com/Loyalsoldier/geoip@latest` 直接安装 CLI。