mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-10-20 22:44:11 +00:00
更新两处http开关,随ss开启和关闭
This commit is contained in:
@@ -209,6 +209,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
func applicationWillTerminate(_ aNotification: Notification) {
|
||||
// Insert code here to tear down your application
|
||||
StopSSLocal()
|
||||
StopPrivoxy()
|
||||
ProxyConfHelper.disableProxy("hi")
|
||||
let defaults = UserDefaults.standard
|
||||
defaults.set(false, forKey: "ShadowsocksOn")
|
||||
@@ -229,6 +230,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
|
||||
if isOn {
|
||||
StartSSLocal()
|
||||
StartPrivoxy()
|
||||
if mode == "auto" {
|
||||
ProxyConfHelper.disableProxy("hi")
|
||||
ProxyConfHelper.enablePACProxy("hi")
|
||||
@@ -247,6 +249,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
}
|
||||
} else {
|
||||
StopSSLocal()
|
||||
StopPrivoxy()
|
||||
ProxyConfHelper.disableProxy("hi")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user