From 603389ff05d4390958e397b4905d98b17a12528c Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Sun, 22 Sep 2024 16:16:00 -0500 Subject: [PATCH] Improve a few type definitions, update english log docs --- docs/config/inbound.md | 2 +- docs/config/log.md | 2 +- docs/en/config/inbound.md | 2 +- docs/en/config/log.md | 12 +++++++++++- docs/en/config/transport.md | 2 +- docs/ru/config/inbound.md | 2 +- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/config/inbound.md b/docs/config/inbound.md index 18bcb8697..fe6865114 100644 --- a/docs/config/inbound.md +++ b/docs/config/inbound.md @@ -57,7 +57,7 @@ 当只有一个端口时,Xray 会在此端口监听入站连接。当指定了一个端口范围时,取决于 `allocate` 设置。 -> `protocol`: string +> `protocol`: "dokodemo-door" | "http" | "shadowsocks" | "socks" | "vless" | "vmess" | "trojan" | "wireguard" 连接协议名称,可选的协议列表见左侧 入站代理。 diff --git a/docs/config/log.md b/docs/config/log.md index d9ce190cc..74004e820 100644 --- a/docs/config/log.md +++ b/docs/config/log.md @@ -47,7 +47,7 @@ error 日志的级别, 指示 error 日志需要记录的信息. 是否启用 DNS 查询日志,例如:`DOH//doh.server got answer: domain.com -> [ip1, ip2] 2.333ms` -> `maskAddress`: string +> `maskAddress`: "quarter" | "half" | "full" IP地址遮罩,启用后将自动替换log中出现的IP地址,用于在分享日志时保护隐私,默认为空即不启用。 diff --git a/docs/en/config/inbound.md b/docs/en/config/inbound.md index c3ccc78a2..5f0014a1f 100644 --- a/docs/en/config/inbound.md +++ b/docs/en/config/inbound.md @@ -52,7 +52,7 @@ Port. The accepted formats are: When only one port is specified, Xray listens for inbound connections on that port. When a range of ports is specified, it depends on the `allocate` setting. -> `protocol`: string +> `protocol`: "dokodemo-door" | "http" | "shadowsocks" | "socks" | "vless" | "vmess" | "trojan" | "wireguard" The connection protocol name. The optional protocol types are listed in [inbound protocols](./inbounds/). diff --git a/docs/en/config/log.md b/docs/en/config/log.md index 021b35048..98097e9a9 100644 --- a/docs/en/config/log.md +++ b/docs/en/config/log.md @@ -14,7 +14,8 @@ LogObject corresponds to the `log` item in the configuration file. "access": "file_path", "error": "file_path", "loglevel": "warning", - "dnsLog": false + "dnsLog": false, + "maskAddress": "" } } ``` @@ -44,3 +45,12 @@ The log level for error logs, indicating the information that needs to be record > `dnsLog`: bool Whether to enable DNS query logs, for example: `DOH//doh.server got answer: domain.com -> [ip1, ip2] 2.333ms`. + +> `maskAddress`: "quarter" | "half" | "full" + +IP address masking, when enabled, will automatically replace the IP address appearing in the log. It is used to protect privacy when sharing logs. The default is empty and is not enabled. + +Currently available levels are `quarter`, `half`, `full`. The mask form corresponds to the following: + +- ipv4 `1.2.*.*` `1.*.*.*` `[Masked IPv4]` +- ipv6 `1234:5678::/32` `1234::/16` `[Masked IPv6]` diff --git a/docs/en/config/transport.md b/docs/en/config/transport.md index 3a62f3030..a64a1812f 100644 --- a/docs/en/config/transport.md +++ b/docs/en/config/transport.md @@ -51,7 +51,7 @@ Whether to enable transport layer encryption. Supported options below. - `"none"` enables no encryption (default). - `"tls"` enables encryption with [TLS](https://en.wikipedia.org/wiki/transport_Layer_Security). -- `"xtls"` enables encryption with REALITY. +- `"reality"` enables encryption with REALITY. > `tlsSettings`: [TLSObject](#tlsobject) diff --git a/docs/ru/config/inbound.md b/docs/ru/config/inbound.md index b120682ed..8a2187cdd 100644 --- a/docs/ru/config/inbound.md +++ b/docs/ru/config/inbound.md @@ -60,7 +60,7 @@ Если указан только один порт, Xray будет прослушивать входящие подключения на этом порту. Если указан диапазон портов, то фактическое поведение зависит от настройки `allocate`. -> `protocol`: string +> `protocol`: "dokodemo-door" | "http" | "shadowsocks" | "socks" | "vless" | "vmess" | "trojan" | "wireguard" Название протокола подключения. Список доступных протоколов см. в разделе "Входящие подключения" в левой части документации.