From baf5de2b3a1b28e122437a23a70b8ca0fceef145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Wed, 11 Sep 2024 22:57:23 +0800 Subject: [PATCH] log: Add address mask https://github.com/XTLS/Xray-core/pull/3783 --- docs/config/log.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/config/log.md b/docs/config/log.md index 7164df8a2..d9ce190cc 100644 --- a/docs/config/log.md +++ b/docs/config/log.md @@ -14,7 +14,8 @@ LogObject 对应配置文件的 `log` 项。 "access": "文件地址", "error": "文件地址", "loglevel": "warning", - "dnsLog": false + "dnsLog": false, + "maskAddress": "" } } ``` @@ -45,3 +46,12 @@ error 日志的级别, 指示 error 日志需要记录的信息. > `dnsLog`: bool 是否启用 DNS 查询日志,例如:`DOH//doh.server got answer: domain.com -> [ip1, ip2] 2.333ms` + +> `maskAddress`: string + +IP地址遮罩,启用后将自动替换log中出现的IP地址,用于在分享日志时保护隐私,默认为空即不启用。 + +目前可选等级 `quarter` `half` `full` 遮罩形式对应如下 + +- ipv4 `1.2.*.*` `1.*.*.*` `[Masked IPv4]` +- ipv6 `1234:5678::/32` `1234::/16` `[Masked IPv6]`