fix(singbox): fix p2p isolation rule matching for transport network and port directions

This commit is contained in:
Dushnilin
2026-09-17 18:17:44 +03:00
parent b556f2539b
commit e2c90ed6ea
8 changed files with 707 additions and 659 deletions
@@ -2175,13 +2175,16 @@ function createSettingsContent(section, capabilities) {
const entries = value.split(",");
for (const entry of entries) {
if (!/^(tcp|udp)(:[0-9]{1,5}(-[0-9]{1,5})?)?$/.test(entry.trim())) {
const trimmed = entry.trim();
if (!/^((tcp|udp):)?[0-9]{1,5}(-[0-9]{1,5})?$|^(tcp|udp)$/.test(trimmed)) {
return _(
'Each entry must be "proto", "proto:port" or "proto:port-port" (tcp/udp), e.g. tcp:6881,udp:6881-6889',
);
}
const portSpec = entry.split(":")[1];
const portSpec = trimmed.includes(":")
? trimmed.split(":")[1]
: (/^[0-9]/.test(trimmed) ? trimmed : null);
if (!portSpec) {
continue;
}
+2 -2
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: TACHYON\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-17 18:04+0300\n"
"PO-Revision-Date: 2026-09-17 18:04+0300\n"
"POT-Creation-Date: 2026-09-17 18:17+0300\n"
"PO-Revision-Date: 2026-09-17 18:17+0300\n"
"Last-Translator: Dushnilin\n"
"Language-Team: none\n"
"Language: ru\n"
File diff suppressed because it is too large Load Diff