Add gateway auto-deploy and tag matching fallback
Some checks failed
Build Gateway Image / build (push) Successful in 3s
Build Gateway Image / deploy (push) Failing after 0s

This commit is contained in:
2026-05-08 16:34:29 +03:00
parent 327561b2e9
commit c971b40eae
4 changed files with 101 additions and 3 deletions

View File

@@ -11,7 +11,11 @@ function clone(value) {
function findOutbound(subscriptionConfig, selectedTag) {
const outbounds = Array.isArray(subscriptionConfig?.outbounds) ? subscriptionConfig.outbounds : [];
return outbounds.find((outbound) => outbound.tag === selectedTag && PROXY_TYPES.has(outbound.type));
const exact = outbounds.find((outbound) => outbound.tag === selectedTag && PROXY_TYPES.has(outbound.type));
if (exact) return exact;
const trimmedTag = String(selectedTag || '').trim();
return outbounds.find((outbound) => String(outbound.tag || '').trim() === trimmedTag && PROXY_TYPES.has(outbound.type));
}
function ruleSets() {