mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-24 03:47:15 +00:00
fix(xray): keep source- and domains-scoped routing rules when an inbound is deleted
removeInboundTagFromRules drops a routing rule whose inboundTag list becomes empty only if the rule has no other matcher, but routingMatcherKeys omitted xray-core's canonical source and domains keys. A rule scoped by source or domains (common in hand-authored or imported configs) therefore lost its whole body — including a security-relevant block — when its single listed inbound was deleted, instead of just having the tag trimmed. Recognize source and domains as live matchers.
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
var routingMatcherKeys = []string{
|
||||
"domain", "ip", "port", "sourcePort", "localPort", "network",
|
||||
"sourceIP", "localIP", "user", "vlessRoute", "protocol", "attrs", "process",
|
||||
"domain", "domains", "ip", "port", "sourcePort", "localPort", "network",
|
||||
"source", "sourceIP", "localIP", "user", "vlessRoute", "protocol", "attrs", "process",
|
||||
}
|
||||
|
||||
func readInboundTags(raw any) []string {
|
||||
|
||||
Reference in New Issue
Block a user