From 5fa65168ee9c2ac6a0074470faa9ccd283e437d1 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Sun, 25 Sep 2022 14:08:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=90=86=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E7=94=A8=E6=88=B7=E5=90=8D=E5=AF=86=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index e5a7efa..554eb5b 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -92,7 +92,15 @@ namespace N_m3u8DL_RE.CommandLine { if (string.IsNullOrEmpty(input)) return null; - return new WebProxy(new Uri(input)); + + var uri = new Uri(input); + var proxy = new WebProxy(uri, true); + if (uri.UserInfo != null) + { + var infos = uri.UserInfo.Split(':'); + proxy.Credentials = new NetworkCredential(infos.First(), infos.Last()); + } + return proxy; } catch (Exception ex) {