mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-22 20:46:08 +00:00
fix(outbounds): test subscriptions in Test All, skip direct/dns
Test All only iterated the editable template outbounds, so subscription
outbounds (the read-only "from subscriptions" table) were never probed in
bulk. They are now queued too, keyed by tag in subscriptionTestStates so
their rows light up live; the template and subscription HTTP lanes run
serially to respect the backend's single-batch lock (TCP runs alongside).
Also stop testing freedom ("direct") and dns outbounds: they aren't
proxies, so an HTTP probe through them only measures the host's own
reachability, not a tunnel. They are now untestable in every mode -- the
per-row button is disabled and Test All skips them -- with a matching
backend guard so a direct API caller can't HTTP-test them either.
This commit is contained in:
@@ -160,6 +160,10 @@ func (s *OutboundService) testOutboundsParsed(items []map[string]any, testURL st
|
||||
r.Error = "Blocked/blackhole outbound cannot be tested"
|
||||
case protocol == "loopback":
|
||||
r.Error = "Loopback outbound cannot be tested"
|
||||
case protocol == "freedom" || protocol == "dns":
|
||||
// Direct/DNS outbounds aren't proxies — an HTTP probe through them
|
||||
// would only measure the host's own reachability, not a tunnel.
|
||||
r.Error = "Direct/DNS outbound cannot be tested"
|
||||
case seenTags[tag]:
|
||||
r.Error = fmt.Sprintf("Duplicate outbound tag in batch: %s", tag)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user