fix(sub): expand CIDR hosts in the hosts-first subscription order

The hosts-first order (#6895) rendered each host through its own endpoint
builder, which skipped the CIDR expansion from #6784, so a range host went out
as the bare network address. One helper, hostEndpointMaps, now builds a host's
entries for both orders.
This commit is contained in:
MHSanaei
2026-10-24 07:38:32 +02:00
parent 052b11d2bc
commit e66d18fe05
3 changed files with 49 additions and 24 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ func (v subscriptionHostVariant) endpoint(s *SubService, inbound *model.Inbound)
if v.host == nil {
return nil
}
return []map[string]any{hostToExternalProxyMap(v.host, s.resolveInboundAddress(inbound), inbound.Port)}
return hostEndpointMaps(v.host, s.resolveInboundAddress(inbound), inbound.Port)
}
func (v subscriptionHostVariant) inbound(s *SubService, inbound *model.Inbound) *model.Inbound {