mirror of https://github.com/2dust/v2rayN
Code clean
parent
258e822c13
commit
e0eb73bb0a
|
@ -46,7 +46,7 @@
|
||||||
public const string ClashMixinYaml = NamespaceSample + "clash_mixin_yaml";
|
public const string ClashMixinYaml = NamespaceSample + "clash_mixin_yaml";
|
||||||
public const string ClashTunYaml = NamespaceSample + "clash_tun_yaml";
|
public const string ClashTunYaml = NamespaceSample + "clash_tun_yaml";
|
||||||
public const string LinuxAutostartConfig = NamespaceSample + "linux_autostart_config";
|
public const string LinuxAutostartConfig = NamespaceSample + "linux_autostart_config";
|
||||||
|
|
||||||
public const string DefaultSecurity = "auto";
|
public const string DefaultSecurity = "auto";
|
||||||
public const string DefaultNetwork = "tcp";
|
public const string DefaultNetwork = "tcp";
|
||||||
public const string TcpHeaderHttp = "http";
|
public const string TcpHeaderHttp = "http";
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace ServiceLib.Handler
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var logonUser = WindowsIdentity.GetCurrent().Name;
|
var logonUser = WindowsIdentity.GetCurrent().Name;
|
||||||
using var taskService = new Microsoft.Win32.TaskScheduler.TaskService();
|
using var taskService = new Microsoft.Win32.TaskScheduler.TaskService();
|
||||||
var tasks = taskService.RootFolder.GetTasks(new Regex(taskName));
|
var tasks = taskService.RootFolder.GetTasks(new Regex(taskName));
|
||||||
|
|
|
@ -1197,7 +1197,7 @@ namespace ServiceLib.Handler
|
||||||
{
|
{
|
||||||
await RemoveServerViaSubid(config, subid, isSub);
|
await RemoveServerViaSubid(config, subid, isSub);
|
||||||
}
|
}
|
||||||
|
|
||||||
profileItem.Subid = subid;
|
profileItem.Subid = subid;
|
||||||
profileItem.IsSub = isSub;
|
profileItem.IsSub = isSub;
|
||||||
profileItem.PreSocksPort = preSocksPort;
|
profileItem.PreSocksPort = preSocksPort;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
|
||||||
namespace ServiceLib.Services
|
namespace ServiceLib.Services
|
||||||
{
|
{
|
||||||
public class SpeedtestService
|
public class SpeedtestService
|
||||||
|
@ -85,7 +86,7 @@ namespace ServiceLib.Services
|
||||||
|
|
||||||
private void ExitLoop(string x)
|
private void ExitLoop(string x)
|
||||||
{
|
{
|
||||||
if(_exitLoop) return;
|
if (_exitLoop) return;
|
||||||
_exitLoop = true;
|
_exitLoop = true;
|
||||||
UpdateFunc("", ResUI.SpeedtestingStop);
|
UpdateFunc("", ResUI.SpeedtestingStop);
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,7 +273,7 @@ namespace ServiceLib.ViewModels
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Locator.Current.GetService<StatusBarViewModel>()?.UpdateStatistics(update);
|
Locator.Current.GetService<StatusBarViewModel>()?.UpdateStatistics(update);
|
||||||
if ((update.ProxyUp + update.ProxyDown) > 0 && DateTime.Now.Second % 3 == 0)
|
if ((update.ProxyUp + update.ProxyDown) > 0 && DateTime.Now.Second % 9 == 0)
|
||||||
{
|
{
|
||||||
Locator.Current.GetService<ProfilesViewModel>()?.UpdateStatistics(update);
|
Locator.Current.GetService<ProfilesViewModel>()?.UpdateStatistics(update);
|
||||||
}
|
}
|
||||||
|
|
|
@ -686,7 +686,6 @@ namespace ServiceLib.ViewModels
|
||||||
//ClearTestResult();
|
//ClearTestResult();
|
||||||
|
|
||||||
_ = new SpeedtestService(_config, lstSelecteds, actionType, UpdateSpeedtestHandler);
|
_ = new SpeedtestService(_config, lstSelecteds, actionType, UpdateSpeedtestHandler);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ServerSpeedtestStop()
|
public void ServerSpeedtestStop()
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace v2rayN.Desktop.Views
|
||||||
{
|
{
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case EViewAction.CloseWindow:
|
case EViewAction.CloseWindow:
|
||||||
this.Close(true);
|
this.Close(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue