diff --git a/ShadowsocksX-NG.xcodeproj/project.pbxproj b/ShadowsocksX-NG.xcodeproj/project.pbxproj index 6959389..1ca3363 100755 --- a/ShadowsocksX-NG.xcodeproj/project.pbxproj +++ b/ShadowsocksX-NG.xcodeproj/project.pbxproj @@ -18,9 +18,7 @@ 9B0BFFEB1D0460A70040E62B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9B0BFFEA1D0460A70040E62B /* Assets.xcassets */; }; 9B0BFFEE1D0460A70040E62B /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9B0BFFEC1D0460A70040E62B /* MainMenu.xib */; }; 9B0BFFF91D0460A70040E62B /* ShadowsocksX_NGTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B0BFFF81D0460A70040E62B /* ShadowsocksX_NGTests.swift */; }; - 9B0D55461D2CC85400A4A8E2 /* ProxyPreferencesController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9B0D55481D2CC85400A4A8E2 /* ProxyPreferencesController.xib */; }; 9B2491B41D0ACC3A003BBECC /* PreferencesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9B2491B61D0ACC3A003BBECC /* PreferencesWindowController.xib */; }; - 9B2491B71D0ACC3E003BBECC /* AdvPreferencesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9B2491B91D0ACC3E003BBECC /* AdvPreferencesWindowController.xib */; }; 9B3FFF0D1D05FEB30019A709 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B3FFF0C1D05FEB30019A709 /* Utils.swift */; }; 9B3FFF141D0705810019A709 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B3FFF131D0705810019A709 /* Notifications.swift */; }; 9B3FFF171D072FDE0019A709 /* LaunchAtLoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B3FFF161D072FDE0019A709 /* LaunchAtLoginController.m */; }; @@ -36,12 +34,16 @@ 9B3FFF4C1D09D8F70019A709 /* install_helper.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9B3FFF4B1D09D8F70019A709 /* install_helper.sh */; }; 9B3FFF4F1D09D9D50019A709 /* ProxyConfHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B3FFF4E1D09D9D50019A709 /* ProxyConfHelper.m */; }; 9B3FFF541D09E2D10019A709 /* proxy_conf_helper in Resources */ = {isa = PBXBuildFile; fileRef = 9B3FFF441D09CD3B0019A709 /* proxy_conf_helper */; }; - 9B5831EE1E72EBF9009D5B7D /* ShortcutsPreferencesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9B5831EC1E72EBF9009D5B7D /* ShortcutsPreferencesWindowController.xib */; }; - 9B5831F31E72FA63009D5B7D /* ShortcutsPreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B5831F21E72FA63009D5B7D /* ShortcutsPreferencesWindowController.m */; }; 9B5831F61E7302F8009D5B7D /* ShortcutsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B5831F51E7302F8009D5B7D /* ShortcutsController.m */; }; - 9B5831FB1E73098F009D5B7D /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 9B5831FA1E73098F009D5B7D /* README.md */; }; + 9B5831FF1E741969009D5B7D /* PreferencesWinController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B5831FD1E741969009D5B7D /* PreferencesWinController.swift */; }; + 9B5832001E741969009D5B7D /* PreferencesWinController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9B5831FE1E741969009D5B7D /* PreferencesWinController.xib */; }; + 9B5832031E741F8D009D5B7D /* command-512.png in Resources */ = {isa = PBXBuildFile; fileRef = 9B5832021E741F8D009D5B7D /* command-512.png */; }; + 9B5832071E7421B2009D5B7D /* virtual-server-icon-3.png in Resources */ = {isa = PBXBuildFile; fileRef = 9B5832061E7421B2009D5B7D /* virtual-server-icon-3.png */; }; + 9B58320B1E7422DB009D5B7D /* http.png in Resources */ = {isa = PBXBuildFile; fileRef = 9B58320A1E7422DB009D5B7D /* http.png */; }; + 9B5832111E742632009D5B7D /* kcptun_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 9B5832101E742632009D5B7D /* kcptun_1.png */; }; 9B6BF9521E27B23F0061B9A7 /* LaunchHelper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9B6BF9501E27B1F20061B9A7 /* LaunchHelper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 9B6BF9541E27B2570061B9A7 /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B6BF9531E27B2570061B9A7 /* ServiceManagement.framework */; }; + 9B86459D1E7C2CAD00A84029 /* ProxyInterfacesViewCtrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B86459C1E7C2CAD00A84029 /* ProxyInterfacesViewCtrl.swift */; }; 9B9CBCA61E25E1DB00FC61AA /* KcptunProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9CBCA51E25E1DB00FC61AA /* KcptunProfile.swift */; }; 9B9CBCA81E26312E00FC61AA /* install_kcptun.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9B9CBCA71E26310E00FC61AA /* install_kcptun.sh */; }; 9B9CBCAA1E2633CB00FC61AA /* kcptun_client in Resources */ = {isa = PBXBuildFile; fileRef = 9B9CBCA91E2633CB00FC61AA /* kcptun_client */; }; @@ -49,7 +51,6 @@ 9B9CBCB41E26453C00FC61AA /* start_kcptun.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9B9CBCB01E2644DC00FC61AA /* start_kcptun.sh */; }; 9B9CBCB51E26453C00FC61AA /* stop_kcptun.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9B9CBCB11E26450D00FC61AA /* stop_kcptun.sh */; }; 9BA04B231D23D5A5005AAD7F /* ProxyConfTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA04B221D23D5A5005AAD7F /* ProxyConfTool.m */; }; - 9BA04B261D24044D005AAD7F /* ProxyPreferencesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BA04B241D24044D005AAD7F /* ProxyPreferencesController.swift */; }; 9BB706A71D1B982300551F0E /* SWBApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB706A51D1B982300551F0E /* SWBApplication.m */; }; 9BC70EDC1D2E3E3100EDA4CA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9B172A6C1D0ADDDD00B87B9A /* Localizable.strings */; }; 9BE8FBBF1D0B211600CAFD01 /* libcrypto.1.0.0.dylib in Resources */ = {isa = PBXBuildFile; fileRef = 9BE8FBBD1D0B1FB900CAFD01 /* libcrypto.1.0.0.dylib */; }; @@ -60,14 +61,11 @@ 9BEEF0701D04DDB100FC52B3 /* ServerProfileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BEEF06F1D04DDB100FC52B3 /* ServerProfileManager.swift */; }; 9BEEF0751D04EF3E00FC52B3 /* PreferencesWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BEEF0731D04EF3E00FC52B3 /* PreferencesWindowController.swift */; }; 9BEEF0781D04FE8A00FC52B3 /* LaunchAgentUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BEEF0771D04FE8A00FC52B3 /* LaunchAgentUtils.swift */; }; - 9BEEF07B1D05631500FC52B3 /* AdvPreferencesWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BEEF0791D05631500FC52B3 /* AdvPreferencesWindowController.swift */; }; C6D429931DA75988002A5711 /* install_privoxy.sh in Resources */ = {isa = PBXBuildFile; fileRef = C6D4298E1DA75988002A5711 /* install_privoxy.sh */; }; C6D429941DA75988002A5711 /* privoxy in Resources */ = {isa = PBXBuildFile; fileRef = C6D4298F1DA75988002A5711 /* privoxy */; }; C6D429961DA75988002A5711 /* start_privoxy.sh in Resources */ = {isa = PBXBuildFile; fileRef = C6D429911DA75988002A5711 /* start_privoxy.sh */; }; C6D429971DA75988002A5711 /* stop_privoxy.sh in Resources */ = {isa = PBXBuildFile; fileRef = C6D429921DA75988002A5711 /* stop_privoxy.sh */; }; C6D429991DA76FBC002A5711 /* privoxy.config.example in Resources */ = {isa = PBXBuildFile; fileRef = C6D429981DA76FBC002A5711 /* privoxy.config.example */; }; - C6E28E921DA79380004F8330 /* HTTPPreferencesWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E28E911DA79380004F8330 /* HTTPPreferencesWindowController.swift */; }; - C6E28E951DA79705004F8330 /* HTTPPreferencesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C6E28E971DA79705004F8330 /* HTTPPreferencesWindowController.xib */; }; C8E42A6C1D4F270A0074C7EA /* UserRulesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E42A6A1D4F270A0074C7EA /* UserRulesController.swift */; }; C8E42A6E1D4F2CAF0074C7EA /* UserRulesController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C8E42A701D4F2CAF0074C7EA /* UserRulesController.xib */; }; D8E3630B1E2072980027449B /* ServerProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E3630A1E2072980027449B /* ServerProfileTests.swift */; }; @@ -145,14 +143,10 @@ 9B0BFFF41D0460A70040E62B /* ShadowsocksX-NGTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ShadowsocksX-NGTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 9B0BFFF81D0460A70040E62B /* ShadowsocksX_NGTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShadowsocksX_NGTests.swift; sourceTree = ""; }; 9B0BFFFA1D0460A70040E62B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9B0D554A1D2CC85E00A4A8E2 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/ProxyPreferencesController.strings"; sourceTree = ""; }; - 9B0D554B1D2CC87400A4A8E2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ProxyPreferencesController.xib; sourceTree = ""; }; - 9B172A5D1D0ACEA100B87B9A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/AdvPreferencesWindowController.strings"; sourceTree = ""; }; 9B172A601D0ADA5B00B87B9A /* genstrings.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = genstrings.py; sourceTree = ""; }; 9B172A6B1D0ADDDD00B87B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; 9B172A6D1D0ADDE800B87B9A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; 9B2491B51D0ACC3A003BBECC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PreferencesWindowController.xib; sourceTree = ""; }; - 9B2491B81D0ACC3E003BBECC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AdvPreferencesWindowController.xib; sourceTree = ""; }; 9B3FFF0C1D05FEB30019A709 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; 9B3FFF131D0705810019A709 /* Notifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = ""; }; 9B3FFF151D072FDE0019A709 /* LaunchAtLoginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchAtLoginController.h; sourceTree = ""; }; @@ -175,14 +169,18 @@ 9B3FFF4E1D09D9D50019A709 /* ProxyConfHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProxyConfHelper.m; sourceTree = ""; }; 9B3FFF501D09DAEA0019A709 /* proxy_conf_helper_version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = proxy_conf_helper_version.h; sourceTree = ""; }; 9B3FFF511D09DBA20019A709 /* ShadowsocksX-NG-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ShadowsocksX-NG-Bridging-Header.h"; sourceTree = ""; }; - 9B5831EC1E72EBF9009D5B7D /* ShortcutsPreferencesWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShortcutsPreferencesWindowController.xib; sourceTree = ""; }; - 9B5831F11E72FA63009D5B7D /* ShortcutsPreferencesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShortcutsPreferencesWindowController.h; sourceTree = ""; }; - 9B5831F21E72FA63009D5B7D /* ShortcutsPreferencesWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShortcutsPreferencesWindowController.m; sourceTree = ""; }; 9B5831F41E7302F8009D5B7D /* ShortcutsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShortcutsController.h; sourceTree = ""; }; 9B5831F51E7302F8009D5B7D /* ShortcutsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShortcutsController.m; sourceTree = ""; }; 9B5831FA1E73098F009D5B7D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 9B5831FD1E741969009D5B7D /* PreferencesWinController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreferencesWinController.swift; sourceTree = ""; }; + 9B5831FE1E741969009D5B7D /* PreferencesWinController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PreferencesWinController.xib; sourceTree = ""; }; + 9B5832021E741F8D009D5B7D /* command-512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "command-512.png"; sourceTree = ""; }; + 9B5832061E7421B2009D5B7D /* virtual-server-icon-3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "virtual-server-icon-3.png"; sourceTree = ""; }; + 9B58320A1E7422DB009D5B7D /* http.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = http.png; sourceTree = ""; }; + 9B5832101E742632009D5B7D /* kcptun_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = kcptun_1.png; sourceTree = ""; }; 9B6BF94B1E27B1F10061B9A7 /* LaunchHelper.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = LaunchHelper.xcodeproj; path = LaunchHelper/LaunchHelper.xcodeproj; sourceTree = ""; }; 9B6BF9531E27B2570061B9A7 /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; }; + 9B86459C1E7C2CAD00A84029 /* ProxyInterfacesViewCtrl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProxyInterfacesViewCtrl.swift; sourceTree = ""; }; 9B9CBCA51E25E1DB00FC61AA /* KcptunProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KcptunProfile.swift; sourceTree = ""; }; 9B9CBCA71E26310E00FC61AA /* install_kcptun.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = install_kcptun.sh; sourceTree = ""; }; 9B9CBCA91E2633CB00FC61AA /* kcptun_client */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = kcptun_client; sourceTree = ""; }; @@ -191,7 +189,6 @@ 9B9CBCB11E26450D00FC61AA /* stop_kcptun.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = stop_kcptun.sh; sourceTree = ""; }; 9BA04B211D23D5A5005AAD7F /* ProxyConfTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyConfTool.h; sourceTree = ""; }; 9BA04B221D23D5A5005AAD7F /* ProxyConfTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProxyConfTool.m; sourceTree = ""; }; - 9BA04B241D24044D005AAD7F /* ProxyPreferencesController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProxyPreferencesController.swift; sourceTree = ""; }; 9BB706A51D1B982300551F0E /* SWBApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWBApplication.m; sourceTree = ""; }; 9BB706A61D1B982300551F0E /* SWBApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWBApplication.h; sourceTree = ""; }; 9BE8FBBD1D0B1FB900CAFD01 /* libcrypto.1.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.1.0.0.dylib; sourceTree = ""; }; @@ -203,16 +200,12 @@ 9BEEF06F1D04DDB100FC52B3 /* ServerProfileManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerProfileManager.swift; sourceTree = ""; }; 9BEEF0731D04EF3E00FC52B3 /* PreferencesWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreferencesWindowController.swift; sourceTree = ""; }; 9BEEF0771D04FE8A00FC52B3 /* LaunchAgentUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LaunchAgentUtils.swift; sourceTree = ""; }; - 9BEEF0791D05631500FC52B3 /* AdvPreferencesWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdvPreferencesWindowController.swift; sourceTree = ""; }; B4E6A97CA843F3943524B686 /* Pods-proxy_conf_helper.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-proxy_conf_helper.debug.xcconfig"; path = "Pods/Target Support Files/Pods-proxy_conf_helper/Pods-proxy_conf_helper.debug.xcconfig"; sourceTree = ""; }; C6D4298E1DA75988002A5711 /* install_privoxy.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = install_privoxy.sh; sourceTree = ""; }; C6D4298F1DA75988002A5711 /* privoxy */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = privoxy; sourceTree = ""; }; C6D429911DA75988002A5711 /* start_privoxy.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = start_privoxy.sh; sourceTree = ""; }; C6D429921DA75988002A5711 /* stop_privoxy.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = stop_privoxy.sh; sourceTree = ""; }; C6D429981DA76FBC002A5711 /* privoxy.config.example */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = privoxy.config.example; sourceTree = ""; }; - C6E28E911DA79380004F8330 /* HTTPPreferencesWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPPreferencesWindowController.swift; sourceTree = ""; }; - C6E28E961DA79705004F8330 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/HTTPPreferencesWindowController.xib; sourceTree = ""; }; - C6E28E991DA79709004F8330 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/HTTPPreferencesWindowController.strings"; sourceTree = ""; }; C6E28E9B1DA79FB9004F8330 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MainMenu.strings"; sourceTree = ""; }; C8E42A6A1D4F270A0074C7EA /* UserRulesController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserRulesController.swift; sourceTree = ""; }; C8E42A6F1D4F2CAF0074C7EA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UserRulesController.xib; sourceTree = ""; }; @@ -270,6 +263,10 @@ 9B07EFB01D048E900052D9DF /* Support Files */ = { isa = PBXGroup; children = ( + 9B5832101E742632009D5B7D /* kcptun_1.png */, + 9B58320A1E7422DB009D5B7D /* http.png */, + 9B5832061E7421B2009D5B7D /* virtual-server-icon-3.png */, + 9B5832021E741F8D009D5B7D /* command-512.png */, 9B9CBCAD1E263A6600FC61AA /* libpcre.1.dylib */, 9B9CBCA91E2633CB00FC61AA /* kcptun_client */, 08FCA0FE1E24BE1A0070984F /* example-gui-config.json */, @@ -376,17 +373,11 @@ 9B3FFF311D08CEE40019A709 /* SWBQRCodeWindowController.m */, 9BEEF0731D04EF3E00FC52B3 /* PreferencesWindowController.swift */, 9B2491B61D0ACC3A003BBECC /* PreferencesWindowController.xib */, - 9BEEF0791D05631500FC52B3 /* AdvPreferencesWindowController.swift */, - 9B2491B91D0ACC3E003BBECC /* AdvPreferencesWindowController.xib */, - 9BA04B241D24044D005AAD7F /* ProxyPreferencesController.swift */, - 9B0D55481D2CC85400A4A8E2 /* ProxyPreferencesController.xib */, C8E42A6A1D4F270A0074C7EA /* UserRulesController.swift */, C8E42A701D4F2CAF0074C7EA /* UserRulesController.xib */, - C6E28E911DA79380004F8330 /* HTTPPreferencesWindowController.swift */, - C6E28E971DA79705004F8330 /* HTTPPreferencesWindowController.xib */, - 9B5831EC1E72EBF9009D5B7D /* ShortcutsPreferencesWindowController.xib */, - 9B5831F11E72FA63009D5B7D /* ShortcutsPreferencesWindowController.h */, - 9B5831F21E72FA63009D5B7D /* ShortcutsPreferencesWindowController.m */, + 9B5831FD1E741969009D5B7D /* PreferencesWinController.swift */, + 9B5831FE1E741969009D5B7D /* PreferencesWinController.xib */, + 9B86459C1E7C2CAD00A84029 /* ProxyInterfacesViewCtrl.swift */, ); name = UI; sourceTree = ""; @@ -556,28 +547,30 @@ 9B9CBCB51E26453C00FC61AA /* stop_kcptun.sh in Resources */, 9B9CBCAF1E263B1600FC61AA /* libpcre.1.dylib in Resources */, 9B9CBCA81E26312E00FC61AA /* install_kcptun.sh in Resources */, + 9B5832031E741F8D009D5B7D /* command-512.png in Resources */, 9B9CBCAA1E2633CB00FC61AA /* kcptun_client in Resources */, 9BE8FBBF1D0B211600CAFD01 /* libcrypto.1.0.0.dylib in Resources */, 9B3FFF541D09E2D10019A709 /* proxy_conf_helper in Resources */, - C6E28E951DA79705004F8330 /* HTTPPreferencesWindowController.xib in Resources */, + 9B5832071E7421B2009D5B7D /* virtual-server-icon-3.png in Resources */, 9BEEF0691D04D4D500FC52B3 /* install_ss_local.sh in Resources */, - 9B0D55461D2CC85400A4A8E2 /* ProxyPreferencesController.xib in Resources */, 9B2491B41D0ACC3A003BBECC /* PreferencesWindowController.xib in Resources */, 9B3FFF291D08A1DF0019A709 /* user-rule.txt in Resources */, C6D429971DA75988002A5711 /* stop_privoxy.sh in Resources */, C8E42A6E1D4F2CAF0074C7EA /* UserRulesController.xib in Resources */, 9BEEF06A1D04D4D500FC52B3 /* start_ss_local.sh in Resources */, + 9B5832111E742632009D5B7D /* kcptun_1.png in Resources */, C6D429941DA75988002A5711 /* privoxy in Resources */, C6D429991DA76FBC002A5711 /* privoxy.config.example in Resources */, 9BEEF06B1D04D4D500FC52B3 /* stop_ss_local.sh in Resources */, 9B3FFF341D08CEF70019A709 /* SWBQRCodeWindowController.xib in Resources */, 9B3FFF231D088E8D0019A709 /* abp.js in Resources */, 9B07EFAD1D048E880052D9DF /* menu_icon.png in Resources */, + 9B5832001E741969009D5B7D /* PreferencesWinController.xib in Resources */, 9B0BFFEB1D0460A70040E62B /* Assets.xcassets in Resources */, - 9B2491B71D0ACC3E003BBECC /* AdvPreferencesWindowController.xib in Resources */, 08FCA0FF1E24BE1A0070984F /* example-gui-config.json in Resources */, 9B3FFF271D0898EB0019A709 /* gfwlist.txt in Resources */, C6D429931DA75988002A5711 /* install_privoxy.sh in Resources */, + 9B58320B1E7422DB009D5B7D /* http.png in Resources */, 9BC70EDC1D2E3E3100EDA4CA /* Localizable.strings in Resources */, 9B0BFFEE1D0460A70040E62B /* MainMenu.xib in Resources */, 9B3FFF4C1D09D8F70019A709 /* install_helper.sh in Resources */, @@ -585,7 +578,6 @@ 9B07EFAC1D048E880052D9DF /* menu_icon@2x.png in Resources */, 9B07EFA71D048BBB0052D9DF /* ss-local in Resources */, 9B07EFAF1D048E880052D9DF /* menu_icon_disabled@2x.png in Resources */, - 9B5831EE1E72EBF9009D5B7D /* ShortcutsPreferencesWindowController.xib in Resources */, 9B07EFAE1D048E880052D9DF /* menu_icon_disabled.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -728,26 +720,23 @@ buildActionMask = 2147483647; files = ( 9B3FFF171D072FDE0019A709 /* LaunchAtLoginController.m in Sources */, + 9B86459D1E7C2CAD00A84029 /* ProxyInterfacesViewCtrl.swift in Sources */, 9B3FFF4F1D09D9D50019A709 /* ProxyConfHelper.m in Sources */, 9B5831F61E7302F8009D5B7D /* ShortcutsController.m in Sources */, - 9B5831F31E72FA63009D5B7D /* ShortcutsPreferencesWindowController.m in Sources */, 9BB706A71D1B982300551F0E /* SWBApplication.m in Sources */, 9B3FFF1E1D0732660019A709 /* Utils.m in Sources */, 9B3FFF321D08CEE40019A709 /* SWBQRCodeWindowController.m in Sources */, 9B3FFF211D08826E0019A709 /* PACUtils.swift in Sources */, - 9BA04B261D24044D005AAD7F /* ProxyPreferencesController.swift in Sources */, 9B3FFF141D0705810019A709 /* Notifications.swift in Sources */, 9BEEF0701D04DDB100FC52B3 /* ServerProfileManager.swift in Sources */, - 9BEEF07B1D05631500FC52B3 /* AdvPreferencesWindowController.swift in Sources */, 9BEEF06E1D04DCE400FC52B3 /* ServerProfile.swift in Sources */, 9B3FFF0D1D05FEB30019A709 /* Utils.swift in Sources */, 9BEEF0751D04EF3E00FC52B3 /* PreferencesWindowController.swift in Sources */, 9B0BFFE91D0460A70040E62B /* AppDelegate.swift in Sources */, 9BA04B231D23D5A5005AAD7F /* ProxyConfTool.m in Sources */, + 9B5831FF1E741969009D5B7D /* PreferencesWinController.swift in Sources */, 9BEEF0781D04FE8A00FC52B3 /* LaunchAgentUtils.swift in Sources */, - C6E28E921DA79380004F8330 /* HTTPPreferencesWindowController.swift in Sources */, 9B9CBCA61E25E1DB00FC61AA /* KcptunProfile.swift in Sources */, - 9B5831FB1E73098F009D5B7D /* README.md in Sources */, C8E42A6C1D4F270A0074C7EA /* UserRulesController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -794,15 +783,6 @@ name = MainMenu.xib; sourceTree = ""; }; - 9B0D55481D2CC85400A4A8E2 /* ProxyPreferencesController.xib */ = { - isa = PBXVariantGroup; - children = ( - 9B0D554A1D2CC85E00A4A8E2 /* zh-Hans */, - 9B0D554B1D2CC87400A4A8E2 /* Base */, - ); - name = ProxyPreferencesController.xib; - sourceTree = ""; - }; 9B172A6C1D0ADDDD00B87B9A /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( @@ -821,24 +801,6 @@ name = PreferencesWindowController.xib; sourceTree = ""; }; - 9B2491B91D0ACC3E003BBECC /* AdvPreferencesWindowController.xib */ = { - isa = PBXVariantGroup; - children = ( - 9B2491B81D0ACC3E003BBECC /* Base */, - 9B172A5D1D0ACEA100B87B9A /* zh-Hans */, - ); - name = AdvPreferencesWindowController.xib; - sourceTree = ""; - }; - C6E28E971DA79705004F8330 /* HTTPPreferencesWindowController.xib */ = { - isa = PBXVariantGroup; - children = ( - C6E28E961DA79705004F8330 /* Base */, - C6E28E991DA79709004F8330 /* zh-Hans */, - ); - name = HTTPPreferencesWindowController.xib; - sourceTree = ""; - }; C8E42A701D4F2CAF0074C7EA /* UserRulesController.xib */ = { isa = PBXVariantGroup; children = ( diff --git a/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/ShadowsocksX-NG.xcscheme b/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/ShadowsocksX-NG.xcscheme deleted file mode 100644 index 9e5d441..0000000 --- a/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/ShadowsocksX-NG.xcscheme +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/ShadowsocksX-NGTests.xcscheme b/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/ShadowsocksX-NGTests.xcscheme deleted file mode 100644 index f5d83b6..0000000 --- a/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/ShadowsocksX-NGTests.xcscheme +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/proxy_conf_helper.xcscheme b/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/proxy_conf_helper.xcscheme deleted file mode 100644 index 68efd69..0000000 --- a/ShadowsocksX-NG.xcodeproj/xcshareddata/xcschemes/proxy_conf_helper.xcscheme +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ShadowsocksX-NG/AdvPreferencesWindowController.swift b/ShadowsocksX-NG/AdvPreferencesWindowController.swift deleted file mode 100644 index e53a707..0000000 --- a/ShadowsocksX-NG/AdvPreferencesWindowController.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// AdvPreferencesWindowController.swift -// ShadowsocksX-NG -// -// Created by 邱宇舟 on 16/6/6. -// Copyright © 2016年 qiuyuzhou. All rights reserved. -// - -import Cocoa - -class AdvPreferencesWindowController: NSWindowController, NSWindowDelegate { - - override func windowDidLoad() { - super.windowDidLoad() - - // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. - self.window?.delegate = self - } - - //------------------------------------------------------------ - // NSWindowDelegate - func windowWillClose(_ notification: Notification) { - NotificationCenter.default - .post(name: Notification.Name(rawValue: NOTIFY_ADV_CONF_CHANGED), object: nil) - } - -} diff --git a/ShadowsocksX-NG/AppDelegate.swift b/ShadowsocksX-NG/AppDelegate.swift index 35bcd59..091458c 100755 --- a/ShadowsocksX-NG/AppDelegate.swift +++ b/ShadowsocksX-NG/AppDelegate.swift @@ -8,22 +8,16 @@ import Cocoa import Carbon +import RxCocoa +import RxSwift @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDelegate { var qrcodeWinCtrl: SWBQRCodeWindowController! var preferencesWinCtrl: PreferencesWindowController! - var advPreferencesWinCtrl: AdvPreferencesWindowController! - var proxyPreferencesWinCtrl: ProxyPreferencesController! var editUserRulesWinCtrl: UserRulesController! - var httpPreferencesWinCtrl : HTTPPreferencesWindowController! - var shortcutsPreferencesWinCtrl: ShortcutsPreferencesWindowController! - - let keyCodeP = kVK_ANSI_P - let keyCodeS = kVK_ANSI_S - let modifierKeys = cmdKey+controlKey - var hotKeyRef: EventHotKeyRef? + var allInOnePreferencesWinCtrl: PreferencesWinController! var launchAtLoginController: LaunchAtLoginController = LaunchAtLoginController() @@ -35,7 +29,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele @IBOutlet weak var autoModeMenuItem: NSMenuItem! @IBOutlet weak var globalModeMenuItem: NSMenuItem! @IBOutlet weak var manualModeMenuItem: NSMenuItem! - @IBOutlet weak var showRunningModeMenuItem: NSMenuItem! @IBOutlet weak var serversMenuItem: NSMenuItem! @IBOutlet var showQRCodeMenuItem: NSMenuItem! @@ -100,6 +93,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele "Kcptun.LocalHost": "127.0.0.1", "Kcptun.LocalPort": NSNumber(value: 8388), "Kcptun.Conn": NSNumber(value: 1), + "ShowRunningModeOnStatusBar": true, ]) statusItem = NSStatusBar.system().statusItem(withLength: AppDelegate.StatusItemIconWidth) @@ -109,13 +103,23 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele statusItem.menu = statusMenu + _ = defaults.rx.observe(Bool.self, "ShowRunningModeOnStatusBar") +// .distinctUntilChanged() + .subscribe(onNext: { value in + if let enabled = value { + self.updateStatusItemUI(isShownnRunningMode: enabled) + } + }) + let notifyCenter = NotificationCenter.default - notifyCenter.addObserver(forName: NSNotification.Name(rawValue: NOTIFY_ADV_PROXY_CONF_CHANGED), object: nil, queue: nil - , using: { - (note) in + + _ = notifyCenter.rx.notification(NOTIFY_CONF_CHANGED) + .subscribe(onNext: { noti in + SyncSSLocal() self.applyConfig() - } - ) + self.updateCopyHttpProxyExportMenu() + }) + notifyCenter.addObserver(forName: NSNotification.Name(rawValue: NOTIFY_SERVER_PROFILES_CHANGED), object: nil, queue: nil , using: { (note) in @@ -131,106 +135,34 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele SyncSSLocal() } ) - notifyCenter.addObserver(forName: NSNotification.Name(rawValue: NOTIFY_ADV_CONF_CHANGED), object: nil, queue: nil - , using: { - (note) in - SyncSSLocal() - self.applyConfig() - } - ) - notifyCenter.addObserver(forName: NSNotification.Name(rawValue: NOTIFY_HTTP_CONF_CHANGED), object: nil, queue: nil - , using: { - (note) in - SyncPrivoxy() - self.applyConfig() - self.updateCopyHttpProxyExportMenu() - } - ) - notifyCenter.addObserver(forName: NSNotification.Name(rawValue: "NOTIFY_TOGGLE_RUNNING"), object: nil, queue: nil - , using: { - (note) in - var isOn = UserDefaults.standard.bool(forKey: "ShadowsocksOn") - isOn = !isOn - if isOn { - self.isNameTextField.stringValue = "Shadowsocks: On".localized - } - else { - self.isNameTextField.stringValue = "Shadowsocks: Off".localized - } - - UserDefaults.standard.set(isOn, forKey: "ShadowsocksOn") - - self.updateMainMenu() - self.applyConfig() - self.fadeInHud() - } - ) - notifyCenter.addObserver(forName: NSNotification.Name(rawValue: "NOTIFY_SWITCH_PROXY_MODE"), object: nil, queue: nil - , using: { - (note) in - - switch Globals.proxyType { - case .pac: - Globals.proxyType = .global - UserDefaults.standard.setValue("global", forKey: "ShadowsocksRunningMode") + _ = notifyCenter.rx.notification(NOTIFY_TOGGLE_RUNNING_SHORTCUT) + .subscribe(onNext: { noti in + self.doToggleRunning(showToast: true) + }) + _ = notifyCenter.rx.notification(NOTIFY_SWITCH_PROXY_MODE_SHORTCUT) + .subscribe(onNext: { noti in + let mode = defaults.string(forKey: "ShadowsocksRunningMode")! + switch mode { + case "auto": + defaults.setValue("global", forKey: "ShadowsocksRunningMode") self.isNameTextField.stringValue = "Global Mode".localized - case .global: - Globals.proxyType = .pac - UserDefaults.standard.setValue("auto", forKey: "ShadowsocksRunningMode") + case "global": + defaults.setValue("auto", forKey: "ShadowsocksRunningMode") + self.isNameTextField.stringValue = "Auto Mode By PAC".localized + default: + defaults.setValue("auto", forKey: "ShadowsocksRunningMode") self.isNameTextField.stringValue = "Auto Mode By PAC".localized } self.updateRunningModeMenu() self.applyConfig() self.fadeInHud() - } - ) - notifyCenter.addObserver(forName: NSNotification.Name(rawValue: "NOTIFY_FOUND_SS_URL"), object: nil, queue: nil) { - (note: Notification) in - - let sendNotify = { - (title: String, subtitle: String, infoText: String) in - - let userNote = NSUserNotification() - userNote.title = title - userNote.subtitle = subtitle - userNote.informativeText = infoText - userNote.soundName = NSUserNotificationDefaultSoundName - - NSUserNotificationCenter.default - .deliver(userNote); - } - - if let userInfo = (note as NSNotification).userInfo { - let urls: [URL] = userInfo["urls"] as! [URL] - - let mgr = ServerProfileManager.instance - var isChanged = false - - for url in urls { - if let profile = ServerProfile(url: url) { - mgr.profiles.append(profile) - isChanged = true - - var subtitle: String = "" - if userInfo["source"] as! String == "qrcode" { - subtitle = "By scan QR Code".localized - } else if userInfo["source"] as! String == "url" { - subtitle = "By Handle SS URL".localized - } - - sendNotify("Add Shadowsocks Server Profile".localized, subtitle, "Host: \(profile.serverHost)") - } - } - - if isChanged { - mgr.save() - self.updateServersMenu() - } else { - sendNotify("Not found valid qrcode of shadowsocks profile.", "", "") - } - } - } + }) + + _ = notifyCenter.rx.notification(NOTIFY_FOUND_SS_URL) + .subscribe(onNext: { noti in + self.handleFoundSSURL(noti) + }) // Handle ss url scheme NSAppleEventManager.shared().setEventHandler(self @@ -241,7 +173,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele updateCopyHttpProxyExportMenu() updateServersMenu() updateRunningModeMenu() - updateLaunchAtLoginMenu() ProxyConfHelper.install() ProxyConfHelper.startMonitorPAC() @@ -258,7 +189,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele StopKcptun() StopPrivoxy() ProxyConfHelper.disableProxy() - if let ref = hotKeyRef { UnregisterEventHotKey(ref) } } func applyConfig() { @@ -287,14 +217,27 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele // MARK: - UI Methods @IBAction func toggleRunning(_ sender: NSMenuItem) { + self.doToggleRunning(showToast: false) + } + + func doToggleRunning(showToast: Bool) { let defaults = UserDefaults.standard - var isOn = defaults.bool(forKey: "ShadowsocksOn") + var isOn = UserDefaults.standard.bool(forKey: "ShadowsocksOn") isOn = !isOn defaults.set(isOn, forKey: "ShadowsocksOn") - updateMainMenu() + self.updateMainMenu() + self.applyConfig() - applyConfig() + if showToast { + if isOn { + self.isNameTextField.stringValue = "Shadowsocks: On".localized + } + else { + self.isNameTextField.stringValue = "Shadowsocks: Off".localized + } + self.fadeInHud() + } } @IBAction func updateGFWList(_ sender: NSMenuItem) { @@ -359,11 +302,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele ServerProfileManager.instance.exportConfigFile() } - @IBAction func toggleLaunghAtLogin(sender: NSMenuItem) { - launchAtLoginController.launchAtLogin = !launchAtLoginController.launchAtLogin; - updateLaunchAtLoginMenu() - } - @IBAction func selectPACMode(_ sender: NSMenuItem) { let defaults = UserDefaults.standard defaults.setValue("auto", forKey: "ShadowsocksRunningMode") @@ -397,51 +335,16 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele ctrl.window?.makeKeyAndOrderFront(self) } - @IBAction func editAdvPreferences(_ sender: NSMenuItem) { - if advPreferencesWinCtrl != nil { - advPreferencesWinCtrl.close() - } - let ctrl = AdvPreferencesWindowController(windowNibName: "AdvPreferencesWindowController") - advPreferencesWinCtrl = ctrl - - ctrl.showWindow(self) - NSApp.activate(ignoringOtherApps: true) - ctrl.window?.makeKeyAndOrderFront(self) - } - - @IBAction func editHTTPPreferences(_ sender: NSMenuItem) { - if httpPreferencesWinCtrl != nil { - httpPreferencesWinCtrl.close() - } - let ctrl = HTTPPreferencesWindowController(windowNibName: "HTTPPreferencesWindowController") - httpPreferencesWinCtrl = ctrl - - ctrl.showWindow(self) - NSApp.activate(ignoringOtherApps: true) - ctrl.window?.makeKeyAndOrderFront(self) - } - - @IBAction func editProxyPreferences(_ sender: NSObject) { - if proxyPreferencesWinCtrl != nil { - proxyPreferencesWinCtrl.close() - } - proxyPreferencesWinCtrl = ProxyPreferencesController(windowNibName: "ProxyPreferencesController") - proxyPreferencesWinCtrl.showWindow(self) - NSApp.activate(ignoringOtherApps: true) - proxyPreferencesWinCtrl.window?.makeKeyAndOrderFront(self) - } - - @IBAction func editShortcutsPreferences(_ sender: NSMenuItem) { - if shortcutsPreferencesWinCtrl != nil { - shortcutsPreferencesWinCtrl.close() + @IBAction func showAllInOnePreferences(_ sender: NSMenuItem) { + if allInOnePreferencesWinCtrl != nil { + allInOnePreferencesWinCtrl.close() } - shortcutsPreferencesWinCtrl = ShortcutsPreferencesWindowController( - windowNibName: "ShortcutsPreferencesWindowController") + allInOnePreferencesWinCtrl = PreferencesWinController(windowNibName: "PreferencesWinController") - shortcutsPreferencesWinCtrl.showWindow(self) + allInOnePreferencesWinCtrl.showWindow(self) NSApp.activate(ignoringOtherApps: true) - shortcutsPreferencesWinCtrl.window?.makeKeyAndOrderFront(self) + allInOnePreferencesWinCtrl.window?.makeKeyAndOrderFront(self) } @IBAction func selectServer(_ sender: NSMenuItem) { @@ -495,29 +398,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele NSApp.activate(ignoringOtherApps: true) } - @IBAction func showRunningMode(_ sender: NSMenuItem) { - sender.state = sender.state == 1 ? 0 : 1 - let defaults = UserDefaults.standard - let isShown = (sender.state == 1) - defaults.set(isShown, forKey: "ShowRunningModeOnStatusBar") - updateStatusItemUI(isShownnRunningMode: isShown) - } - - func updateLaunchAtLoginMenu() { - if launchAtLoginController.launchAtLogin { - lanchAtLoginMenuItem.state = 1 - } else { - lanchAtLoginMenuItem.state = 0 - } - } - func updateRunningModeMenu() { let defaults = UserDefaults.standard let mode = defaults.string(forKey: "ShadowsocksRunningMode") - showRunningModeMenuItem.title = "Show Running Mode On Status Bar".localized - showRunningModeMenuItem.state = defaults.bool(forKey: "ShowRunningModeOnStatusBar") ? 1 : 0 - var serverMenuText = "Servers".localized let mgr = ServerProfileManager.instance @@ -645,6 +529,51 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele } } + func handleFoundSSURL(_ note: Notification) { + let sendNotify = { + (title: String, subtitle: String, infoText: String) in + + let userNote = NSUserNotification() + userNote.title = title + userNote.subtitle = subtitle + userNote.informativeText = infoText + userNote.soundName = NSUserNotificationDefaultSoundName + + NSUserNotificationCenter.default + .deliver(userNote); + } + + if let userInfo = (note as NSNotification).userInfo { + let urls: [URL] = userInfo["urls"] as! [URL] + + let mgr = ServerProfileManager.instance + var isChanged = false + + for url in urls { + if let profile = ServerProfile(url: url) { + mgr.profiles.append(profile) + isChanged = true + + var subtitle: String = "" + if userInfo["source"] as! String == "qrcode" { + subtitle = "By scan QR Code".localized + } else if userInfo["source"] as! String == "url" { + subtitle = "By Handle SS URL".localized + } + + sendNotify("Add Shadowsocks Server Profile".localized, subtitle, "Host: \(profile.serverHost)") + } + } + + if isChanged { + mgr.save() + self.updateServersMenu() + } else { + sendNotify("Not found valid qrcode of shadowsocks profile.", "", "") + } + } + } + //------------------------------------------------------------ // NSUserNotificationCenterDelegate diff --git a/ShadowsocksX-NG/Base.lproj/AdvPreferencesWindowController.xib b/ShadowsocksX-NG/Base.lproj/AdvPreferencesWindowController.xib deleted file mode 100644 index 3a9cd96..0000000 --- a/ShadowsocksX-NG/Base.lproj/AdvPreferencesWindowController.xib +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ShadowsocksX-NG/Base.lproj/HTTPPreferencesWindowController.xib b/ShadowsocksX-NG/Base.lproj/HTTPPreferencesWindowController.xib deleted file mode 100644 index 8845c32..0000000 --- a/ShadowsocksX-NG/Base.lproj/HTTPPreferencesWindowController.xib +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ShadowsocksX-NG/Base.lproj/MainMenu.xib b/ShadowsocksX-NG/Base.lproj/MainMenu.xib index a386884..a881185 100755 --- a/ShadowsocksX-NG/Base.lproj/MainMenu.xib +++ b/ShadowsocksX-NG/Base.lproj/MainMenu.xib @@ -22,7 +22,6 @@ - @@ -31,7 +30,6 @@ - @@ -100,13 +98,6 @@ - - - - - - - @@ -119,63 +110,29 @@ - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/ShadowsocksX-NG/Base.lproj/ProxyPreferencesController.xib b/ShadowsocksX-NG/Base.lproj/ProxyPreferencesController.xib deleted file mode 100644 index 612480c..0000000 --- a/ShadowsocksX-NG/Base.lproj/ProxyPreferencesController.xib +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NSNegateBoolean - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ShadowsocksX-NG/HTTPPreferencesWindowController.swift b/ShadowsocksX-NG/HTTPPreferencesWindowController.swift deleted file mode 100644 index 6f2c64f..0000000 --- a/ShadowsocksX-NG/HTTPPreferencesWindowController.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// HTTPPreferencesWindowController.swift -// ShadowsocksX-NG -// -// Created by 王晨 on 2016/10/7. -// Copyright © 2016年 qiuyuzhou. All rights reserved. -// - -import Cocoa - -class HTTPPreferencesWindowController: NSWindowController, NSWindowDelegate { - - @IBOutlet weak var address: NSTextField! - @IBOutlet weak var port: NSTextField! - - override func windowDidLoad() { - super.windowDidLoad() - - // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. - self.window?.delegate = self - } - - //------------------------------------------------------------ - // NSWindowDelegate - func windowWillClose(_ notification: Notification) { - NotificationCenter.default - .post(name: Notification.Name(rawValue: NOTIFY_HTTP_CONF_CHANGED), object: nil) - } - -} diff --git a/ShadowsocksX-NG/LaunchAtLoginController.h b/ShadowsocksX-NG/LaunchAtLoginController.h index 144f69e..e9c9dee 100755 --- a/ShadowsocksX-NG/LaunchAtLoginController.h +++ b/ShadowsocksX-NG/LaunchAtLoginController.h @@ -27,5 +27,6 @@ @property(assign) BOOL launchAtLogin; ++ (instancetype) shared; @end diff --git a/ShadowsocksX-NG/LaunchAtLoginController.m b/ShadowsocksX-NG/LaunchAtLoginController.m index 7ba9f7a..f14d0d4 100755 --- a/ShadowsocksX-NG/LaunchAtLoginController.m +++ b/ShadowsocksX-NG/LaunchAtLoginController.m @@ -44,15 +44,26 @@ { self = [super init]; if (self) { - _enabled = [[NSUserDefaults standardUserDefaults] boolForKey: @"LaunchAtLogin"]; + _enabled = NO; + BOOL enabled = [[NSUserDefaults standardUserDefaults] boolForKey: @"LaunchAtLogin"]; + [self setLaunchAtLogin:enabled]; } return self; } - + - (void) dealloc { } ++ (instancetype) shared { + static LaunchAtLoginController* ctrl = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + ctrl = [[self alloc]init]; + }); + return ctrl; +} + - (void) setLaunchAtLogin: (BOOL) enabled { if (SMLoginItemSetEnabled( @@ -61,6 +72,10 @@ _enabled = enabled; NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool: enabled forKey: @"LaunchAtLogin"]; + + NSLog(@"Call SMLoginItemSetEnabled with [%hhd] success", enabled); + } else { + NSLog(@"Call SMLoginItemSetEnabled with [%hhd] failed", enabled); } } diff --git a/ShadowsocksX-NG/Notifications.swift b/ShadowsocksX-NG/Notifications.swift index 09da2db..f855d0d 100644 --- a/ShadowsocksX-NG/Notifications.swift +++ b/ShadowsocksX-NG/Notifications.swift @@ -11,5 +11,16 @@ import Foundation let NOTIFY_SERVER_PROFILES_CHANGED = "NOTIFY_SERVER_PROFILES_CHANGED" let NOTIFY_ADV_PROXY_CONF_CHANGED = "NOTIFY_ADV_PROXY_CONF_CHANGED" let NOTIFY_ADV_CONF_CHANGED = "NOTIFY_ADV_CONF_CHANGED" -let NOTIFY_HTTP_CONF_CHANGED = "NOTIFY_HTTP_CONF_CHANGED" let NOTIFY_INVALIDE_QR = "NOTIFY_INVALIDE_QR" + + +let NOTIFY_CONF_CHANGED = Notification.Name(rawValue: "NOTIFY_CONF_CHANGED") + +//let NOTIFY_SS_CONF_CHANGED = Notification.Name(rawValue: "NOTIFY_SS_CONF_CHANGED") +let NOTIFY_HTTP_CONF_CHANGED = Notification.Name(rawValue: "NOTIFY_HTTP_CONF_CHANGED") +//let NOTIFY_KCPTUN_CONF_CHANGED = Notification.Name(rawValue: "NOTIFY_KCPTUN_CONF_CHANGED") + +let NOTIFY_TOGGLE_RUNNING_SHORTCUT = Notification.Name(rawValue: "NOTIFY_TOGGLE_RUNNING_SHORTCUT") +let NOTIFY_SWITCH_PROXY_MODE_SHORTCUT = Notification.Name(rawValue: "NOTIFY_SWITCH_PROXY_MODE_SHORTCUT") + +let NOTIFY_FOUND_SS_URL = Notification.Name(rawValue: "NOTIFY_FOUND_SS_URL") diff --git a/ShadowsocksX-NG/PreferencesWinController.swift b/ShadowsocksX-NG/PreferencesWinController.swift new file mode 100644 index 0000000..74a3746 --- /dev/null +++ b/ShadowsocksX-NG/PreferencesWinController.swift @@ -0,0 +1,34 @@ +// +// PreferencesWinController.swift +// ShadowsocksX-NG +// +// Created by 邱宇舟 on 2017/3/11. +// Copyright © 2017年 qiuyuzhou. All rights reserved. +// + +import Cocoa +import RxCocoa +import RxSwift + +class PreferencesWinController: NSWindowController { + + @IBOutlet weak var toolbar: NSToolbar! + @IBOutlet weak var tabView: NSTabView! + + override func windowDidLoad() { + super.windowDidLoad() + + // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. + toolbar.selectedItemIdentifier = "general" + } + + func windowWillClose(_ notification: Notification) { + NotificationCenter.default + .post(name: NOTIFY_CONF_CHANGED, object: nil) + } + + @IBAction func toolbarAction(sender: NSToolbarItem) { + tabView.selectTabViewItem(withIdentifier: sender.itemIdentifier) + } + +} diff --git a/ShadowsocksX-NG/PreferencesWinController.xib b/ShadowsocksX-NG/PreferencesWinController.xib new file mode 100644 index 0000000..52fea9a --- /dev/null +++ b/ShadowsocksX-NG/PreferencesWinController.xib @@ -0,0 +1,697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ShadowsocksX-NG/ProxyPreferencesController.swift b/ShadowsocksX-NG/ProxyInterfacesViewCtrl.swift similarity index 57% rename from ShadowsocksX-NG/ProxyPreferencesController.swift rename to ShadowsocksX-NG/ProxyInterfacesViewCtrl.swift index 82bab46..06d21d0 100644 --- a/ShadowsocksX-NG/ProxyPreferencesController.swift +++ b/ShadowsocksX-NG/ProxyInterfacesViewCtrl.swift @@ -1,31 +1,27 @@ // -// ProxyPreferencesController.swift +// ProxyInterfacesTableViewCtrl.swift // ShadowsocksX-NG // -// Created by 邱宇舟 on 16/6/29. -// Copyright © 2016年 qiuyuzhou. All rights reserved. +// Created by 邱宇舟 on 2017/3/17. +// Copyright © 2017年 qiuyuzhou. All rights reserved. // import Cocoa +import RxCocoa +import RxSwift -class ProxyPreferencesController: NSWindowController, NSTableViewDataSource, NSTableViewDelegate { +class ProxyInterfacesViewCtrl: NSViewController, NSTableViewDataSource, NSTableViewDelegate { var networkServices: NSArray! var selectedNetworkServices: NSMutableSet! - var autoConfigureNetworkServices: Bool = true + @IBOutlet weak var tableView: NSTableView! + @IBOutlet weak var autoConfigCheckBox: NSButton! - @IBOutlet var autoConfigCheckBox: NSButton! - - @IBOutlet var tableView: NSTableView! - - override func windowDidLoad() { - super.windowDidLoad() - - // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. - let defaults = UserDefaults.standard - self.setValue(defaults.bool(forKey: "AutoConfigureNetworkServices"), forKey: "autoConfigureNetworkServices") + override func viewDidLoad() { + super.viewDidLoad() + let defaults = UserDefaults.standard if let services = defaults.array(forKey: "Proxy4NetworkServices") { selectedNetworkServices = NSMutableSet(array: services) } else { @@ -35,26 +31,7 @@ class ProxyPreferencesController: NSWindowController, NSTableViewDataSource, NST networkServices = ProxyConfTool.networkServicesList() as NSArray! tableView.reloadData() } - - @IBAction func ok(_ sender: NSObject){ - ProxyConfHelper.disableProxy() - - let defaults = UserDefaults.standard - defaults.setValue(selectedNetworkServices.allObjects, forKeyPath: "Proxy4NetworkServices") - defaults.set(autoConfigureNetworkServices, forKey: "AutoConfigureNetworkServices") - - defaults.synchronize() - - window?.performClose(self) - - NotificationCenter.default - .post(name: Notification.Name(rawValue: NOTIFY_ADV_PROXY_CONF_CHANGED), object: nil) - } - - @IBAction func cancel(_ sender: NSObject){ - window?.performClose(self) - } - + //-------------------------------------------------- // For NSTableViewDataSource func numberOfRows(in tableView: NSTableView) -> Int { diff --git a/ShadowsocksX-NG/ShadowsocksX-NG-Bridging-Header.h b/ShadowsocksX-NG/ShadowsocksX-NG-Bridging-Header.h index 222e9be..db59115 100644 --- a/ShadowsocksX-NG/ShadowsocksX-NG-Bridging-Header.h +++ b/ShadowsocksX-NG/ShadowsocksX-NG-Bridging-Header.h @@ -6,7 +6,6 @@ #import "LaunchAtLoginController.h" #import "SWBQRCodeWindowController.h" -#import "ShortcutsPreferencesWindowController.h" #import "ShortcutsController.h" #import "Utils.h" #import "ProxyConfHelper.h" diff --git a/ShadowsocksX-NG/ShortcutsController.m b/ShadowsocksX-NG/ShortcutsController.m index a8dd302..e69200c 100644 --- a/ShadowsocksX-NG/ShortcutsController.m +++ b/ShadowsocksX-NG/ShortcutsController.m @@ -10,20 +10,18 @@ #import -#import "ShortcutsPreferencesWindowController.h" - @implementation ShortcutsController + (void)bindShortcuts { MASShortcutBinder* binder = [MASShortcutBinder sharedBinder]; [binder - bindShortcutWithDefaultsKey:kGlobalShortcutToggleRunning + bindShortcutWithDefaultsKey: @"ToggleRunning" toAction:^{ [[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_TOGGLE_RUNNING" object: nil]; }]; [binder - bindShortcutWithDefaultsKey:kGlobalShortcutSwitchProxyMode + bindShortcutWithDefaultsKey: @"SwitchProxyMode" toAction:^{ [[NSNotificationCenter defaultCenter] postNotificationName: @"NOTIFY_SWITCH_PROXY_MODE" object: nil]; }]; diff --git a/ShadowsocksX-NG/ShortcutsPreferencesWindowController.h b/ShadowsocksX-NG/ShortcutsPreferencesWindowController.h deleted file mode 100644 index f29a38b..0000000 --- a/ShadowsocksX-NG/ShortcutsPreferencesWindowController.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// ShortcutsPreferencesWindowController.h -// ShadowsocksX-NG -// -// Created by 邱宇舟 on 2017/3/10. -// Copyright © 2017年 qiuyuzhou. All rights reserved. -// - -#import -#import - - -static NSString *const kGlobalShortcutToggleRunning = @"ToggleRunning"; -static NSString *const kGlobalShortcutSwitchProxyMode= @"SwitchProxyMode"; - - -@interface ShortcutsPreferencesWindowController : NSWindowController - -@property(nonatomic, weak) IBOutlet MASShortcutView* toggleRunningShortcutCtrl; -@property(nonatomic, weak) IBOutlet MASShortcutView* switchModeShortcutCtrl; - -@end diff --git a/ShadowsocksX-NG/ShortcutsPreferencesWindowController.m b/ShadowsocksX-NG/ShortcutsPreferencesWindowController.m deleted file mode 100644 index 092c3e8..0000000 --- a/ShadowsocksX-NG/ShortcutsPreferencesWindowController.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// ShortcutsPreferencesWindowController.m -// ShadowsocksX-NG -// -// Created by 邱宇舟 on 2017/3/10. -// Copyright © 2017年 qiuyuzhou. All rights reserved. -// - -#import "ShortcutsPreferencesWindowController.h" - - -@interface ShortcutsPreferencesWindowController () - -@end - -@implementation ShortcutsPreferencesWindowController - -- (void)windowDidLoad { - [super windowDidLoad]; - - // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. - self.toggleRunningShortcutCtrl.associatedUserDefaultsKey = kGlobalShortcutToggleRunning; - self.switchModeShortcutCtrl.associatedUserDefaultsKey = kGlobalShortcutSwitchProxyMode; -} - -@end diff --git a/ShadowsocksX-NG/ShortcutsPreferencesWindowController.xib b/ShadowsocksX-NG/ShortcutsPreferencesWindowController.xib deleted file mode 100644 index 5d265a6..0000000 --- a/ShadowsocksX-NG/ShortcutsPreferencesWindowController.xib +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ShadowsocksX-NG/command-512.png b/ShadowsocksX-NG/command-512.png new file mode 100644 index 0000000..5f8084c Binary files /dev/null and b/ShadowsocksX-NG/command-512.png differ diff --git a/ShadowsocksX-NG/http.png b/ShadowsocksX-NG/http.png new file mode 100644 index 0000000..0fa9b96 Binary files /dev/null and b/ShadowsocksX-NG/http.png differ diff --git a/ShadowsocksX-NG/kcptun_1.png b/ShadowsocksX-NG/kcptun_1.png new file mode 100644 index 0000000..30913a2 Binary files /dev/null and b/ShadowsocksX-NG/kcptun_1.png differ diff --git a/ShadowsocksX-NG/virtual-server-icon-3.png b/ShadowsocksX-NG/virtual-server-icon-3.png new file mode 100644 index 0000000..2b7d5bd Binary files /dev/null and b/ShadowsocksX-NG/virtual-server-icon-3.png differ diff --git a/ShadowsocksX-NG/zh-Hans.lproj/AdvPreferencesWindowController.strings b/ShadowsocksX-NG/zh-Hans.lproj/AdvPreferencesWindowController.strings deleted file mode 100644 index f01ad9b..0000000 --- a/ShadowsocksX-NG/zh-Hans.lproj/AdvPreferencesWindowController.strings +++ /dev/null @@ -1,39 +0,0 @@ - -/* Class = "NSButtonCell"; title = "启用 Udp Relay"; ObjectID = "1C3-4s-Apd"; */ -"1C3-4s-Apd.title" = "启用 Udp Relay"; - -/* Class = "NSTextFieldCell"; title = "Don't change these preferences if you have no idea what are they."; ObjectID = "8wL-qv-5nD"; */ -"8wL-qv-5nD.title" = "如果你不明白这些选项是什么,请不要修改"; - -/* Class = "NSWindow"; title = "高级设置"; ObjectID = "F0z-JX-Cv5"; */ -"F0z-JX-Cv5.title" = "高级设置"; - -/* Class = "NSTextFieldCell"; title = "Seconds"; ObjectID = "Gd3-Fm-sWh"; */ -"Gd3-Fm-sWh.title" = "秒"; - -/* Class = "NSBox"; title = "Box"; ObjectID = "ayu-Tb-kmf"; */ -"ayu-Tb-kmf.title" = "Box"; - -/* Class = "NSTextFieldCell"; title = "本地 Socks5 监听地址:"; ObjectID = "cwr-n0-zwn"; */ -"cwr-n0-zwn.title" = "本地 Socks5 监听地址:"; - -/* Class = "NSTextFieldCell"; title = "GFW List URL:"; ObjectID = "dg0-gS-z5V"; */ -"dg0-gS-z5V.title" = "GFW LIST URL:"; - -/* Class = "NSTextFieldCell"; title = "Timeout:"; ObjectID = "i4l-2S-gOQ"; */ -"i4l-2S-gOQ.title" = "超时:"; - -/* Class = "NSTextFieldCell"; title = "本地 Socks5 监听端口:"; ObjectID = "qRs-ow-vVB"; */ -"qRs-ow-vVB.title" = "本地 Socks5 监听端口:"; - -/* Class = "NSTextFieldCell"; title = "Local PAC Listen Address:"; ObjectID = "dvL-Ic-Wae"; */ -"dvL-Ic-Wae.title" = "本地 PAC 监听地址:"; - -/* Class = "NSTextFieldCell"; title = "Local PAC Listen Port:"; ObjectID = "PSg-XK-qhl"; */ -"PSg-XK-qhl.title" = "本地 PAC 监听端口:"; - -/* Class = "NSTextFieldCell"; title = "White List URL:"; ObjectID = "aif-uV-Lxk"; */ -"aif-uV-Lxk.title" = "白名单列表 URL:"; - -/* Class = "NSTextFieldCell"; title = "White IP List URL:"; ObjectID = "qhu-d1-qgq"; */ -"qhu-d1-qgq.title" = "白名单IP列表 URL:"; diff --git a/ShadowsocksX-NG/zh-Hans.lproj/HTTPPreferencesWindowController.strings b/ShadowsocksX-NG/zh-Hans.lproj/HTTPPreferencesWindowController.strings deleted file mode 100644 index cc82ba2..0000000 --- a/ShadowsocksX-NG/zh-Hans.lproj/HTTPPreferencesWindowController.strings +++ /dev/null @@ -1,18 +0,0 @@ - -/* Class = "NSTextFieldCell"; title = "HTTP Proxy Listen Port:"; ObjectID = "2Sd-yn-gdY"; */ -"2Sd-yn-gdY.title" = "HTTP 代理 监听端口:"; - -/* Class = "NSButtonCell"; title = "HTTP Proxy Enable"; ObjectID = "dqU-MG-Sum"; */ -"dqU-MG-Sum.title" = "HTTP 代理 开启"; - -/* Class = "NSTextFieldCell"; title = "HTTP Proxy Listen Address:"; ObjectID = "qd0-kc-ttB"; */ -"qd0-kc-ttB.title" = "HTTP 代理 监听地址:"; - -/* Class = "NSWindow"; title = "HTTP Proxy Preferences"; ObjectID = "vS3-DL-Nq3"; */ -"vS3-DL-Nq3.title" = "HTTP 代理 设置"; - -/* Class = "NSButtonCell"; title = "Follow Global Mode"; ObjectID = "ofk-Pc-c8f"; */ -"ofk-Pc-c8f.title" = "跟随全局模式"; - -/* Class = "NSButton"; title = "Copy Shell Export Command"; ObjectID = "ySG-BC-5r0"; */ -"ySG-BC-5r0.title" = "复制终端 Export 命令"; diff --git a/ShadowsocksX-NG/zh-Hans.lproj/ProxyPreferencesController.strings b/ShadowsocksX-NG/zh-Hans.lproj/ProxyPreferencesController.strings deleted file mode 100644 index ca91ca2..0000000 --- a/ShadowsocksX-NG/zh-Hans.lproj/ProxyPreferencesController.strings +++ /dev/null @@ -1,13 +0,0 @@ - -/* Class = "NSWindow"; title = "Advanced Proxy Preferences"; ObjectID = "F0z-JX-Cv5"; */ -"F0z-JX-Cv5.title" = "高级代理设置"; - -/* Class = "NSButtonCell"; title = "Auto Configure"; ObjectID = "FLv-D9-CRw"; */ -"FLv-D9-CRw.title" = "自动设置"; - -/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "lsQ-1C-OhG"; */ -"lsQ-1C-OhG.title" = "取消"; - -/* Class = "NSButtonCell"; title = "OK"; ObjectID = "rWE-M6-TvV"; */ -"rWE-M6-TvV.title" = "确定"; -