mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-09-22 22:38:05 +03:00
Observatory: Add httpMethod (#821)
and some corrections --------- Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com>
This commit is contained in:
@@ -51,20 +51,22 @@
|
||||
|
||||
```json
|
||||
{
|
||||
// 针对每个出站,在 10 分钟内探测 2 次,具体的探测时间点随机
|
||||
// 针对每个出站,在 10 分钟内探测 10 次,具体的探测时间点随机
|
||||
// 如果它们全部失败,那么将在 10 ~ 20 分钟内被标记为故障节点
|
||||
// 故障后只要有一次探测成功,将被标记为健康节点,最慢需要 10 分钟
|
||||
"destination": "https://connectivitycheck.gstatic.com/generate_204",
|
||||
"connectivity": "",
|
||||
"interval": "5m",
|
||||
"sampling": 2,
|
||||
"timeout": "30s"
|
||||
"interval": "1m",
|
||||
"sampling": 10,
|
||||
"timeout": "5s",
|
||||
"httpMethod": "HEAD"
|
||||
}
|
||||
```
|
||||
|
||||
> `destination`: string
|
||||
|
||||
用于探测出站代理连接状态的网址。这个网址应该返回 HTTP 204 成功状态码。
|
||||
默认值 `"https://connectivitycheck.gstatic.com/generate_204"`。
|
||||
|
||||
> `connectivity`: string
|
||||
|
||||
@@ -81,14 +83,22 @@
|
||||
针对每个出站代理,预期的**平均**每次探测间隔。
|
||||
|
||||
时间格式为数字 + 单位,比如 `"10s"`, `"2h45m"`,支持的时间单位有 `ns`, `us`, `ms`, `s`, `m`, `h`, 分别对应纳秒、微秒、毫秒、秒、分、时。
|
||||
默认值 `"1m"`。最小允许值为 `"10s"`。如果指定的值更小,将使用 `"10s"`。
|
||||
|
||||
> `sampling`: number
|
||||
|
||||
保留最近探测结果的数量。
|
||||
默认值 `10`。
|
||||
|
||||
> `timeout`: string
|
||||
|
||||
探测超时时间。格式和上面的 `interval` 相同。
|
||||
默认值 `"5s"`。
|
||||
|
||||
> `httpMethod`: string
|
||||
|
||||
用于探测的 HTTP 方法(例如 `"HEAD"`、`"GET"`)。
|
||||
默认值 `"HEAD"`。
|
||||
|
||||
::: tip
|
||||
突发连接观测的工作原理是每间隔 `interval` \* `sampling`(下称探测周期),立即针对每个匹配到的出站分别调度探测任务,但是在每个任务的周期内随机时间执行探测,这意味着相较于 `observatory`(后台连接观测),本探测器的特征更不明显。但如果 interval 设置的过小,或者 sampling 过大导致频繁探测,那么特征会更明显。
|
||||
|
||||
@@ -51,20 +51,22 @@ An array of strings, where each string is used for prefix matching against outbo
|
||||
|
||||
```json
|
||||
{
|
||||
// For each outbound, probe 2 times within 10 minutes; specific probe times are random.
|
||||
// For each outbound, probe 10 times within 10 minutes; specific probe times are random.
|
||||
// If they all fail, it will be marked as a faulty node within 10 ~ 20 minutes.
|
||||
// After failure, a single successful probe will mark it as a healthy node; at slowest, it takes 10 minutes.
|
||||
"destination": "https://connectivitycheck.gstatic.com/generate_204",
|
||||
"connectivity": "",
|
||||
"interval": "5m",
|
||||
"sampling": 2,
|
||||
"timeout": "30s"
|
||||
"interval": "1m",
|
||||
"sampling": 10,
|
||||
"timeout": "5s",
|
||||
"httpMethod": "HEAD"
|
||||
}
|
||||
```
|
||||
|
||||
> `destination`: string
|
||||
|
||||
The URL used to probe the connection status of the outbound proxy. This URL should return an HTTP 204 success status code.
|
||||
Default `"https://connectivitycheck.gstatic.com/generate_204"`.
|
||||
|
||||
> `connectivity`: string
|
||||
|
||||
@@ -81,14 +83,22 @@ Note: In transparent proxy mode, this request might be captured by the transpare
|
||||
The expected **average** probe interval for each outbound proxy.
|
||||
|
||||
The time format is number + unit, such as `"10s"`, `"2h45m"`. Supported time units are `ns`, `us`, `ms`, `s`, `m`, `h`, corresponding to nanoseconds, microseconds, milliseconds, seconds, minutes, and hours respectively.
|
||||
Default `"1m"`. Minimum allowed value is `"10s"`. If less is specified, `"10s"` will be used.
|
||||
|
||||
> `sampling`: number
|
||||
|
||||
The number of recent probe results to keep.
|
||||
Default `10`.
|
||||
|
||||
> `timeout`: string
|
||||
|
||||
Probe timeout. Format is the same as `interval` above.
|
||||
Default `"5s"`.
|
||||
|
||||
> `httpMethod`: string
|
||||
|
||||
The HTTP method used for probing (e.g. `"HEAD"`, `"GET"`).
|
||||
Default `"HEAD"`.
|
||||
|
||||
::: tip
|
||||
The working principle of Burst Observatory is to immediately schedule probe tasks for each matched outbound at every `interval` \* `sampling` (hereinafter referred to as the probe cycle). However, within each task's cycle, the probe is executed at a random time. This means compared to `observatory` (Background Connection Observatory), the fingerprint of this detector is less obvious. But if `interval` is set too small, or `sampling` is too large causing frequent probing, the fingerprint will be more obvious.
|
||||
|
||||
@@ -57,16 +57,18 @@ URL-адрес, используемый для проверки состоян
|
||||
{
|
||||
"destination": "https://connectivitycheck.gstatic.com/generate_204",
|
||||
"connectivity": "",
|
||||
"interval": "1h",
|
||||
"sampling": 3,
|
||||
"timeout": "30s"
|
||||
"interval": "1m",
|
||||
"sampling": 10,
|
||||
"timeout": "5s",
|
||||
"httpMethod": "HEAD"
|
||||
}
|
||||
```
|
||||
|
||||
> `destination`: string
|
||||
|
||||
URL-адрес, используемый для проверки состояния подключения исходящего прокси.
|
||||
URL-адрес, используемый для проверки состояния подключения исходящего прокси.
|
||||
Этот URL-адрес должен возвращать код состояния HTTP 204.
|
||||
По умолчанию `"https://connectivitycheck.gstatic.com/generate_204"`.
|
||||
|
||||
> `connectivity`: string
|
||||
|
||||
@@ -75,15 +77,23 @@ URL-адрес, используемый для проверки подключ
|
||||
|
||||
> `interval`: string
|
||||
|
||||
Проверить все соответствующие исходящие прокси в течение указанного времени, отправляя `sampling` + 1 запросов на каждый прокси.
|
||||
Формат времени: число + единица измерения, например `"10s"`, `"2h45m"`.
|
||||
Проверить все соответствующие исходящие прокси в течение указанного времени, отправляя `sampling` + 1 запросов на каждый прокси.
|
||||
Формат времени: число + единица измерения, например `"10s"`, `"2h45m"`.
|
||||
Поддерживаемые единицы измерения: `ns`, `us`, `ms`, `s`, `m`, `h` (наносекунды, микросекунды, миллисекунды, секунды, минуты, часы).
|
||||
По умолчанию `"1m"`. Минимальное допустимое значение — `"10s"`. Если указано меньше, будет использовано `"10s"`.
|
||||
|
||||
> `sampling`: number
|
||||
|
||||
Количество последних результатов проверок, которые нужно сохранить.
|
||||
По умолчанию `10`.
|
||||
|
||||
> `timeout`: string
|
||||
|
||||
Время ожидания ответа при проверке.
|
||||
Время ожидания ответа при проверке.
|
||||
Формат такой же, как и у `interval`.
|
||||
По умолчанию `"5s"`.
|
||||
|
||||
> `httpMethod`: string
|
||||
|
||||
HTTP-метод, используемый для выполнения проверки (например, `"HEAD"`, `"GET"`).
|
||||
По умолчанию `"HEAD"`.
|
||||
|
||||
Reference in New Issue
Block a user