From d4305d4ab465378e235cc155ab92424c0d369ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E5=AE=87=E8=88=AA?= Date: Sun, 23 Jul 2017 23:43:15 +0800 Subject: [PATCH] fix Method Obfs Protocol upcase problem, make it lowcased --- ShadowsocksX-NG/ServerProfile.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ShadowsocksX-NG/ServerProfile.swift b/ShadowsocksX-NG/ServerProfile.swift index d88cea6..bd80833 100644 --- a/ShadowsocksX-NG/ServerProfile.swift +++ b/ShadowsocksX-NG/ServerProfile.swift @@ -40,20 +40,20 @@ class ServerProfile: NSObject { (profile: ServerProfile) in profile.serverHost = data["ServerHost"] as! String profile.serverPort = (data["ServerPort"] as! NSNumber).uint16Value - profile.method = data["Method"] as! String + profile.method = (data["Method"] as! String).lowercased() profile.password = data["Password"] as! String if let remark = data["Remark"] { profile.remark = remark as! String } if let ssrObfs = data["ssrObfs"] { - profile.ssrObfs = ssrObfs as! String + profile.ssrObfs = (ssrObfs as! String).lowercased() } if let ssrObfsParam = data["ssrObfsParam"] { profile.ssrObfsParam = ssrObfsParam as! String } if let ssrProtocol = data["ssrProtocol"] { - profile.ssrProtocol = ssrProtocol as! String + profile.ssrProtocol = (ssrProtocol as! String).lowercased() } if let ssrProtocolParam = data["ssrProtocolParam"]{ profile.ssrProtocolParam = ssrProtocolParam as! String