Compare commits

..

4 Commits
6.5 ... 6.6

Author SHA1 Message Date
2dust
5ceb638edf up 6.6 2023-01-09 20:04:24 +08:00
2dust
688b9ef5ee fix display 2023-01-09 20:03:39 +08:00
2dust
4909a557d5 Revert "Change the way to call the core in the speed test"
This reverts commit dd85ccd3f8.
2023-01-09 19:39:45 +08:00
2dust
75f63afadc bug fix 2023-01-08 09:24:09 +08:00
4 changed files with 15 additions and 22 deletions

View File

@@ -228,21 +228,15 @@ namespace v2rayN.Handler
string fileName = CoreFindexe(coreInfo);
if (fileName == "") return -1;
var pathTemp = Utils.GetConfigPath($"temp_{Utils.GetGUID(false)}.json");
File.WriteAllText(pathTemp, configStr);
if (!File.Exists(pathTemp))
{
return -1;
}
Process p = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = fileName,
Arguments = $"-config \"{pathTemp}\"",
Arguments = "-config stdin:",
WorkingDirectory = Utils.GetConfigPath(),
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
@@ -261,16 +255,15 @@ namespace v2rayN.Handler
p.Start();
p.BeginOutputReadLine();
p.StandardInput.Write(configStr);
p.StandardInput.Close();
if (p.WaitForExit(1000))
{
throw new Exception(p.StandardError.ReadToEnd());
}
Global.processJob.AddProcess(p.Handle);
Thread.Sleep(1000);
File.Delete(pathTemp);
return p.Id;
}
catch (Exception ex)

View File

@@ -112,8 +112,8 @@ namespace v2rayN.ViewModels
public ReactiveCommand<Unit, Unit> SubSettingCmd { get; }
public ReactiveCommand<Unit, Unit> AddSubCmd { get; }
public ReactiveCommand<Unit, Unit> SubUpdateCmd { get; }
public ReactiveCommand<Unit, Unit> SubGroupUpdateCmd { get; }
public ReactiveCommand<Unit, Unit> SubUpdateViaProxyCmd { get; }
public ReactiveCommand<Unit, Unit> SubGroupUpdateCmd { get; }
public ReactiveCommand<Unit, Unit> SubGroupUpdateViaProxyCmd { get; }
//Setting
@@ -388,13 +388,13 @@ namespace v2rayN.ViewModels
{
UpdateSubscriptionProcess("", false);
});
SubGroupUpdateCmd = ReactiveCommand.Create(() =>
{
UpdateSubscriptionProcess(_subId, true);
});
SubUpdateViaProxyCmd = ReactiveCommand.Create(() =>
{
UpdateSubscriptionProcess("", false);
UpdateSubscriptionProcess("", true);
});
SubGroupUpdateCmd = ReactiveCommand.Create(() =>
{
UpdateSubscriptionProcess(_subId, false);
});
SubGroupUpdateViaProxyCmd = ReactiveCommand.Create(() =>
{
@@ -706,8 +706,8 @@ namespace v2rayN.ViewModels
subRemarks = t.subRemarks,
isActive = t.isActive,
delay = t.delay,
delayVal = t.delay > 0 ? $"{t.delay} {Global.DelayUnit}" : string.Empty,
speedVal = t.speed > 0 ? $"{t.speed} {Global.SpeedUnit}" : string.Empty,
delayVal = t.delay != 0 ? $"{t.delay} {Global.DelayUnit}" : string.Empty,
speedVal = t.speed != 0 ? $"{t.speed} {Global.SpeedUnit}" : string.Empty,
todayDown = t22 == null ? "" : Utils.HumanFy(t22.todayDown),
todayUp = t22 == null ? "" : Utils.HumanFy(t22.todayUp),
totalDown = t22 == null ? "" : Utils.HumanFy(t22.totalDown),

View File

@@ -103,8 +103,8 @@ namespace v2rayN.Views
//sub
this.BindCommand(ViewModel, vm => vm.SubSettingCmd, v => v.menuSubSetting).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.SubUpdateCmd, v => v.menuSubUpdate).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.SubGroupUpdateCmd, v => v.menuSubGroupUpdate).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.SubUpdateViaProxyCmd, v => v.menuSubUpdateViaProxy).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.SubGroupUpdateCmd, v => v.menuSubGroupUpdate).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.SubGroupUpdateViaProxyCmd, v => v.menuSubGroupUpdateViaProxy).DisposeWith(disposables);
//setting

View File

@@ -9,7 +9,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
<FileVersion>6.5</FileVersion>
<FileVersion>6.6</FileVersion>
</PropertyGroup>
<ItemGroup>