Feature: Support fallback group

This commit is contained in:
yicheng 2018-10-02 12:25:53 +08:00
parent 2871a3368c
commit 72fffa5ea5
3 changed files with 11 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class ProxyMenuItemFactory {
var menu:NSMenuItem?
switch proxyGroup.value["type"].stringValue {
case "Selector": menu = self.generateSelectorMenuItem(json: dataDict, key: proxyGroup.key)
case "URLTest": menu = self.generateUrlTestMenuItem(proxyGroup: proxyGroup)
case "URLTest","Fallback": menu = self.generateUrlTestMenuItem(proxyGroup: proxyGroup)
default: continue
}
if (menu != nil) {menuItems.append(menu!)}

View File

@ -9,7 +9,14 @@ proxy = ss, 127.0.0.1, 80, RC4-MD5, password
[Proxy Group]
# Proxy = select, proxy
# url-test select which proxy will be used by benchmarking speed to a URL.
# name = url-test, [proxys], url, interval(second)
# fallback select which proxy is alive by testing with a URL.
# name = failback, [proxys], url, timeout
[Rule]
# https://github.com/Hackl0us/SS-Rule-Snippet
# Apple服务优化
# 其他服务

View File

@ -13,6 +13,8 @@ external-controller = 127.0.0.1:7892
# url-test select which proxy will be used by benchmarking speed to a URL.
# name = url-test, [proxys], url, interval(second)
# fallback select which proxy is alive by testing with a URL.
# name = failback, [proxys], url, timeout
{{ProxyAutoGroupPlaceHolder}}
@ -21,7 +23,7 @@ Proxy = select, {{ProxyGroupPlaceHolder}}
[Rule]
# https://github.com/Hackl0us/SS-Rule-Snippet
# Apple服务优化
// 其他服务
USER-AGENT,com.apple.appstored*,DIRECT