Skip to content

Commit 2a4dc11

Browse files
committed
refactor: simplify outbound rule assignment for HijackDNS action
1 parent 1f558a8 commit 2a4dc11

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

frontend/src/utils/generator.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,7 @@ const _adaptToStableBranch = (config: Recordable) => {
304304
} else if (rule.action === RuleAction.Reject) {
305305
rule.outbound = 'block'
306306
} else if (rule.action === RuleAction.HijackDNS) {
307-
if (rule.protocol === 'dns') {
308-
rule.outbound = 'dns-out'
309-
}
307+
rule.outbound = 'dns-out'
310308
}
311309
rule.action = undefined
312310
return rule

0 commit comments

Comments
 (0)