Skip to content

Observatory

The observatory block measures latency for a set of outbounds by periodically issuing a probe HTTP request through each one. Results feed into the load-balancer's strategy: leastPing so it always uses the fastest reachable outbound.

Options

FieldTypeDefaultAllowed valuesDescription
subjectSelector[]string[]<outbound tag prefix>Outbound tags to probe. Each entry is a prefix; any outbound whose tag begins with one of the listed strings is probed.
probeURLstring(required)<URL>URL the observer fetches over each probed outbound. Latency is measured end-to-end on this request.
probeIntervalduration.Duration10m<duration>Wait between probes for the same outbound. Accepts Go-style duration strings like "30s", "5m".
enableConcurrencyboolfalsetrue | falseProbe all selected outbounds concurrently instead of sequentially.

Source: infra/conf/observatory.go:12-17 · pinned at v26.6.1 (94ffd50)

Example

json
{
  "outbounds": [
    { "tag": "proxy-jp", "protocol": "vless" },
    { "tag": "proxy-us", "protocol": "vless" }
  ],
  "observatory": {
    "subjectSelector": ["proxy-"],
    "probeURL": "http://www.google.com/generate_204",
    "probeInterval": "30s",
    "enableConcurrency": true
  },
  "routing": {
    "balancers": [
      { "tag": "balancer", "selector": ["proxy-"], "strategy": { "type": "leastPing" } }
    ]
  }
}

Notes

  • The selector is a prefix match"proxy-" covers "proxy-jp", "proxy-us", etc. Use empty string to probe all outbounds (rarely desired).
  • For a faster, concurrent probe with HTTP/2 round-trip awareness, see burstObservatory.

Source: infra/conf/observatory.go:12-17 · v26.6.1 (94ffd50)

Core Tutorial by Argsment