最新的 Surge Mac 4.0.5 测试版中,完全重构了策略组功能,带来了以下变化:
- url-test/fallback/load-balance 策略组不再可以单独配置测速用 URL,只可以使用全局的测速 URL 或者策略配置的测速 URL。该修改后策略的测速结果可直接用于所有策略组的决策中,不再需要为每个策略组都单独重测。
- 所有类型的策略组均支持混合嵌套,唯一要求是不可以产生回环引用。
- 当一个组策略作为 url-test/fallback/load-balance 组的子策略时:
- select/url-test/fallback/ssid 组的延迟即为选定策略的延迟。
- load-balance 组的延迟为所有可用策略的延迟平均值。
- 组策略的 timeout 参数会把延迟超过该参数的策略在进行该组的决策时标记为不可用,但是对策略组进行重测时,所耗费的最长时间由全局的 test-timeout 参数控制。(默认为 5s)
- 由于决策需要,对一个组进行测试时,会将该组可能用到的所有子策略均进行测试,包括子策略组的子策略。
In this release we completely refactored the policy group functionality, bringing the following changes:
- The url-test/fallback/load-balance policy group can no longer be configured with a specific testing URL, but with a global testing URL or a policy-configured testing URL. The test results of the policy can be used directly in all policy group decisions, eliminating the need to retest each policy group individually.
- All types of policy groups support mixed nesting, the only requirement is that no circular references can be used
- When a group policy is used as a sub-policy of the url-test/fallback/load-balance group.
- The latency of the select/url-test/fallback/ssid group is the latency of the selected policy.
- The latency of the load-balance group is the average of the latencies of all available policies.
- The timeout parameter of a policy group marks policies with latency exceeding this parameter as unavailable when making decisions for the group. But the maximum time taken to test the policy group is controlled by the global test-timeout parameter. (Default is 5s)
- When testing a group due to decision making, all sub-policies that may be used by the group are tested, including sub-policies of the sub-policy group.
在 Mac 版本稳定后,该功能将同步至 iOS 版本。