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:
MHSanaei
2026-06-13 11:48:02 +02:00
parent 2d6dea4bf6
commit 1c0fdb4527
6 changed files with 79 additions and 23 deletions
@@ -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: