Skip to content

Commit

Permalink
Fixed #10: Shadowsocks uri auth scheme case issue
Browse files Browse the repository at this point in the history
  • Loading branch information
icodesign committed Jun 27, 2016
1 parent f53bb3b commit 7fd4965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PotatsoModel/Proxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ extension Proxy {
if !(pc1 < pcm && pcm < pc2) {
throw ProxyError.InvalidUri
}
let fullAuthscheme = proxyString.substringWithRange(proxyString.startIndex..<pc1)
if let pOTA = proxyString.rangeOfString("-auth", options: .BackwardsSearch)?.startIndex {
let fullAuthscheme = proxyString.lowercaseString.substringWithRange(proxyString.startIndex..<pc1)
if let pOTA = fullAuthscheme.rangeOfString("-auth", options: .BackwardsSearch)?.startIndex {
self.authscheme = fullAuthscheme.substringToIndex(pOTA)
self.ota = true
}else {
Expand Down

0 comments on commit 7fd4965

Please sign in to comment.