diff --git a/ShadowsocksX-NG/ServerProfile.swift b/ShadowsocksX-NG/ServerProfile.swift index 1c149ab..e67788e 100644 --- a/ShadowsocksX-NG/ServerProfile.swift +++ b/ShadowsocksX-NG/ServerProfile.swift @@ -39,10 +39,6 @@ class ServerProfile: NSObject { profile.serverPort = (data["ServerPort"] as! NSNumber).unsignedShortValue profile.method = data["Method"] as! String profile.password = data["Password"] as! String - profile.ssrObfs = data["ssrObfs"] as! String - profile.ssrObfsParam = data["ssrObfsParam"] as! String - profile.ssrProtocol = data["ssrProtocol"] as! String - profile.ssrProtocolParam = data["ssrProtocolParam"] as! String if let remark = data["Remark"] { profile.remark = remark as! String @@ -50,6 +46,15 @@ class ServerProfile: NSObject { if let ota = data["OTA"] { profile.ota = ota as! Bool } + if let ssrObfs = data["ssrObfs"] { + profile.ssrObfs = ssrObfs as! String + } + if let ssrObfsParam = data["ssrObfsParam"] { + profile.ssrObfsParam = ssrObfsParam as! String + } + if let ssrProtocol = data["ssrProtocol"] { + profile.ssrProtocol = ssrProtocol as! String + } if let ssrProtocolParam = data["ssrProtocolParam"]{ profile.ssrProtocolParam = ssrProtocolParam as! String }