diff --git a/ShadowsocksX-NG/HTTPUserProxy.swift b/ShadowsocksX-NG/HTTPUserProxy.swift index cfc4c15b..6cb19e46 100644 --- a/ShadowsocksX-NG/HTTPUserProxy.swift +++ b/ShadowsocksX-NG/HTTPUserProxy.swift @@ -12,7 +12,7 @@ import GCDWebServer class HTTPUserProxy{ static let shard = HTTPUserProxy() - let adapter = APIAdapter() + let adapter = AppFacade() let server = GCDWebServer() let api_port:UInt = 9528 @@ -183,10 +183,10 @@ class HTTPUserProxy{ } } -class APIAdapter { - let SerMgr = ServerProfileManager.instance - let defaults = UserDefaults.standard - let appdeleget = NSApplication.shared.delegate as! AppDelegate +class AppFacade { + private let SerMgr = ServerProfileManager.instance + private let defaults = UserDefaults.standard + private let appdeleget = NSApplication.shared.delegate as! AppDelegate func getStatus()->Bool { return self.defaults.bool(forKey: "ShadowsocksOn");