mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
Routing config: Replace processName with process (full-name/abs-path/abs-folder) (#5496)
About `self/` & `xray/`: https://github.com/XTLS/Xray-core/pull/5496#issuecomment-3714620380 Replaces https://github.com/XTLS/Xray-core/pull/5489
This commit is contained in:
@@ -126,12 +126,8 @@ func (rr *RoutingRule) BuildCondition() (Condition, error) {
|
||||
conds.Add(matcher)
|
||||
}
|
||||
|
||||
if len(rr.ProcessName) > 0 {
|
||||
refinedNames := make([]string, 0, len(rr.ProcessName))
|
||||
for _, name := range rr.ProcessName {
|
||||
refinedNames = append(refinedNames, strings.TrimSuffix(name, ".exe"))
|
||||
}
|
||||
conds.Add(&ProcessNameMatcher{refinedNames})
|
||||
if len(rr.Process) > 0 {
|
||||
conds.Add(NewProcessNameMatcher(rr.Process))
|
||||
}
|
||||
|
||||
if conds.Len() == 0 {
|
||||
|
||||
Reference in New Issue
Block a user