Skip to content

Commit

Permalink
#241: Send proxy username and password to youtube-dl.
Browse files Browse the repository at this point in the history
  • Loading branch information
skovatch committed Apr 25, 2019
1 parent b28cef4 commit 8ef00a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions ITVDownload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,20 @@ public class ITVDownload : Download {
if verbose {
args.append("--verbose")
}

if let proxyHost = self.proxy?.host {
var proxyString = proxyHost
var proxyString = ""

if let user = self.proxy?.user, let password = self.proxy?.password {
proxyString += "\(user):\(password)@"
}

proxyString += proxyHost

if let port = self.proxy?.port {
proxyString += ":\(port)"
}

args.append("--proxy")
args.append(proxyString)
}
Expand Down
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>20190331001</string>
<string>20190424001</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSAppTransportSecurity</key>
Expand Down

0 comments on commit 8ef00a0

Please sign in to comment.