From b4868ede64c61556f3b4495f15ac81c019df3b69 Mon Sep 17 00:00:00 2001 From: Qiu Yuzhou Date: Tue, 2 Oct 2018 23:12:50 +0800 Subject: [PATCH] Fixes reset `ProxyExceptions` defaults. --- ShadowsocksX-NG/AppDelegate.swift | 2 +- ShadowsocksX-NG/PreferencesWinController.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ShadowsocksX-NG/AppDelegate.swift b/ShadowsocksX-NG/AppDelegate.swift index eba64b7..e0f5f52 100755 --- a/ShadowsocksX-NG/AppDelegate.swift +++ b/ShadowsocksX-NG/AppDelegate.swift @@ -102,7 +102,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele "LocalHTTP.ListenPort": NSNumber(value: 1087 as UInt16), "LocalHTTPOn": true, "LocalHTTP.FollowGlobal": true, - "ProxyExceptions": "127.0.0.1, localhost, 192.168.0.0/16, 10.0.0.0/8", + "ProxyExceptions": "127.0.0.1, localhost, 192.168.0.0/16, 10.0.0.0/8, FE80::/64, ::1, FD00::/8", ]) statusItem = NSStatusBar.system.statusItem(withLength: AppDelegate.StatusItemIconWidth) diff --git a/ShadowsocksX-NG/PreferencesWinController.swift b/ShadowsocksX-NG/PreferencesWinController.swift index f13fe9d..20a4287 100644 --- a/ShadowsocksX-NG/PreferencesWinController.swift +++ b/ShadowsocksX-NG/PreferencesWinController.swift @@ -33,7 +33,7 @@ class PreferencesWinController: NSWindowController { @IBAction func resetProxyExceptions(sender: NSButton) { let defaults = UserDefaults.standard - defaults.set("127.0.0.1, localhost, 192.168.0.0/16, 10.0.0.0/8, FE80::/64, ::1, FD00::/8", forKey: "ProxyExceptions") + defaults.removeObject(forKey: "ProxyExceptions") } }