mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-28 01:04:18 +00:00
feat(rules)!: add isolated routing presets
Add Mainland China proxy routing with independent rule workspaces. Preserve existing routing choices through equivalent preset mappings. BREAKING CHANGE: existing custom rules and enablement settings are not migrated. Recreate them in the appropriate preset.
This commit is contained in:
@@ -32,6 +32,7 @@ final class ControllerProxyRuntimeAdapter: ProxyRuntimeAdapting {
|
||||
var proxyMode: ProxyMode { controller.proxyMode }
|
||||
|
||||
var ruleDefaultAction: RuleDefaultAction { controller.ruleDefaultAction }
|
||||
var rulePreset: RulePreset { controller.rulePreset }
|
||||
|
||||
var skippedInvalidServerCount: Int { controller.skippedServers.count }
|
||||
|
||||
@@ -92,6 +93,10 @@ final class ControllerProxyRuntimeAdapter: ProxyRuntimeAdapting {
|
||||
await controller.setProxyMode(mode)
|
||||
}
|
||||
|
||||
func setRulePreset(_ preset: RulePreset) async {
|
||||
await controller.setRulePreset(preset)
|
||||
}
|
||||
|
||||
func setRuleDefaultAction(_ action: RuleDefaultAction) async {
|
||||
await controller.setRuleDefaultAction(action)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user