解决 macOS 10.12 下 PAC 模式下Safari 或 Twitter 客户端 tweetbot客户端不能FQ的问题
解决 macOS 10.12 下 PAC 模式下Safari 或 Twitter 客户端 tweetbot客户端不能FQ的问题 https://github.com/qiuyuzhou/ShadowsocksX-NG/issues/30 PS 手头没有 macOS 10.12 的机器,麻烦有的请帮忙测试一下 或者可以从 https://github.com/qinyuhang/ShadowsocksX-NG/tree/webserver 下载去 Xcode build 一下
This commit is contained in:
@ -144,6 +144,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
|
||||
func applicationWillTerminate(aNotification: NSNotification) {
|
||||
// Insert code here to tear down your application
|
||||
StopSSLocal()
|
||||
ProxyConfHelper.disableProxy("hi")
|
||||
let defaults = NSUserDefaults.standardUserDefaults()
|
||||
defaults.setBool(false, forKey: "ShadowsocksOn")
|
||||
}
|
||||
|
||||
func applyConfig() {
|
||||
@ -154,15 +158,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
if isOn {
|
||||
StartSSLocal()
|
||||
if mode == "auto" {
|
||||
ProxyConfHelper.enablePACProxy()
|
||||
ProxyConfHelper.enablePACProxy("hi")
|
||||
} else if mode == "global" {
|
||||
ProxyConfHelper.enableGlobalProxy()
|
||||
} else if mode == "manual" {
|
||||
ProxyConfHelper.disableProxy()
|
||||
ProxyConfHelper.disableProxy("hi")
|
||||
}
|
||||
} else {
|
||||
StopSSLocal()
|
||||
ProxyConfHelper.disableProxy()
|
||||
ProxyConfHelper.disableProxy("hi")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user