Compare commits

...

4 Commits
3.1 ... 3.2

Author SHA1 Message Date
2dust
732da0c330 Update libs.zip 2019-12-18 13:13:06 +08:00
2dust
012bb5654b Update MainForm.cs 2019-12-18 13:13:00 +08:00
2dust
068fe3113b up test 2019-12-17 16:16:47 +08:00
2dust
4a74102eb7 Update ProxySetting.cs 2019-12-17 09:14:31 +08:00
8 changed files with 28 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ namespace v2rayN.Forms
{
public partial class MainForm : BaseForm
{
private V2rayHandler v2rayHandler;
private V2rayHandler v2rayHandler;
private List<int> lvSelecteds = new List<int>();
private StatisticsHandler statistics = null;
@@ -966,9 +966,9 @@ namespace v2rayN.Forms
}
private void ClearTestResult()
{
for (int k = 0; k < config.vmess.Count; k++)
for (int k = 0; k < lvSelecteds.Count; k++)
{
SetTestResult(k, "");
SetTestResult(lvSelecteds[k], "");
}
}
private void UpdateSpeedtestHandler(int index, string msg)

View File

@@ -182,6 +182,7 @@ namespace v2rayN.Handler
}
}
private void RunSpeedTest()
{
if (_config.vmess.Count <= 0)
@@ -244,7 +245,7 @@ namespace v2rayN.Handler
testCounter++;
var webProxy = new WebProxy(Global.Loopback, httpPort + index);
downloadHandle2.DownloadFileAsync(_config, url, webProxy, 30);
downloadHandle2.DownloadFileAsync(_config, url, webProxy, 20);
return 0;
}

View File

@@ -1398,6 +1398,8 @@ namespace v2rayN.Handler
msg = UIRes.I18N("InitialConfiguration");
Config configCopy = Utils.DeepCopy<Config>(config);
string result = Utils.GetEmbedText(SampleClient);
if (Utils.IsNullOrEmpty(result))
{
@@ -1412,21 +1414,21 @@ namespace v2rayN.Handler
return -1;
}
log(config, ref v2rayConfig, false);
log(configCopy, ref v2rayConfig, false);
//routing(config, ref v2rayConfig);
dns(config, ref v2rayConfig);
dns(configCopy, ref v2rayConfig);
var httpPort = config.GetLocalPort("speedtest");
var httpPort = configCopy.GetLocalPort("speedtest");
for (int k = 0; k < selecteds.Count; k++)
{
int index = selecteds[k];
if (config.vmess[index].configType == (int)EConfigType.Custom)
if (configCopy.vmess[index].configType == (int)EConfigType.Custom)
{
continue;
}
config.index = index;
configCopy.index = index;
var inbound = new Inbounds();
inbound.listen = Global.Loopback;
@@ -1437,7 +1439,7 @@ namespace v2rayN.Handler
var v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
outbound(config, ref v2rayConfigCopy);
outbound(configCopy, ref v2rayConfigCopy);
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]);
@@ -1450,7 +1452,7 @@ namespace v2rayN.Handler
Utils.ToJsonFile(v2rayConfig, fileName);
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), configCopy.getSummary());
}
catch (Exception ex)
{

View File

@@ -82,7 +82,7 @@ namespace v2rayN.HttpProxyHandler
}
}
list.options = optionsPtr;i
list.options = optionsPtr;
// and then make a pointer out of the whole list
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((int)list.dwSize);

Binary file not shown.

View File

@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
// 方法是按如下所示使用“*”:
//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("3.0")]
[assembly: AssemblyFileVersion("3.2")]

View File

@@ -77,8 +77,17 @@ namespace v2rayN.Tool
foreach (ZipArchiveEntry entry in archive.Entries)
{
if (entry.Length == 0)
{
continue;
entry.ExtractToFile(Utils.GetPath(entry.Name), true);
}
try
{
entry.ExtractToFile(Utils.GetPath(entry.Name), true);
}
catch (IOException ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
}
}

View File

@@ -62,9 +62,9 @@ namespace v2rayUpgrade
}
}
}
catch
catch (Exception ex)
{
MessageBox.Show("Upgrade Failed(升级失败)");
MessageBox.Show("Upgrade Failed(升级失败)." + ex.StackTrace);
return;
}