Skip to content

Groups ​

Ours: the modules/routing/group module (options.rs, lib.rs, probe.rs, spread.rs, interrupt.rs), parsing members — crates/native-config/src/entity.rs (group_members, group). The reference: protocol/group/selector.go, urltest.go of sing-box v1.14.4; Xray's balancers and observatory.

Correspondence ​

ReferenceOurs
selector (outbounds, default, interrupt_exist_connections)rank: manual (default), interrupt_exist_connections
urltest (url, interval, tolerance, idle_timeout)rank: delay with probe
Clash fallbackrank: order (+ recovery)
Clash load-balance, Xray random/roundRobinorder + pick: all + spread
Xray leastPingdelay
Xray leastLoad (expected, baselines, costs, tolerance)stable (pick, samples, max_failures) — partial

Divergences ​

WhatStatusWhereVerdict
A manual choice in a group with probes (Clash url-test with pinning)no: the group chooses by … itselfmodules/routing/group/src/lib.rs (select)rarely needed
Choosing separately for TCP and UDPpresent: as in the reference (selectedOutboundTCP/UDP): probes over TCP, the UDP choice skips members without UDPmodules/routing/group/src/probe.rs—
The probedifferent: HTTP(S) HEAD to a URL with a 15 s timeout, no more than 10 at once per group; no Clash unified delaymodules/routing/group/src/probe.rsrarely needed
Xray's balancer fallbackTagnomodules/config/subscriptions/src/xray.rs (balancer_rank)missing: the counterpart is an order group on top
Clash exclude-filter, filter, use (providers) in groupsno on importmodules/config/subscriptions/src/clash.rsrarely needed: we have filters at the subscription level
Saving the choicedifferent: the manual choice is kept in cache_file by the group's name; the Clash API's store_selected is always on if the cache is enabledmodules/routing/group/src/lib.rs (attach_services)—
An empty groupdifferent: allowed only for groups from subscriptions (allow_empty is set by the loader)crates/native-config/src/entity.rs (group)— (design)

Beyond the reference ​

pick greater than 1 and spread (hash, sticky, round-robin, random), stable with max_failures, recovery, patterns in members, groups as members of groups with cycle checks, inheriting the manual choice across a reload (inherit_selection).

Importing Xray balancers and Clash groups: subscriptions. Build errors of a group: configuration format.

GPL-3.0-or-later