mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-21 06:55:46 +00:00
- Update Project and Libraries to .Net 7
- Update Nuget Packages - Update Namespaces to C# 10 Style - Change BinaryFormatter to XmlSerializer
This commit is contained in:
parent
4f30e3f0e3
commit
e1cd0bbf63
86 changed files with 14564 additions and 14665 deletions
|
|
@ -1,10 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="Resources.Designer.cs">
|
<Compile Update="Resources.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
|
|
@ -16,5 +14,4 @@
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,20 +1,17 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Protobuf Include="Statistics.proto" />
|
<Protobuf Include="Statistics.proto" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.24.2" />
|
||||||
<PackageReference Include="Grpc.Net.Client" Version="2.54.0" />
|
<PackageReference Include="Grpc.Net.Client" Version="2.56.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.54.0">
|
<PackageReference Include="Grpc.Tools" Version="2.57.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
using ProtosLib.Statistics;
|
using ProtosLib.Statistics;
|
||||||
|
|
||||||
namespace ProtosLib
|
namespace ProtosLib;
|
||||||
|
|
||||||
|
public class Tests
|
||||||
{
|
{
|
||||||
public class Tests
|
|
||||||
{
|
|
||||||
private StatsService.StatsServiceClient client_;
|
private StatsService.StatsServiceClient client_;
|
||||||
|
|
||||||
public Tests()
|
public Tests()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -4,13 +4,13 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
|
|
||||||
namespace v2rayN
|
namespace v2rayN;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for App.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for App.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class App : Application
|
|
||||||
{
|
|
||||||
public static EventWaitHandle ProgramStarted;
|
public static EventWaitHandle ProgramStarted;
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
|
|
||||||
|
|
@ -86,5 +86,4 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
|
Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
namespace v2rayN.Base
|
namespace v2rayN.Base;
|
||||||
|
|
||||||
|
internal class DownloaderHelper
|
||||||
{
|
{
|
||||||
internal class DownloaderHelper
|
|
||||||
{
|
|
||||||
private static readonly Lazy<DownloaderHelper> _instance = new(() => new());
|
private static readonly Lazy<DownloaderHelper> _instance = new(() => new());
|
||||||
public static DownloaderHelper Instance => _instance.Value;
|
public static DownloaderHelper Instance => _instance.Value;
|
||||||
|
|
||||||
|
|
@ -177,5 +177,4 @@ namespace v2rayN.Base
|
||||||
|
|
||||||
downloadOpt = null;
|
downloadOpt = null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,12 +3,12 @@ using System.Net.Http;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace v2rayN.Base
|
namespace v2rayN.Base;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// </summary>
|
||||||
|
public class HttpClientHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// </summary>
|
|
||||||
public class HttpClientHelper
|
|
||||||
{
|
|
||||||
private static readonly Lazy<HttpClientHelper> _instance = new(() =>
|
private static readonly Lazy<HttpClientHelper> _instance = new(() =>
|
||||||
{
|
{
|
||||||
HttpClientHandler handler = new() { UseCookies = false };
|
HttpClientHandler handler = new() { UseCookies = false };
|
||||||
|
|
@ -152,5 +152,4 @@ namespace v2rayN.Base
|
||||||
}
|
}
|
||||||
} while (isMoreToRead);
|
} while (isMoreToRead);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace v2rayN.Base
|
namespace v2rayN.Base;
|
||||||
|
|
||||||
|
internal class MyDGTextColumn : DataGridTextColumn
|
||||||
{
|
{
|
||||||
internal class MyDGTextColumn : DataGridTextColumn
|
|
||||||
{
|
|
||||||
public string ExName { get; set; }
|
public string ExName { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace v2rayN.Base
|
namespace v2rayN.Base;
|
||||||
|
|
||||||
|
public sealed class SqliteHelper
|
||||||
{
|
{
|
||||||
public sealed class SqliteHelper
|
|
||||||
{
|
|
||||||
private static readonly Lazy<SqliteHelper> _instance = new(() => new());
|
private static readonly Lazy<SqliteHelper> _instance = new(() => new());
|
||||||
public static SqliteHelper Instance => _instance.Value;
|
public static SqliteHelper Instance => _instance.Value;
|
||||||
private string _connstr;
|
private string _connstr;
|
||||||
|
|
@ -118,5 +118,4 @@ namespace v2rayN.Base
|
||||||
{
|
{
|
||||||
return _dbAsync.Table<T>();
|
return _dbAsync.Table<T>();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace v2rayN.Base
|
namespace v2rayN.Base;
|
||||||
|
|
||||||
|
internal static class StringEx
|
||||||
{
|
{
|
||||||
internal static class StringEx
|
|
||||||
{
|
|
||||||
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
|
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
|
||||||
{
|
{
|
||||||
return string.IsNullOrEmpty(value);
|
return string.IsNullOrEmpty(value);
|
||||||
|
|
@ -80,5 +80,4 @@ namespace v2rayN.Base
|
||||||
|
|
||||||
return char.ToUpper(value[0]) + value.Substring(1);
|
return char.ToUpper(value[0]) + value.Substring(1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace v2rayN.Converters
|
namespace v2rayN.Converters;
|
||||||
|
|
||||||
|
public class DelayColorConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public class DelayColorConverter : IValueConverter
|
|
||||||
{
|
|
||||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||||
{
|
{
|
||||||
int.TryParse(value.ToString(), out var delay);
|
int.TryParse(value.ToString(), out var delay);
|
||||||
|
|
@ -21,5 +21,4 @@ namespace v2rayN.Converters
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
|
|
||||||
namespace v2rayN.Converters
|
namespace v2rayN.Converters;
|
||||||
|
|
||||||
|
[ValueConversion(typeof(bool), typeof(bool))]
|
||||||
|
public class InverseBooleanConverter : IValueConverter
|
||||||
{
|
{
|
||||||
[ValueConversion(typeof(bool), typeof(bool))]
|
|
||||||
public class InverseBooleanConverter : IValueConverter
|
|
||||||
{
|
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
if (targetType != typeof(bool))
|
if (targetType != typeof(bool))
|
||||||
|
|
@ -20,5 +20,4 @@ namespace v2rayN.Converters
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
|
|
||||||
namespace v2rayN.Converters
|
namespace v2rayN.Converters;
|
||||||
|
|
||||||
|
public class MaterialDesignFonts
|
||||||
{
|
{
|
||||||
public class MaterialDesignFonts
|
|
||||||
{
|
|
||||||
public static FontFamily MyFont { get; }
|
public static FontFamily MyFont { get; }
|
||||||
|
|
||||||
static MaterialDesignFonts()
|
static MaterialDesignFonts()
|
||||||
|
|
@ -23,5 +23,4 @@ namespace v2rayN.Converters
|
||||||
}
|
}
|
||||||
MyFont ??= new FontFamily("Microsoft YaHei");
|
MyFont ??= new FontFamily("Microsoft YaHei");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
namespace v2rayN
|
namespace v2rayN;
|
||||||
|
|
||||||
|
internal class Global
|
||||||
{
|
{
|
||||||
internal class Global
|
|
||||||
{
|
|
||||||
#region const
|
#region const
|
||||||
|
|
||||||
public const string githubUrl = "https://github.com";
|
public const string githubUrl = "https://github.com";
|
||||||
|
|
@ -170,5 +170,4 @@
|
||||||
public static string ExePathKey { get; set; }
|
public static string ExePathKey { get; set; }
|
||||||
|
|
||||||
#endregion global variable
|
#endregion global variable
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,13 @@ using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 本软件配置文件处理类
|
||||||
|
/// </summary>
|
||||||
|
internal class ConfigHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 本软件配置文件处理类
|
|
||||||
/// </summary>
|
|
||||||
internal class ConfigHandler
|
|
||||||
{
|
|
||||||
private static string configRes = Global.ConfigFileName;
|
private static string configRes = Global.ConfigFileName;
|
||||||
private static readonly object objLock = new();
|
private static readonly object objLock = new();
|
||||||
|
|
||||||
|
|
@ -1621,5 +1621,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion DNS
|
#endregion DNS
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,13 +2,13 @@
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Core configuration file processing class
|
||||||
|
/// </summary>
|
||||||
|
internal class CoreConfigHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Core configuration file processing class
|
|
||||||
/// </summary>
|
|
||||||
internal class CoreConfigHandler
|
|
||||||
{
|
|
||||||
public static int GenerateClientConfig(ProfileItem node, string? fileName, out string msg, out string content)
|
public static int GenerateClientConfig(ProfileItem node, string? fileName, out string msg, out string content)
|
||||||
{
|
{
|
||||||
content = string.Empty;
|
content = string.Empty;
|
||||||
|
|
@ -152,5 +152,4 @@ namespace v2rayN.Handler
|
||||||
var coreConfigV2ray = new CoreConfigV2ray(config);
|
var coreConfigV2ray = new CoreConfigV2ray(config);
|
||||||
return coreConfigV2ray.GenerateClientSpeedtestConfigString(selecteds, out msg);
|
return coreConfigV2ray.GenerateClientSpeedtestConfigString(selecteds, out msg);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class CoreConfigSingbox
|
||||||
{
|
{
|
||||||
internal class CoreConfigSingbox
|
|
||||||
{
|
|
||||||
private string SampleClient = Global.SingboxSampleClient;
|
private string SampleClient = Global.SingboxSampleClient;
|
||||||
private Config _config;
|
private Config _config;
|
||||||
|
|
||||||
|
|
@ -736,5 +736,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -4,10 +4,10 @@ using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class CoreConfigV2ray
|
||||||
{
|
{
|
||||||
internal class CoreConfigV2ray
|
|
||||||
{
|
|
||||||
private string SampleClient = Global.v2raySampleClient;
|
private string SampleClient = Global.v2raySampleClient;
|
||||||
private Config _config;
|
private Config _config;
|
||||||
|
|
||||||
|
|
@ -945,5 +945,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Gen speedtest config
|
#endregion Gen speedtest config
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -4,13 +4,13 @@ using System.Text;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Core process processing class
|
||||||
|
/// </summary>
|
||||||
|
internal class CoreHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Core process processing class
|
|
||||||
/// </summary>
|
|
||||||
internal class CoreHandler
|
|
||||||
{
|
|
||||||
private Config _config;
|
private Config _config;
|
||||||
private Process? _process;
|
private Process? _process;
|
||||||
private Process? _processPre;
|
private Process? _processPre;
|
||||||
|
|
@ -358,5 +358,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Process
|
#endregion Process
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -7,13 +7,13 @@ using System.Net.Sockets;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///Download
|
||||||
|
/// </summary>
|
||||||
|
internal class DownloadHandle
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
///Download
|
|
||||||
/// </summary>
|
|
||||||
internal class DownloadHandle
|
|
||||||
{
|
|
||||||
public event EventHandler<ResultEventArgs>? UpdateCompleted;
|
public event EventHandler<ResultEventArgs>? UpdateCompleted;
|
||||||
|
|
||||||
public event ErrorEventHandler? Error;
|
public event ErrorEventHandler? Error;
|
||||||
|
|
@ -335,5 +335,4 @@ namespace v2rayN.Handler
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -7,10 +7,10 @@ using System.Windows.Interop;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
public sealed class HotkeyHandler
|
||||||
{
|
{
|
||||||
public sealed class HotkeyHandler
|
|
||||||
{
|
|
||||||
private static readonly Lazy<HotkeyHandler> _instance = new(() => new());
|
private static readonly Lazy<HotkeyHandler> _instance = new(() => new());
|
||||||
public static HotkeyHandler Instance = _instance.Value;
|
public static HotkeyHandler Instance = _instance.Value;
|
||||||
|
|
||||||
|
|
@ -176,5 +176,4 @@ namespace v2rayN.Handler
|
||||||
Win = 0x0008,
|
Win = 0x0008,
|
||||||
NoRepeat = 0x4000
|
NoRepeat = 0x4000
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
public sealed class LazyConfig
|
||||||
{
|
{
|
||||||
public sealed class LazyConfig
|
|
||||||
{
|
|
||||||
private static readonly Lazy<LazyConfig> _instance = new(() => new());
|
private static readonly Lazy<LazyConfig> _instance = new(() => new());
|
||||||
private Config _config;
|
private Config _config;
|
||||||
private List<CoreInfo> coreInfos;
|
private List<CoreInfo> coreInfos;
|
||||||
|
|
@ -364,5 +364,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Core Type
|
#endregion Core Type
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ using System.Windows.Media.Imaging;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
public sealed class MainFormHandler
|
||||||
{
|
{
|
||||||
public sealed class MainFormHandler
|
|
||||||
{
|
|
||||||
private static readonly Lazy<MainFormHandler> instance = new(() => new());
|
private static readonly Lazy<MainFormHandler> instance = new(() => new());
|
||||||
public static MainFormHandler Instance => instance.Value;
|
public static MainFormHandler Instance => instance.Value;
|
||||||
|
|
||||||
|
|
@ -224,5 +224,4 @@ namespace v2rayN.Handler
|
||||||
HotkeyHandler.Instance.HotkeyTriggerEvent += handler;
|
HotkeyHandler.Instance.HotkeyTriggerEvent += handler;
|
||||||
HotkeyHandler.Instance.Load();
|
HotkeyHandler.Instance.Load();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using MaterialDesignThemes.Wpf;
|
using MaterialDesignThemes.Wpf;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
public class NoticeHandler
|
||||||
{
|
{
|
||||||
public class NoticeHandler
|
|
||||||
{
|
|
||||||
private readonly ISnackbarMessageQueue _snackbarMessageQueue;
|
private readonly ISnackbarMessageQueue _snackbarMessageQueue;
|
||||||
|
|
||||||
public NoticeHandler(ISnackbarMessageQueue snackbarMessageQueue)
|
public NoticeHandler(ISnackbarMessageQueue snackbarMessageQueue)
|
||||||
|
|
@ -29,5 +29,4 @@ namespace v2rayN.Handler
|
||||||
msg = $"{DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")} {msg}";
|
msg = $"{DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")} {msg}";
|
||||||
MessageBus.Current.SendMessage(msg, "MsgView");
|
MessageBus.Current.SendMessage(msg, "MsgView");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,10 +3,10 @@ using System.Reactive.Linq;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class ProfileExHandler
|
||||||
{
|
{
|
||||||
internal class ProfileExHandler
|
|
||||||
{
|
|
||||||
private static readonly Lazy<ProfileExHandler> _instance = new(() => new());
|
private static readonly Lazy<ProfileExHandler> _instance = new(() => new());
|
||||||
private ConcurrentBag<ProfileExItem> _lstProfileEx;
|
private ConcurrentBag<ProfileExItem> _lstProfileEx;
|
||||||
private Queue<string> _queIndexIds = new();
|
private Queue<string> _queIndexIds = new();
|
||||||
|
|
@ -141,5 +141,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
return _lstProfileEx.Max(t => t == null ? 0 : t.sort);
|
return _lstProfileEx.Max(t => t == null ? 0 : t.sort);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class ProxySetting
|
||||||
{
|
{
|
||||||
internal class ProxySetting
|
|
||||||
{
|
|
||||||
public static bool UnsetProxy()
|
public static bool UnsetProxy()
|
||||||
{
|
{
|
||||||
return SetProxy(null, null, 1);
|
return SetProxy(null, null, 1);
|
||||||
|
|
@ -212,5 +212,4 @@ namespace v2rayN.Handler
|
||||||
string ProxyServer = rk.GetValue("ProxyServer").ToString();
|
string ProxyServer = rk.GetValue("ProxyServer").ToString();
|
||||||
return ProxyServer;
|
return ProxyServer;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,13 +2,9 @@
|
||||||
using QRCoder.Xaml;
|
using QRCoder.Xaml;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
public class QRCodeHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 含有QR码的描述类和包装编码和渲染
|
|
||||||
/// </summary>
|
|
||||||
public class QRCodeHelper
|
|
||||||
{
|
|
||||||
public static DrawingImage? GetQRCode(string strContent)
|
public static DrawingImage? GetQRCode(string strContent)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
@ -24,5 +20,4 @@ namespace v2rayN.Handler
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class ShareHandler
|
||||||
{
|
{
|
||||||
internal class ShareHandler
|
|
||||||
{
|
|
||||||
#region GetShareUrl
|
#region GetShareUrl
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -813,5 +813,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion ImportShareUrl
|
#endregion ImportShareUrl
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ using System.Net.Sockets;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class SpeedtestHandler
|
||||||
{
|
{
|
||||||
internal class SpeedtestHandler
|
|
||||||
{
|
|
||||||
private Config _config;
|
private Config _config;
|
||||||
private CoreHandler _coreHandler;
|
private CoreHandler _coreHandler;
|
||||||
private List<ServerTestItem> _selecteds;
|
private List<ServerTestItem> _selecteds;
|
||||||
|
|
@ -423,5 +423,4 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
_updateFunc(indexId, delay, speed);
|
_updateFunc(indexId, delay, speed);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,10 +3,10 @@ using System.Net.Sockets;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class StatisticsHandler
|
||||||
{
|
{
|
||||||
internal class StatisticsHandler
|
|
||||||
{
|
|
||||||
private Config _config;
|
private Config _config;
|
||||||
private ServerStatItem? _serverStatItem;
|
private ServerStatItem? _serverStatItem;
|
||||||
private List<ServerStatItem> _lstServerStat;
|
private List<ServerStatItem> _lstServerStat;
|
||||||
|
|
@ -157,5 +157,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
return 69090;
|
return 69090;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class StatisticsSingbox
|
||||||
{
|
{
|
||||||
internal class StatisticsSingbox
|
|
||||||
{
|
|
||||||
private Config _config;
|
private Config _config;
|
||||||
private bool _exitFlag;
|
private bool _exitFlag;
|
||||||
private ClientWebSocket? webSocket;
|
private ClientWebSocket? webSocket;
|
||||||
|
|
@ -124,5 +124,4 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,10 +3,10 @@ using Grpc.Net.Client;
|
||||||
using ProtosLib.Statistics;
|
using ProtosLib.Statistics;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class StatisticsV2ray
|
||||||
{
|
{
|
||||||
internal class StatisticsV2ray
|
|
||||||
{
|
|
||||||
private Mode.Config _config;
|
private Mode.Config _config;
|
||||||
private GrpcChannel _channel;
|
private GrpcChannel _channel;
|
||||||
private StatsService.StatsServiceClient _client;
|
private StatsService.StatsServiceClient _client;
|
||||||
|
|
@ -115,5 +115,4 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,10 @@ using v2rayN.Mode;
|
||||||
using v2rayN.Properties;
|
using v2rayN.Properties;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
public static class SysProxyHandle
|
||||||
{
|
{
|
||||||
public static class SysProxyHandle
|
|
||||||
{
|
|
||||||
//private const string _userWininetConfigFile = "user-wininet.json";
|
//private const string _userWininetConfigFile = "user-wininet.json";
|
||||||
|
|
||||||
//private static string _queryStr;
|
//private static string _queryStr;
|
||||||
|
|
@ -218,5 +218,4 @@ namespace v2rayN.Handler
|
||||||
// _queryStr = stdout;
|
// _queryStr = stdout;
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -11,10 +11,10 @@ using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
|
|
||||||
|
internal class UpdateHandle
|
||||||
{
|
{
|
||||||
internal class UpdateHandle
|
|
||||||
{
|
|
||||||
private Action<bool, string> _updateFunc;
|
private Action<bool, string> _updateFunc;
|
||||||
private Config _config;
|
private Config _config;
|
||||||
|
|
||||||
|
|
@ -642,5 +642,4 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion private
|
#endregion private
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public class ComboItem
|
||||||
{
|
{
|
||||||
public class ComboItem
|
|
||||||
{
|
|
||||||
public string ID
|
public string ID
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|
@ -11,5 +11,4 @@
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 本软件配置文件实体类
|
||||||
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
|
public class Config
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 本软件配置文件实体类
|
|
||||||
/// </summary>
|
|
||||||
[Serializable]
|
|
||||||
public class Config
|
|
||||||
{
|
|
||||||
#region property
|
#region property
|
||||||
|
|
||||||
public string indexId { get; set; }
|
public string indexId { get; set; }
|
||||||
|
|
@ -33,5 +33,4 @@
|
||||||
public List<CoreTypeItem> coreTypeItem { get; set; }
|
public List<CoreTypeItem> coreTypeItem { get; set; }
|
||||||
|
|
||||||
#endregion other entities
|
#endregion other entities
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class CoreBasicItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class CoreBasicItem
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 允许日志
|
/// 允许日志
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -31,11 +31,11 @@ namespace v2rayN.Mode
|
||||||
/// 默认用户代理
|
/// 默认用户代理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string defUserAgent { get; set; }
|
public string defUserAgent { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class InItem
|
public class InItem
|
||||||
{
|
{
|
||||||
public int localPort { get; set; }
|
public int localPort { get; set; }
|
||||||
|
|
||||||
public string protocol { get; set; }
|
public string protocol { get; set; }
|
||||||
|
|
@ -52,11 +52,11 @@ namespace v2rayN.Mode
|
||||||
public string user { get; set; }
|
public string user { get; set; }
|
||||||
|
|
||||||
public string pass { get; set; }
|
public string pass { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class KcpItem
|
public class KcpItem
|
||||||
{
|
{
|
||||||
public int mtu { get; set; }
|
public int mtu { get; set; }
|
||||||
|
|
||||||
public int tti { get; set; }
|
public int tti { get; set; }
|
||||||
|
|
@ -70,20 +70,20 @@ namespace v2rayN.Mode
|
||||||
public int readBufferSize { get; set; }
|
public int readBufferSize { get; set; }
|
||||||
|
|
||||||
public int writeBufferSize { get; set; }
|
public int writeBufferSize { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class GrpcItem
|
public class GrpcItem
|
||||||
{
|
{
|
||||||
public int idle_timeout { get; set; }
|
public int idle_timeout { get; set; }
|
||||||
public int health_check_timeout { get; set; }
|
public int health_check_timeout { get; set; }
|
||||||
public bool permit_without_stream { get; set; }
|
public bool permit_without_stream { get; set; }
|
||||||
public int initial_windows_size { get; set; }
|
public int initial_windows_size { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class GUIItem
|
public class GUIItem
|
||||||
{
|
{
|
||||||
public bool autoRun { get; set; }
|
public bool autoRun { get; set; }
|
||||||
|
|
||||||
public bool enableStatistics { get; set; }
|
public bool enableStatistics { get; set; }
|
||||||
|
|
@ -103,11 +103,11 @@ namespace v2rayN.Mode
|
||||||
public bool enableHWA { get; set; } = false;
|
public bool enableHWA { get; set; } = false;
|
||||||
|
|
||||||
public bool enableLog { get; set; } = true;
|
public bool enableLog { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class UIItem
|
public class UIItem
|
||||||
{
|
{
|
||||||
public bool enableAutoAdjustMainLvColWidth { get; set; }
|
public bool enableAutoAdjustMainLvColWidth { get; set; }
|
||||||
public double mainWidth { get; set; }
|
public double mainWidth { get; set; }
|
||||||
public double mainHeight { get; set; }
|
public double mainHeight { get; set; }
|
||||||
|
|
@ -125,18 +125,18 @@ namespace v2rayN.Mode
|
||||||
public string mainMsgFilter { get; set; }
|
public string mainMsgFilter { get; set; }
|
||||||
public bool showTrayTip { get; set; }
|
public bool showTrayTip { get; set; }
|
||||||
public List<ColumnItem> mainColumnItem { get; set; }
|
public List<ColumnItem> mainColumnItem { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ConstItem
|
public class ConstItem
|
||||||
{
|
{
|
||||||
public string defIEProxyExceptions { get; set; }
|
public string defIEProxyExceptions { get; set; }
|
||||||
public string subConvertUrl { get; set; } = string.Empty;
|
public string subConvertUrl { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class KeyEventItem
|
public class KeyEventItem
|
||||||
{
|
{
|
||||||
public EGlobalHotkey eGlobalHotkey { get; set; }
|
public EGlobalHotkey eGlobalHotkey { get; set; }
|
||||||
|
|
||||||
public bool Alt { get; set; }
|
public bool Alt { get; set; }
|
||||||
|
|
@ -146,37 +146,37 @@ namespace v2rayN.Mode
|
||||||
public bool Shift { get; set; }
|
public bool Shift { get; set; }
|
||||||
|
|
||||||
public Key? KeyCode { get; set; }
|
public Key? KeyCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class CoreTypeItem
|
public class CoreTypeItem
|
||||||
{
|
{
|
||||||
public EConfigType configType { get; set; }
|
public EConfigType configType { get; set; }
|
||||||
|
|
||||||
public ECoreType coreType { get; set; }
|
public ECoreType coreType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class TunModeItem
|
public class TunModeItem
|
||||||
{
|
{
|
||||||
public bool enableTun { get; set; }
|
public bool enableTun { get; set; }
|
||||||
public bool strictRoute { get; set; } = true;
|
public bool strictRoute { get; set; } = true;
|
||||||
public string stack { get; set; }
|
public string stack { get; set; }
|
||||||
public int mtu { get; set; }
|
public int mtu { get; set; }
|
||||||
public bool enableExInbound { get; set; }
|
public bool enableExInbound { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SpeedTestItem
|
public class SpeedTestItem
|
||||||
{
|
{
|
||||||
public int speedTestTimeout { get; set; }
|
public int speedTestTimeout { get; set; }
|
||||||
public string speedTestUrl { get; set; }
|
public string speedTestUrl { get; set; }
|
||||||
public string speedPingTestUrl { get; set; }
|
public string speedPingTestUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RoutingBasicItem
|
public class RoutingBasicItem
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 域名解析策略
|
/// 域名解析策略
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -187,23 +187,22 @@ namespace v2rayN.Mode
|
||||||
public string domainMatcher { get; set; }
|
public string domainMatcher { get; set; }
|
||||||
public string routingIndexId { get; set; }
|
public string routingIndexId { get; set; }
|
||||||
public bool enableRoutingAdvanced { get; set; }
|
public bool enableRoutingAdvanced { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ColumnItem
|
public class ColumnItem
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public int Width { get; set; }
|
public int Width { get; set; }
|
||||||
public int Index { get; set; }
|
public int Index { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Mux4Sbox
|
public class Mux4Sbox
|
||||||
{
|
{
|
||||||
public string protocol { get; set; }
|
public string protocol { get; set; }
|
||||||
public int max_connections { get; set; }
|
public int max_connections { get; set; }
|
||||||
public int min_streams { get; set; }
|
public int min_streams { get; set; }
|
||||||
public int max_streams { get; set; }
|
public int max_streams { get; set; }
|
||||||
public bool padding { get; set; }
|
public bool padding { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ConfigOld
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ConfigOld
|
|
||||||
{
|
|
||||||
#region property
|
#region property
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -206,11 +206,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion other entities
|
#endregion other entities
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class VmessItem
|
public class VmessItem
|
||||||
{
|
{
|
||||||
public VmessItem()
|
public VmessItem()
|
||||||
{
|
{
|
||||||
indexId = string.Empty;
|
indexId = string.Empty;
|
||||||
|
|
@ -405,11 +405,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public string fingerprint { get; set; }
|
public string fingerprint { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RoutingItemOld
|
public class RoutingItemOld
|
||||||
{
|
{
|
||||||
public string remarks
|
public string remarks
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|
@ -436,5 +436,4 @@
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class CoreInfo
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class CoreInfo
|
|
||||||
{
|
|
||||||
public ECoreType coreType { get; set; }
|
public ECoreType coreType { get; set; }
|
||||||
|
|
||||||
public List<string> coreExes { get; set; }
|
public List<string> coreExes { get; set; }
|
||||||
|
|
@ -23,5 +23,4 @@
|
||||||
public string versionArg { get; set; }
|
public string versionArg { get; set; }
|
||||||
|
|
||||||
public bool redirectInfo { get; set; }
|
public bool redirectInfo { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class DNSItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class DNSItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
|
|
||||||
|
|
@ -14,5 +14,4 @@ namespace v2rayN.Mode
|
||||||
public string? normalDNS { get; set; }
|
public string? normalDNS { get; set; }
|
||||||
public string? tunDNS { get; set; }
|
public string? tunDNS { get; set; }
|
||||||
public string? domainStrategy4Freedom { get; set; }
|
public string? domainStrategy4Freedom { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum EConfigType
|
||||||
{
|
{
|
||||||
public enum EConfigType
|
|
||||||
{
|
|
||||||
VMess = 1,
|
VMess = 1,
|
||||||
Custom = 2,
|
Custom = 2,
|
||||||
Shadowsocks = 3,
|
Shadowsocks = 3,
|
||||||
Socks = 4,
|
Socks = 4,
|
||||||
VLESS = 5,
|
VLESS = 5,
|
||||||
Trojan = 6
|
Trojan = 6
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum ECoreType
|
||||||
{
|
{
|
||||||
public enum ECoreType
|
|
||||||
{
|
|
||||||
v2fly = 1,
|
v2fly = 1,
|
||||||
Xray = 2,
|
Xray = 2,
|
||||||
SagerNet = 3,
|
SagerNet = 3,
|
||||||
|
|
@ -14,5 +14,4 @@
|
||||||
sing_box = 24,
|
sing_box = 24,
|
||||||
juicity = 25,
|
juicity = 25,
|
||||||
v2rayN = 99
|
v2rayN = 99
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum EGlobalHotkey
|
||||||
{
|
{
|
||||||
public enum EGlobalHotkey
|
|
||||||
{
|
|
||||||
ShowForm = 0,
|
ShowForm = 0,
|
||||||
SystemProxyClear = 1,
|
SystemProxyClear = 1,
|
||||||
SystemProxySet = 2,
|
SystemProxySet = 2,
|
||||||
SystemProxyUnchanged = 3,
|
SystemProxyUnchanged = 3,
|
||||||
SystemProxyPac = 4,
|
SystemProxyPac = 4,
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum EMove
|
||||||
{
|
{
|
||||||
public enum EMove
|
|
||||||
{
|
|
||||||
Top = 1,
|
Top = 1,
|
||||||
Up = 2,
|
Up = 2,
|
||||||
Down = 3,
|
Down = 3,
|
||||||
Bottom = 4,
|
Bottom = 4,
|
||||||
Position = 5
|
Position = 5
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum EServerColName
|
||||||
{
|
{
|
||||||
public enum EServerColName
|
|
||||||
{
|
|
||||||
def = 0,
|
def = 0,
|
||||||
configType,
|
configType,
|
||||||
remarks,
|
remarks,
|
||||||
|
|
@ -18,5 +18,4 @@
|
||||||
todayUp,
|
todayUp,
|
||||||
totalDown,
|
totalDown,
|
||||||
totalUp
|
totalUp
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum ESpeedActionType
|
||||||
{
|
{
|
||||||
public enum ESpeedActionType
|
|
||||||
{
|
|
||||||
Ping,
|
Ping,
|
||||||
Tcping,
|
Tcping,
|
||||||
Realping,
|
Realping,
|
||||||
Speedtest,
|
Speedtest,
|
||||||
Mixedtest
|
Mixedtest
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum ESysProxyType
|
||||||
{
|
{
|
||||||
public enum ESysProxyType
|
|
||||||
{
|
|
||||||
ForcedClear = 0,
|
ForcedClear = 0,
|
||||||
ForcedChange = 1,
|
ForcedChange = 1,
|
||||||
Unchanged = 2,
|
Unchanged = 2,
|
||||||
Pac = 3
|
Pac = 3
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public enum EViewAction
|
||||||
{
|
{
|
||||||
public enum EViewAction
|
|
||||||
{
|
|
||||||
AdjustMainLvColWidth,
|
AdjustMainLvColWidth,
|
||||||
ProfilesFocus
|
ProfilesFocus
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public class GitHubReleaseAsset
|
||||||
{
|
{
|
||||||
public class GitHubReleaseAsset
|
|
||||||
{
|
|
||||||
[JsonProperty("url")] public string Url { get; set; }
|
[JsonProperty("url")] public string Url { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")] public int Id { get; set; }
|
[JsonProperty("id")] public int Id { get; set; }
|
||||||
|
|
@ -27,10 +27,10 @@ namespace v2rayN.Mode
|
||||||
[JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; }
|
[JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; }
|
||||||
|
|
||||||
[JsonProperty("browser_download_url")] public string BrowserDownloadUrl { get; set; }
|
[JsonProperty("browser_download_url")] public string BrowserDownloadUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GitHubRelease
|
public class GitHubRelease
|
||||||
{
|
{
|
||||||
[JsonProperty("url")] public string Url { get; set; }
|
[JsonProperty("url")] public string Url { get; set; }
|
||||||
|
|
||||||
[JsonProperty("assets_url")] public string AssetsUrl { get; set; }
|
[JsonProperty("assets_url")] public string AssetsUrl { get; set; }
|
||||||
|
|
@ -64,5 +64,4 @@ namespace v2rayN.Mode
|
||||||
[JsonProperty("zipball_url")] public string ZipballUrl { get; set; }
|
[JsonProperty("zipball_url")] public string ZipballUrl { get; set; }
|
||||||
|
|
||||||
[JsonProperty("body")] public string Body { get; set; }
|
[JsonProperty("body")] public string Body { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ProfileExItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ProfileExItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string indexId { get; set; }
|
public string indexId { get; set; }
|
||||||
|
|
||||||
public int delay { get; set; }
|
public int delay { get; set; }
|
||||||
public decimal speed { get; set; }
|
public decimal speed { get; set; }
|
||||||
public int sort { get; set; }
|
public int sort { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ProfileItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ProfileItem
|
|
||||||
{
|
|
||||||
public ProfileItem()
|
public ProfileItem()
|
||||||
{
|
{
|
||||||
indexId = string.Empty;
|
indexId = string.Empty;
|
||||||
|
|
@ -191,5 +191,4 @@ namespace v2rayN.Mode
|
||||||
public string publicKey { get; set; }
|
public string publicKey { get; set; }
|
||||||
public string shortId { get; set; }
|
public string shortId { get; set; }
|
||||||
public string spiderX { get; set; }
|
public string spiderX { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ProfileItemModel : ProfileItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ProfileItemModel : ProfileItem
|
|
||||||
{
|
|
||||||
public bool isActive { get; set; }
|
public bool isActive { get; set; }
|
||||||
public string subRemarks { get; set; }
|
public string subRemarks { get; set; }
|
||||||
public int delay { get; set; }
|
public int delay { get; set; }
|
||||||
|
|
@ -14,5 +14,4 @@
|
||||||
public string todayDown { get; set; }
|
public string todayDown { get; set; }
|
||||||
public string totalUp { get; set; }
|
public string totalUp { get; set; }
|
||||||
public string totalDown { get; set; }
|
public string totalDown { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RoutingItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RoutingItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
|
|
||||||
|
|
@ -18,5 +18,4 @@ namespace v2rayN.Mode
|
||||||
public string domainStrategy { get; set; }
|
public string domainStrategy { get; set; }
|
||||||
public string domainStrategy4Singbox { get; set; }
|
public string domainStrategy4Singbox { get; set; }
|
||||||
public int sort { get; set; }
|
public int sort { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RoutingItemModel : RoutingItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RoutingItemModel : RoutingItem
|
|
||||||
{
|
|
||||||
public bool isActive { get; set; }
|
public bool isActive { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RulesItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RulesItem
|
|
||||||
{
|
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
|
|
||||||
|
|
@ -21,5 +21,4 @@
|
||||||
public List<string> process { get; set; }
|
public List<string> process { get; set; }
|
||||||
|
|
||||||
public bool enabled { get; set; } = true;
|
public bool enabled { get; set; } = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RulesItemModel : RulesItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RulesItemModel : RulesItem
|
|
||||||
{
|
|
||||||
public string inboundTags { get; set; }
|
public string inboundTags { get; set; }
|
||||||
|
|
||||||
public string ips { get; set; }
|
public string ips { get; set; }
|
||||||
|
|
@ -10,5 +10,4 @@
|
||||||
public string domains { get; set; }
|
public string domains { get; set; }
|
||||||
|
|
||||||
public string protocols { get; set; }
|
public string protocols { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
internal class ServerSpeedItem : ServerStatItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
internal class ServerSpeedItem : ServerStatItem
|
|
||||||
{
|
|
||||||
public long proxyUp
|
public long proxyUp
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|
@ -22,11 +22,11 @@
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class TrafficItem
|
public class TrafficItem
|
||||||
{
|
{
|
||||||
public ulong up
|
public ulong up
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|
@ -36,5 +36,4 @@
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ServerStatItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ServerStatItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string indexId
|
public string indexId
|
||||||
{
|
{
|
||||||
|
|
@ -35,5 +35,4 @@ namespace v2rayN.Mode
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
internal class ServerTestItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
internal class ServerTestItem
|
|
||||||
{
|
|
||||||
public string indexId { get; set; }
|
public string indexId { get; set; }
|
||||||
public string address { get; set; }
|
public string address { get; set; }
|
||||||
public int port { get; set; }
|
public int port { get; set; }
|
||||||
public EConfigType configType { get; set; }
|
public EConfigType configType { get; set; }
|
||||||
public bool allowTest { get; set; }
|
public bool allowTest { get; set; }
|
||||||
public int delay { get; set; }
|
public int delay { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
public class SingboxConfig
|
||||||
{
|
{
|
||||||
public class SingboxConfig
|
|
||||||
{
|
|
||||||
public Log4Sbox log { get; set; }
|
public Log4Sbox log { get; set; }
|
||||||
public object dns { get; set; }
|
public object dns { get; set; }
|
||||||
public List<Inbound4Sbox> inbounds { get; set; }
|
public List<Inbound4Sbox> inbounds { get; set; }
|
||||||
public List<Outbound4Sbox> outbounds { get; set; }
|
public List<Outbound4Sbox> outbounds { get; set; }
|
||||||
public Route4Sbox route { get; set; }
|
public Route4Sbox route { get; set; }
|
||||||
public Experimental4Sbox experimental { get; set; }
|
public Experimental4Sbox experimental { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Log4Sbox
|
public class Log4Sbox
|
||||||
{
|
{
|
||||||
public bool? disabled { get; set; }
|
public bool? disabled { get; set; }
|
||||||
public string level { get; set; }
|
public string level { get; set; }
|
||||||
public string output { get; set; }
|
public string output { get; set; }
|
||||||
public bool timestamp { get; set; }
|
public bool timestamp { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Dns4Sbox
|
public class Dns4Sbox
|
||||||
{
|
{
|
||||||
public List<Server4Sbox> servers { get; set; }
|
public List<Server4Sbox> servers { get; set; }
|
||||||
public List<Rule4Sbox> rules { get; set; }
|
public List<Rule4Sbox> rules { get; set; }
|
||||||
public string? final { get; set; }
|
public string? final { get; set; }
|
||||||
|
|
@ -29,17 +29,17 @@
|
||||||
public bool? independent_cache { get; set; }
|
public bool? independent_cache { get; set; }
|
||||||
public bool? reverse_mapping { get; set; }
|
public bool? reverse_mapping { get; set; }
|
||||||
public Fakeip4Sbox? fakeip { get; set; }
|
public Fakeip4Sbox? fakeip { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Route4Sbox
|
public class Route4Sbox
|
||||||
{
|
{
|
||||||
public bool? auto_detect_interface { get; set; }
|
public bool? auto_detect_interface { get; set; }
|
||||||
public List<Rule4Sbox> rules { get; set; }
|
public List<Rule4Sbox> rules { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Rule4Sbox
|
public class Rule4Sbox
|
||||||
{
|
{
|
||||||
public string outbound { get; set; }
|
public string outbound { get; set; }
|
||||||
public string server { get; set; }
|
public string server { get; set; }
|
||||||
public bool? disable_cache { get; set; }
|
public bool? disable_cache { get; set; }
|
||||||
|
|
@ -60,11 +60,11 @@
|
||||||
public List<string>? source_ip_cidr { get; set; }
|
public List<string>? source_ip_cidr { get; set; }
|
||||||
|
|
||||||
public List<string>? process_name { get; set; }
|
public List<string>? process_name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Inbound4Sbox
|
public class Inbound4Sbox
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
public string listen { get; set; }
|
public string listen { get; set; }
|
||||||
|
|
@ -81,16 +81,16 @@
|
||||||
public bool? sniff { get; set; }
|
public bool? sniff { get; set; }
|
||||||
public bool? sniff_override_destination { get; set; }
|
public bool? sniff_override_destination { get; set; }
|
||||||
public List<User4Sbox> users { get; set; }
|
public List<User4Sbox> users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class User4Sbox
|
public class User4Sbox
|
||||||
{
|
{
|
||||||
public string username { get; set; }
|
public string username { get; set; }
|
||||||
public string password { get; set; }
|
public string password { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Outbound4Sbox
|
public class Outbound4Sbox
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
public string server { get; set; }
|
public string server { get; set; }
|
||||||
|
|
@ -115,43 +115,43 @@
|
||||||
public Tls4Sbox tls { get; set; }
|
public Tls4Sbox tls { get; set; }
|
||||||
public Multiplex4Sbox multiplex { get; set; }
|
public Multiplex4Sbox multiplex { get; set; }
|
||||||
public Transport4Sbox transport { get; set; }
|
public Transport4Sbox transport { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Tls4Sbox
|
public class Tls4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string server_name { get; set; }
|
public string server_name { get; set; }
|
||||||
public bool? insecure { get; set; }
|
public bool? insecure { get; set; }
|
||||||
public List<string> alpn { get; set; }
|
public List<string> alpn { get; set; }
|
||||||
public Utls4Sbox utls { get; set; }
|
public Utls4Sbox utls { get; set; }
|
||||||
public Reality4Sbox reality { get; set; }
|
public Reality4Sbox reality { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Multiplex4Sbox
|
public class Multiplex4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string protocol { get; set; }
|
public string protocol { get; set; }
|
||||||
public int max_connections { get; set; }
|
public int max_connections { get; set; }
|
||||||
public int min_streams { get; set; }
|
public int min_streams { get; set; }
|
||||||
public int max_streams { get; set; }
|
public int max_streams { get; set; }
|
||||||
public bool padding { get; set; }
|
public bool padding { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Utls4Sbox
|
public class Utls4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string fingerprint { get; set; }
|
public string fingerprint { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Reality4Sbox
|
public class Reality4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string public_key { get; set; }
|
public string public_key { get; set; }
|
||||||
public string short_id { get; set; }
|
public string short_id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Transport4Sbox
|
public class Transport4Sbox
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
public List<string>? host { get; set; }
|
public List<string>? host { get; set; }
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
|
|
@ -161,52 +161,51 @@
|
||||||
public string idle_timeout { get; set; }
|
public string idle_timeout { get; set; }
|
||||||
public string ping_timeout { get; set; }
|
public string ping_timeout { get; set; }
|
||||||
public bool? permit_without_stream { get; set; }
|
public bool? permit_without_stream { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Headers4Sbox
|
public class Headers4Sbox
|
||||||
{
|
{
|
||||||
public string? Host { get; set; }
|
public string? Host { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Server4Sbox
|
public class Server4Sbox
|
||||||
{
|
{
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
public string address { get; set; }
|
public string address { get; set; }
|
||||||
public string address_resolver { get; set; }
|
public string address_resolver { get; set; }
|
||||||
public string strategy { get; set; }
|
public string strategy { get; set; }
|
||||||
public string detour { get; set; }
|
public string detour { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Experimental4Sbox
|
public class Experimental4Sbox
|
||||||
{
|
{
|
||||||
public V2ray_Api4Sbox v2ray_api { get; set; }
|
public V2ray_Api4Sbox v2ray_api { get; set; }
|
||||||
public Clash_Api4Sbox clash_api { get; set; }
|
public Clash_Api4Sbox clash_api { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class V2ray_Api4Sbox
|
public class V2ray_Api4Sbox
|
||||||
{
|
{
|
||||||
public string listen { get; set; }
|
public string listen { get; set; }
|
||||||
public Stats4Sbox stats { get; set; }
|
public Stats4Sbox stats { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Clash_Api4Sbox
|
public class Clash_Api4Sbox
|
||||||
{
|
{
|
||||||
public string external_controller { get; set; }
|
public string external_controller { get; set; }
|
||||||
public bool store_selected { get; set; }
|
public bool store_selected { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Stats4Sbox
|
public class Stats4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public List<string>? inbounds { get; set; }
|
public List<string>? inbounds { get; set; }
|
||||||
public List<string>? outbounds { get; set; }
|
public List<string>? outbounds { get; set; }
|
||||||
public List<string>? users { get; set; }
|
public List<string>? users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Fakeip4Sbox
|
public class Fakeip4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string inet4_range { get; set; }
|
public string inet4_range { get; set; }
|
||||||
public string inet6_range { get; set; }
|
public string inet6_range { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public class SsSIP008
|
|
||||||
{
|
|
||||||
public List<SsServer> servers { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
public class SsSIP008
|
||||||
public class SsServer
|
{
|
||||||
{
|
public List<SsServer> servers { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class SsServer
|
||||||
|
{
|
||||||
public string remarks { get; set; }
|
public string remarks { get; set; }
|
||||||
public string server { get; set; }
|
public string server { get; set; }
|
||||||
public string server_port { get; set; }
|
public string server_port { get; set; }
|
||||||
public string method { get; set; }
|
public string method { get; set; }
|
||||||
public string password { get; set; }
|
public string password { get; set; }
|
||||||
public string plugin { get; set; }
|
public string plugin { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class SubItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class SubItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
|
|
||||||
|
|
@ -27,5 +27,4 @@ namespace v2rayN.Mode
|
||||||
public long updateTime { get; set; }
|
public long updateTime { get; set; }
|
||||||
|
|
||||||
public string? convertTarget { get; set; }
|
public string? convertTarget { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
internal class SysproxyConfig
|
||||||
{
|
{
|
||||||
internal class SysproxyConfig
|
|
||||||
{
|
|
||||||
public bool UserSettingsRecorded;
|
public bool UserSettingsRecorded;
|
||||||
public string Flags;
|
public string Flags;
|
||||||
public string ProxyServer;
|
public string ProxyServer;
|
||||||
|
|
@ -16,5 +16,4 @@
|
||||||
BypassList = "";
|
BypassList = "";
|
||||||
PacUrl = "";
|
PacUrl = "";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// v2ray配置文件实体类
|
||||||
|
/// 例子SampleConfig.txt
|
||||||
|
/// </summary>
|
||||||
|
public class V2rayConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// v2ray配置文件实体类
|
|
||||||
/// 例子SampleConfig.txt
|
|
||||||
/// </summary>
|
|
||||||
public class V2rayConfig
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 日志配置
|
/// 日志配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -43,30 +43,30 @@ namespace v2rayN.Mode
|
||||||
/// 路由配置
|
/// 路由配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Routing4Ray routing { get; set; }
|
public Routing4Ray routing { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Stats4Ray
|
public class Stats4Ray
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
public class API4Ray
|
public class API4Ray
|
||||||
{
|
{
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
public List<string> services { get; set; }
|
public List<string> services { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Policy4Ray
|
public class Policy4Ray
|
||||||
{
|
{
|
||||||
public SystemPolicy4Ray system;
|
public SystemPolicy4Ray system;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SystemPolicy4Ray
|
public class SystemPolicy4Ray
|
||||||
{
|
{
|
||||||
public bool statsOutboundUplink;
|
public bool statsOutboundUplink;
|
||||||
public bool statsOutboundDownlink;
|
public bool statsOutboundDownlink;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Log4Ray
|
public class Log4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -81,10 +81,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string loglevel { get; set; }
|
public string loglevel { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Inbounds4Ray
|
public class Inbounds4Ray
|
||||||
{
|
{
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -116,10 +116,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public StreamSettings4Ray streamSettings { get; set; }
|
public StreamSettings4Ray streamSettings { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Inboundsettings4Ray
|
public class Inboundsettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -153,10 +153,10 @@ namespace v2rayN.Mode
|
||||||
public bool allowTransparent { get; set; }
|
public bool allowTransparent { get; set; }
|
||||||
|
|
||||||
public List<AccountsItem4Ray> accounts { get; set; }
|
public List<AccountsItem4Ray> accounts { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UsersItem4Ray
|
public class UsersItem4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -186,17 +186,17 @@ namespace v2rayN.Mode
|
||||||
/// VLESS
|
/// VLESS
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? flow { get; set; }
|
public string? flow { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Sniffing4Ray
|
public class Sniffing4Ray
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public List<string> destOverride { get; set; }
|
public List<string> destOverride { get; set; }
|
||||||
public bool routeOnly { get; set; }
|
public bool routeOnly { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Outbounds4Ray
|
public class Outbounds4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 默认值agentout
|
/// 默认值agentout
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -221,10 +221,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Mux4Ray mux { get; set; }
|
public Mux4Ray mux { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Outboundsettings4Ray
|
public class Outboundsettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -249,10 +249,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? userLevel { get; set; }
|
public int? userLevel { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class VnextItem4Ray
|
public class VnextItem4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -267,10 +267,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<UsersItem4Ray> users { get; set; }
|
public List<UsersItem4Ray> users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ServersItem4Ray
|
public class ServersItem4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -315,10 +315,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<SocksUsersItem4Ray> users { get; set; }
|
public List<SocksUsersItem4Ray> users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SocksUsersItem4Ray
|
public class SocksUsersItem4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -333,10 +333,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int level { get; set; }
|
public int level { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Mux4Ray
|
public class Mux4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -346,26 +346,26 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int concurrency { get; set; }
|
public int concurrency { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Response4Ray
|
public class Response4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Dns4Ray
|
public class Dns4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> servers { get; set; }
|
public List<string> servers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Routing4Ray
|
public class Routing4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -380,11 +380,11 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<RulesItem4Ray> rules { get; set; }
|
public List<RulesItem4Ray> rules { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RulesItem4Ray
|
public class RulesItem4Ray
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
|
|
||||||
public string port { get; set; }
|
public string port { get; set; }
|
||||||
|
|
@ -398,10 +398,10 @@ namespace v2rayN.Mode
|
||||||
public List<string> domain { get; set; }
|
public List<string> domain { get; set; }
|
||||||
|
|
||||||
public List<string> protocol { get; set; }
|
public List<string> protocol { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StreamSettings4Ray
|
public class StreamSettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -451,10 +451,10 @@ namespace v2rayN.Mode
|
||||||
/// grpc
|
/// grpc
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GrpcSettings4Ray grpcSettings { get; set; }
|
public GrpcSettings4Ray grpcSettings { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TlsSettings4Ray
|
public class TlsSettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否允许不安全连接(用于客户端)
|
/// 是否允许不安全连接(用于客户端)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -476,18 +476,18 @@ namespace v2rayN.Mode
|
||||||
public string? publicKey { get; set; }
|
public string? publicKey { get; set; }
|
||||||
public string? shortId { get; set; }
|
public string? shortId { get; set; }
|
||||||
public string? spiderX { get; set; }
|
public string? spiderX { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TcpSettings4Ray
|
public class TcpSettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据包头部伪装设置
|
/// 数据包头部伪装设置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Header4Ray header { get; set; }
|
public Header4Ray header { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Header4Ray
|
public class Header4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 伪装
|
/// 伪装
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -502,10 +502,10 @@ namespace v2rayN.Mode
|
||||||
/// 结构复杂,直接存起来
|
/// 结构复杂,直接存起来
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object response { get; set; }
|
public object response { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class KcpSettings4Ray
|
public class KcpSettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -550,10 +550,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string seed { get; set; }
|
public string seed { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WsSettings4Ray
|
public class WsSettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -563,10 +563,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Headers4Ray headers { get; set; }
|
public Headers4Ray headers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Headers4Ray
|
public class Headers4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -577,10 +577,10 @@ namespace v2rayN.Mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("User-Agent")]
|
[JsonProperty("User-Agent")]
|
||||||
public string UserAgent { get; set; }
|
public string UserAgent { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HttpSettings4Ray
|
public class HttpSettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -590,10 +590,10 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> host { get; set; }
|
public List<string> host { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QuicSettings4Ray
|
public class QuicSettings4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -608,20 +608,20 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Header4Ray header { get; set; }
|
public Header4Ray header { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GrpcSettings4Ray
|
public class GrpcSettings4Ray
|
||||||
{
|
{
|
||||||
public string serviceName { get; set; }
|
public string serviceName { get; set; }
|
||||||
public bool multiMode { get; set; }
|
public bool multiMode { get; set; }
|
||||||
public int idle_timeout { get; set; }
|
public int idle_timeout { get; set; }
|
||||||
public int health_check_timeout { get; set; }
|
public int health_check_timeout { get; set; }
|
||||||
public bool permit_without_stream { get; set; }
|
public bool permit_without_stream { get; set; }
|
||||||
public int initial_windows_size { get; set; }
|
public int initial_windows_size { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AccountsItem4Ray
|
public class AccountsItem4Ray
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -631,5 +631,4 @@ namespace v2rayN.Mode
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string pass { get; set; }
|
public string pass { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tcp伪装http的Request,只要Host
|
||||||
|
/// </summary>
|
||||||
|
public class V2rayTcpRequest
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Tcp伪装http的Request,只要Host
|
|
||||||
/// </summary>
|
|
||||||
public class V2rayTcpRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public RequestHeaders headers { get; set; }
|
public RequestHeaders headers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RequestHeaders
|
public class RequestHeaders
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> Host { get; set; }
|
public List<string> Host { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// https://github.com/2dust/v2rayN/wiki/
|
||||||
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
|
internal class VmessQRCode
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// https://github.com/2dust/v2rayN/wiki/
|
|
||||||
/// </summary>
|
|
||||||
[Serializable]
|
|
||||||
internal class VmessQRCode
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -80,5 +80,4 @@
|
||||||
/// TLS fingerprint
|
/// TLS fingerprint
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string fp { get; set; } = string.Empty;
|
public string fp { get; set; } = string.Empty;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace v2rayN.Tool
|
namespace v2rayN.Tool;
|
||||||
|
|
||||||
|
public static class FileManager
|
||||||
{
|
{
|
||||||
public static class FileManager
|
|
||||||
{
|
|
||||||
public static bool ByteArrayToFile(string fileName, byte[] content)
|
public static bool ByteArrayToFile(string fileName, byte[] content)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
@ -86,5 +86,4 @@ namespace v2rayN.Tool
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace v2rayN
|
namespace v2rayN;
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* See:
|
* See:
|
||||||
* http://stackoverflow.com/questions/6266820/working-example-of-createjobobject-setinformationjobobject-pinvoke-in-net
|
* http://stackoverflow.com/questions/6266820/working-example-of-createjobobject-setinformationjobobject-pinvoke-in-net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Job : IDisposable
|
public class Job : IDisposable
|
||||||
{
|
{
|
||||||
private IntPtr handle = IntPtr.Zero;
|
private IntPtr handle = IntPtr.Zero;
|
||||||
|
|
||||||
public Job()
|
public Job()
|
||||||
|
|
@ -113,24 +113,24 @@ namespace v2rayN
|
||||||
private static extern bool CloseHandle(IntPtr hObject);
|
private static extern bool CloseHandle(IntPtr hObject);
|
||||||
|
|
||||||
#endregion Interop
|
#endregion Interop
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Helper classes
|
#region Helper classes
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct IO_COUNTERS
|
internal struct IO_COUNTERS
|
||||||
{
|
{
|
||||||
public UInt64 ReadOperationCount;
|
public UInt64 ReadOperationCount;
|
||||||
public UInt64 WriteOperationCount;
|
public UInt64 WriteOperationCount;
|
||||||
public UInt64 OtherOperationCount;
|
public UInt64 OtherOperationCount;
|
||||||
public UInt64 ReadTransferCount;
|
public UInt64 ReadTransferCount;
|
||||||
public UInt64 WriteTransferCount;
|
public UInt64 WriteTransferCount;
|
||||||
public UInt64 OtherTransferCount;
|
public UInt64 OtherTransferCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct JOBOBJECT_BASIC_LIMIT_INFORMATION
|
internal struct JOBOBJECT_BASIC_LIMIT_INFORMATION
|
||||||
{
|
{
|
||||||
public Int64 PerProcessUserTimeLimit;
|
public Int64 PerProcessUserTimeLimit;
|
||||||
public Int64 PerJobUserTimeLimit;
|
public Int64 PerJobUserTimeLimit;
|
||||||
public UInt32 LimitFlags;
|
public UInt32 LimitFlags;
|
||||||
|
|
@ -140,29 +140,29 @@ namespace v2rayN
|
||||||
public UIntPtr Affinity;
|
public UIntPtr Affinity;
|
||||||
public UInt32 PriorityClass;
|
public UInt32 PriorityClass;
|
||||||
public UInt32 SchedulingClass;
|
public UInt32 SchedulingClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct SECURITY_ATTRIBUTES
|
public struct SECURITY_ATTRIBUTES
|
||||||
{
|
{
|
||||||
public UInt32 nLength;
|
public UInt32 nLength;
|
||||||
public IntPtr lpSecurityDescriptor;
|
public IntPtr lpSecurityDescriptor;
|
||||||
public Int32 bInheritHandle;
|
public Int32 bInheritHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION
|
internal struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION
|
||||||
{
|
{
|
||||||
public JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
|
public JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
|
||||||
public IO_COUNTERS IoInfo;
|
public IO_COUNTERS IoInfo;
|
||||||
public UIntPtr ProcessMemoryLimit;
|
public UIntPtr ProcessMemoryLimit;
|
||||||
public UIntPtr JobMemoryLimit;
|
public UIntPtr JobMemoryLimit;
|
||||||
public UIntPtr PeakProcessMemoryUsed;
|
public UIntPtr PeakProcessMemoryUsed;
|
||||||
public UIntPtr PeakJobMemoryUsed;
|
public UIntPtr PeakJobMemoryUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum JobObjectInfoType
|
public enum JobObjectInfoType
|
||||||
{
|
{
|
||||||
AssociateCompletionPortInformation = 7,
|
AssociateCompletionPortInformation = 7,
|
||||||
BasicLimitInformation = 2,
|
BasicLimitInformation = 2,
|
||||||
BasicUIRestrictions = 4,
|
BasicUIRestrictions = 4,
|
||||||
|
|
@ -170,7 +170,6 @@ namespace v2rayN
|
||||||
ExtendedLimitInformation = 9,
|
ExtendedLimitInformation = 9,
|
||||||
SecurityLimitInformation = 5,
|
SecurityLimitInformation = 5,
|
||||||
GroupInformation = 11
|
GroupInformation = 11
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Helper classes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion Helper classes
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@ using NLog.Config;
|
||||||
using NLog.Targets;
|
using NLog.Targets;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace v2rayN.Tool
|
namespace v2rayN.Tool;
|
||||||
|
|
||||||
|
public class Logging
|
||||||
{
|
{
|
||||||
public class Logging
|
|
||||||
{
|
|
||||||
public static void Setup()
|
public static void Setup()
|
||||||
{
|
{
|
||||||
LoggingConfiguration config = new();
|
LoggingConfiguration config = new();
|
||||||
|
|
@ -51,5 +51,4 @@ namespace v2rayN.Tool
|
||||||
catch { }
|
catch { }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace v2rayN.Tool
|
namespace v2rayN.Tool;
|
||||||
|
|
||||||
|
public static class QueryableExtension
|
||||||
{
|
{
|
||||||
public static class QueryableExtension
|
|
||||||
{
|
|
||||||
public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> query, string propertyName)
|
public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> query, string propertyName)
|
||||||
{
|
{
|
||||||
return _OrderBy<T>(query, propertyName, false);
|
return _OrderBy<T>(query, propertyName, false);
|
||||||
|
|
@ -46,5 +46,4 @@ namespace v2rayN.Tool
|
||||||
|
|
||||||
return lamba;
|
return lamba;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
|
|
||||||
namespace v2rayN.Tool
|
namespace v2rayN.Tool;
|
||||||
|
|
||||||
|
public class SemanticVersion
|
||||||
{
|
{
|
||||||
public class SemanticVersion
|
|
||||||
{
|
|
||||||
private int major;
|
private int major;
|
||||||
private int minor;
|
private int minor;
|
||||||
private int patch;
|
private int patch;
|
||||||
|
|
@ -178,5 +178,4 @@ namespace v2rayN.Tool
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Private
|
#endregion Private
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace v2rayN
|
namespace v2rayN;
|
||||||
|
|
||||||
|
internal class UI
|
||||||
{
|
{
|
||||||
internal class UI
|
|
||||||
{
|
|
||||||
private static readonly string caption = "v2rayN";
|
private static readonly string caption = "v2rayN";
|
||||||
|
|
||||||
public static void Show(string msg)
|
public static void Show(string msg)
|
||||||
|
|
@ -20,5 +20,4 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
return MessageBox.Show(msg, caption, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
return MessageBox.Show(msg, caption, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -22,6 +22,7 @@ using System.Windows;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Xml.Serialization;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using ZXing;
|
using ZXing;
|
||||||
|
|
@ -29,10 +30,10 @@ using ZXing.Common;
|
||||||
using ZXing.QrCode;
|
using ZXing.QrCode;
|
||||||
using ZXing.Windows.Compatibility;
|
using ZXing.Windows.Compatibility;
|
||||||
|
|
||||||
namespace v2rayN
|
namespace v2rayN;
|
||||||
|
|
||||||
|
internal class Utils
|
||||||
{
|
{
|
||||||
internal class Utils
|
|
||||||
{
|
|
||||||
#region 资源Json操作
|
#region 资源Json操作
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -907,7 +908,7 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
object retval;
|
object retval;
|
||||||
MemoryStream ms = new MemoryStream();
|
MemoryStream ms = new MemoryStream();
|
||||||
BinaryFormatter bf = new BinaryFormatter();
|
XmlSerializer bf = new XmlSerializer(obj.GetType());
|
||||||
//序列化成流
|
//序列化成流
|
||||||
bf.Serialize(ms, obj);
|
bf.Serialize(ms, obj);
|
||||||
ms.Seek(0, SeekOrigin.Begin);
|
ms.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
@ -1273,5 +1274,4 @@ namespace v2rayN
|
||||||
public static extern int DwmSetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE attribute, ref int attributeValue, uint attributeSize);
|
public static extern int DwmSetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE attribute, ref int attributeValue, uint attributeSize);
|
||||||
|
|
||||||
#endregion Windows API
|
#endregion Windows API
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -11,10 +11,10 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class AddServer2ViewModel : ReactiveValidationObject
|
||||||
{
|
{
|
||||||
public class AddServer2ViewModel : ReactiveValidationObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -156,5 +156,4 @@ namespace v2rayN.ViewModels
|
||||||
_noticeHandler?.Enqueue(ResUI.FailedReadConfiguration);
|
_noticeHandler?.Enqueue(ResUI.FailedReadConfiguration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -8,10 +8,10 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class AddServerViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class AddServerViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -158,5 +158,4 @@ namespace v2rayN.ViewModels
|
||||||
UI.Show(ResUI.OperationFailed);
|
UI.Show(ResUI.OperationFailed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -7,10 +7,10 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class DNSSettingViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class DNSSettingViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -106,5 +106,4 @@ namespace v2rayN.ViewModels
|
||||||
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||||
_view.DialogResult = true;
|
_view.DialogResult = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -22,10 +22,10 @@ using v2rayN.Resx;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
using v2rayN.Views;
|
using v2rayN.Views;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class MainWindowViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class MainWindowViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
#region private prop
|
#region private prop
|
||||||
|
|
||||||
private CoreHandler _coreHandler;
|
private CoreHandler _coreHandler;
|
||||||
|
|
@ -1842,5 +1842,4 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion UI
|
#endregion UI
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -7,10 +7,10 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class OptionSettingViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class OptionSettingViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -364,5 +364,4 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -8,10 +8,10 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class RoutingRuleDetailsViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class RoutingRuleDetailsViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -101,5 +101,4 @@ namespace v2rayN.ViewModels
|
||||||
//_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
//_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||||
_view.DialogResult = true;
|
_view.DialogResult = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -12,10 +12,10 @@ using v2rayN.Resx;
|
||||||
using v2rayN.Views;
|
using v2rayN.Views;
|
||||||
using Application = System.Windows.Application;
|
using Application = System.Windows.Application;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class RoutingRuleSettingViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class RoutingRuleSettingViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -356,5 +356,4 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Import rules
|
#endregion Import rules
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -10,10 +10,10 @@ using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
using v2rayN.Views;
|
using v2rayN.Views;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class RoutingSettingViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class RoutingSettingViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -304,5 +304,4 @@ namespace v2rayN.ViewModels
|
||||||
IsModified = true;
|
IsModified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -8,10 +8,10 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class SubEditViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class SubEditViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private Window _view;
|
private Window _view;
|
||||||
|
|
@ -82,5 +82,4 @@ namespace v2rayN.ViewModels
|
||||||
_noticeHandler?.Enqueue(ResUI.OperationFailed);
|
_noticeHandler?.Enqueue(ResUI.OperationFailed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -12,10 +12,10 @@ using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
using v2rayN.Views;
|
using v2rayN.Views;
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels;
|
||||||
|
|
||||||
|
public class SubSettingViewModel : ReactiveObject
|
||||||
{
|
{
|
||||||
public class SubSettingViewModel : ReactiveObject
|
|
||||||
{
|
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
|
|
||||||
|
|
@ -126,5 +126,4 @@ namespace v2rayN.ViewModels
|
||||||
|
|
||||||
await DialogHost.Show(dialog, "SubDialog");
|
await DialogHost.Show(dialog, "SubDialog");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
|
@ -12,23 +11,21 @@
|
||||||
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
||||||
<FileVersion>6.28</FileVersion>
|
<FileVersion>6.28</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Downloader" Version="3.0.6" />
|
<PackageReference Include="Downloader" Version="3.0.6" />
|
||||||
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
|
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
|
||||||
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.115" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="QRCoder.Xaml" Version="1.4.3" />
|
<PackageReference Include="QRCoder.Xaml" Version="1.4.3" />
|
||||||
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
|
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
|
||||||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
||||||
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
|
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
|
||||||
<PackageReference Include="ReactiveUI.Fody" Version="18.4.1" />
|
<PackageReference Include="ReactiveUI.Fody" Version="18.4.1" />
|
||||||
<PackageReference Include="ReactiveUI.Validation" Version="3.0.22" />
|
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
|
||||||
<PackageReference Include="ReactiveUI.WPF" Version="18.4.1" />
|
<PackageReference Include="ReactiveUI.WPF" Version="18.4.1" />
|
||||||
<PackageReference Include="Splat.NLog" Version="14.6.37" />
|
<PackageReference Include="Splat.NLog" Version="14.7.1" />
|
||||||
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AdditionalFiles Include="app.manifest" />
|
<AdditionalFiles Include="app.manifest" />
|
||||||
<EmbeddedResource Include="Sample\SingboxSampleClientConfig">
|
<EmbeddedResource Include="Sample\SingboxSampleClientConfig">
|
||||||
|
|
@ -86,12 +83,10 @@
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\PacLib\PacLib.csproj" />
|
<ProjectReference Include="..\PacLib\PacLib.csproj" />
|
||||||
<ProjectReference Include="..\ProtosLib\ProtosLib.csproj" />
|
<ProjectReference Include="..\ProtosLib\ProtosLib.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="Resx\ResUI.Designer.cs">
|
<Compile Update="Resx\ResUI.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
|
|
@ -99,7 +94,6 @@
|
||||||
<DependentUpon>ResUI.resx</DependentUpon>
|
<DependentUpon>ResUI.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Update="Resx\ResUI.resx">
|
<EmbeddedResource Update="Resx\ResUI.resx">
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
|
@ -118,5 +112,4 @@
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -6,10 +6,10 @@ using System.Text;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace v2rayUpgrade
|
namespace v2rayUpgrade;
|
||||||
|
|
||||||
|
public partial class MainForm : Form
|
||||||
{
|
{
|
||||||
public partial class MainForm : Form
|
|
||||||
{
|
|
||||||
private readonly string defaultFilename = "v2ray-windows.zip";
|
private readonly string defaultFilename = "v2ray-windows.zip";
|
||||||
private string? fileName;
|
private string? fileName;
|
||||||
|
|
||||||
|
|
@ -144,5 +144,4 @@ namespace v2rayUpgrade
|
||||||
}
|
}
|
||||||
return Path.Combine(startupPath, fileName);
|
return Path.Combine(startupPath, fileName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace v2rayUpgrade
|
namespace v2rayUpgrade;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
{
|
{
|
||||||
internal static class Program
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 应用程序的主入口点。
|
|
||||||
/// </summary>
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
private static void Main(string[] args)
|
private static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
|
@ -16,5 +13,4 @@ namespace v2rayUpgrade
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new MainForm(args));
|
Application.Run(new MainForm(args));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<Copyright>Copyright © 2019-2023 (GPLv3)</Copyright>
|
<Copyright>Copyright © 2019-2023 (GPLv3)</Copyright>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue