mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-15 20:58:07 +00:00
up webproxy
This commit is contained in:
parent
a922d3c46d
commit
9224ea9819
4 changed files with 1007 additions and 419 deletions
|
@ -362,7 +362,7 @@ namespace v2rayN.Forms
|
||||||
color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange })[index - 1];
|
color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange })[index - 1];
|
||||||
//color = ColorTranslator.FromHtml(new string[] { "#CC0066", "#CC6600", "#99CC99", "#666699" }[index - 1]);
|
//color = ColorTranslator.FromHtml(new string[] { "#CC0066", "#CC6600", "#99CC99", "#666699" }[index - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var width = 128;
|
var width = 128;
|
||||||
var height = 128;
|
var height = 128;
|
||||||
|
|
||||||
|
@ -1044,7 +1044,7 @@ namespace v2rayN.Forms
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 后台测速
|
#region 后台测速
|
||||||
|
|
||||||
private void SetTestResult(int k, string txt)
|
private void SetTestResult(int k, string txt)
|
||||||
{
|
{
|
||||||
config.vmess[k].testResult = txt;
|
config.vmess[k].testResult = txt;
|
||||||
|
@ -1298,7 +1298,7 @@ namespace v2rayN.Forms
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
v2rayUpdateHandle.DownloadFileAsync(config, url);
|
v2rayUpdateHandle.DownloadFileAsync(config, url, false);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -1536,6 +1536,6 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -232,7 +232,7 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
testCounter++;
|
testCounter++;
|
||||||
|
|
||||||
v2rayUpdateHandle2.DownloadFileAsync(_config, url);
|
v2rayUpdateHandle2.DownloadFileAsync(_config, url,true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void DownloadFileAsync(Config config, string url)
|
public void DownloadFileAsync(Config config, string url, bool blProxy)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,10 @@ namespace v2rayN.Handler
|
||||||
progressPercentage = -1;
|
progressPercentage = -1;
|
||||||
|
|
||||||
WebClientEx ws = new WebClientEx();
|
WebClientEx ws = new WebClientEx();
|
||||||
ws.Proxy = new WebProxy(Global.Loopback, Global.sysAgentPort);
|
if (blProxy)
|
||||||
|
{
|
||||||
|
ws.Proxy = new WebProxy(Global.Loopback, Global.sysAgentPort);
|
||||||
|
}
|
||||||
|
|
||||||
ws.DownloadFileCompleted += ws_DownloadFileCompleted;
|
ws.DownloadFileCompleted += ws_DownloadFileCompleted;
|
||||||
ws.DownloadProgressChanged += ws_DownloadProgressChanged;
|
ws.DownloadProgressChanged += ws_DownloadProgressChanged;
|
||||||
|
|
Loading…
Reference in a new issue