修复代理解析用户名密码问题
This commit is contained in:
parent
24ea28a44b
commit
5fa65168ee
|
@ -92,7 +92,15 @@ namespace N_m3u8DL_RE.CommandLine
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(input))
|
if (string.IsNullOrEmpty(input))
|
||||||
return null;
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue