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,7 +1,7 @@
|
||||||
using ProtosLib.Statistics;
|
using ProtosLib.Statistics;
|
||||||
|
|
||||||
namespace ProtosLib
|
namespace ProtosLib;
|
||||||
{
|
|
||||||
public class Tests
|
public class Tests
|
||||||
{
|
{
|
||||||
private StatsService.StatsServiceClient client_;
|
private StatsService.StatsServiceClient client_;
|
||||||
|
|
@ -10,4 +10,3 @@ namespace ProtosLib
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -4,8 +4,8 @@ using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
|
|
||||||
namespace v2rayN
|
namespace v2rayN;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for App.xaml
|
/// Interaction logic for App.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -87,4 +87,3 @@ namespace v2rayN
|
||||||
Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
|
Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
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());
|
||||||
|
|
@ -178,4 +178,3 @@ namespace v2rayN.Base
|
||||||
downloadOpt = null;
|
downloadOpt = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -3,8 +3,8 @@ 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>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class HttpClientHelper
|
public class HttpClientHelper
|
||||||
|
|
@ -153,4 +153,3 @@ 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,8 +1,8 @@
|
||||||
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());
|
||||||
|
|
@ -119,4 +119,3 @@ namespace v2rayN.Base
|
||||||
return _dbAsync.Table<T>();
|
return _dbAsync.Table<T>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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)
|
||||||
|
|
@ -81,4 +81,3 @@ namespace v2rayN.Base
|
||||||
return char.ToUpper(value[0]) + value.Substring(1);
|
return char.ToUpper(value[0]) + value.Substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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)
|
||||||
|
|
@ -22,4 +22,3 @@ namespace v2rayN.Converters
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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))]
|
[ValueConversion(typeof(bool), typeof(bool))]
|
||||||
public class InverseBooleanConverter : IValueConverter
|
public class InverseBooleanConverter : IValueConverter
|
||||||
{
|
{
|
||||||
|
|
@ -21,4 +21,3 @@ namespace v2rayN.Converters
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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; }
|
||||||
|
|
@ -24,4 +24,3 @@ namespace v2rayN.Converters
|
||||||
MyFont ??= new FontFamily("Microsoft YaHei");
|
MyFont ??= new FontFamily("Microsoft YaHei");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN
|
namespace v2rayN;
|
||||||
{
|
|
||||||
internal class Global
|
internal class Global
|
||||||
{
|
{
|
||||||
#region const
|
#region const
|
||||||
|
|
@ -171,4 +171,3 @@
|
||||||
|
|
||||||
#endregion global variable
|
#endregion global variable
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 本软件配置文件处理类
|
/// 本软件配置文件处理类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -1622,4 +1622,3 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
#endregion DNS
|
#endregion DNS
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Core configuration file processing class
|
/// Core configuration file processing class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -153,4 +153,3 @@ namespace v2rayN.Handler
|
||||||
return coreConfigV2ray.GenerateClientSpeedtestConfigString(selecteds, out msg);
|
return coreConfigV2ray.GenerateClientSpeedtestConfigString(selecteds, out msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
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;
|
||||||
|
|
@ -737,4 +737,3 @@ namespace v2rayN.Handler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -4,8 +4,8 @@ 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;
|
||||||
|
|
@ -946,4 +946,3 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
#endregion Gen speedtest config
|
#endregion Gen speedtest config
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -4,8 +4,8 @@ using System.Text;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Core process processing class
|
/// Core process processing class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -359,4 +359,3 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
#endregion Process
|
#endregion Process
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -7,8 +7,8 @@ using System.Net.Sockets;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///Download
|
///Download
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -336,4 +336,3 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -7,8 +7,8 @@ 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());
|
||||||
|
|
@ -177,4 +177,3 @@ namespace v2rayN.Handler
|
||||||
NoRepeat = 0x4000
|
NoRepeat = 0x4000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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());
|
||||||
|
|
@ -365,4 +365,3 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
#endregion Core Type
|
#endregion Core Type
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ 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());
|
||||||
|
|
@ -225,4 +225,3 @@ namespace v2rayN.Handler
|
||||||
HotkeyHandler.Instance.Load();
|
HotkeyHandler.Instance.Load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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;
|
||||||
|
|
@ -30,4 +30,3 @@ namespace v2rayN.Handler
|
||||||
MessageBus.Current.SendMessage(msg, "MsgView");
|
MessageBus.Current.SendMessage(msg, "MsgView");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -3,8 +3,8 @@ 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());
|
||||||
|
|
@ -142,4 +142,3 @@ namespace v2rayN.Handler
|
||||||
return _lstProfileEx.Max(t => t == null ? 0 : t.sort);
|
return _lstProfileEx.Max(t => t == null ? 0 : t.sort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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()
|
||||||
|
|
@ -213,4 +213,3 @@ namespace v2rayN.Handler
|
||||||
return ProxyServer;
|
return ProxyServer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -2,11 +2,7 @@
|
||||||
using QRCoder.Xaml;
|
using QRCoder.Xaml;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 含有QR码的描述类和包装编码和渲染
|
|
||||||
/// </summary>
|
|
||||||
public class QRCodeHelper
|
public class QRCodeHelper
|
||||||
{
|
{
|
||||||
public static DrawingImage? GetQRCode(string strContent)
|
public static DrawingImage? GetQRCode(string strContent)
|
||||||
|
|
@ -25,4 +21,3 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -5,8 +5,8 @@ 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
|
||||||
|
|
@ -814,4 +814,3 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
#endregion ImportShareUrl
|
#endregion ImportShareUrl
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -5,8 +5,8 @@ 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;
|
||||||
|
|
@ -424,4 +424,3 @@ namespace v2rayN.Handler
|
||||||
_updateFunc(indexId, delay, speed);
|
_updateFunc(indexId, delay, speed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -3,8 +3,8 @@ 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;
|
||||||
|
|
@ -158,4 +158,3 @@ namespace v2rayN.Handler
|
||||||
return 69090;
|
return 69090;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
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;
|
||||||
|
|
@ -125,4 +125,3 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -3,8 +3,8 @@ 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;
|
||||||
|
|
@ -116,4 +116,3 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -6,8 +6,8 @@ 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";
|
||||||
|
|
@ -219,4 +219,3 @@ namespace v2rayN.Handler
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -11,8 +11,8 @@ 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;
|
||||||
|
|
@ -643,4 +643,3 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
#endregion private
|
#endregion private
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public class ComboItem
|
public class ComboItem
|
||||||
{
|
{
|
||||||
public string ID
|
public string ID
|
||||||
|
|
@ -12,4 +12,3 @@
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 本软件配置文件实体类
|
/// 本软件配置文件实体类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -34,4 +34,3 @@
|
||||||
|
|
||||||
#endregion other entities
|
#endregion other entities
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class CoreBasicItem
|
public class CoreBasicItem
|
||||||
{
|
{
|
||||||
|
|
@ -206,4 +206,3 @@ namespace v2rayN.Mode
|
||||||
public int max_streams { get; set; }
|
public int max_streams { get; set; }
|
||||||
public bool padding { get; set; }
|
public bool padding { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ConfigOld
|
public class ConfigOld
|
||||||
{
|
{
|
||||||
|
|
@ -437,4 +437,3 @@
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class CoreInfo
|
public class CoreInfo
|
||||||
{
|
{
|
||||||
|
|
@ -24,4 +24,3 @@
|
||||||
|
|
||||||
public bool redirectInfo { get; set; }
|
public bool redirectInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class DNSItem
|
public class DNSItem
|
||||||
{
|
{
|
||||||
|
|
@ -15,4 +15,3 @@ namespace v2rayN.Mode
|
||||||
public string? tunDNS { get; set; }
|
public string? tunDNS { get; set; }
|
||||||
public string? domainStrategy4Freedom { get; set; }
|
public string? domainStrategy4Freedom { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public enum EConfigType
|
public enum EConfigType
|
||||||
{
|
{
|
||||||
VMess = 1,
|
VMess = 1,
|
||||||
|
|
@ -9,4 +9,3 @@
|
||||||
VLESS = 5,
|
VLESS = 5,
|
||||||
Trojan = 6
|
Trojan = 6
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public enum ECoreType
|
public enum ECoreType
|
||||||
{
|
{
|
||||||
v2fly = 1,
|
v2fly = 1,
|
||||||
|
|
@ -15,4 +15,3 @@
|
||||||
juicity = 25,
|
juicity = 25,
|
||||||
v2rayN = 99
|
v2rayN = 99
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public enum EGlobalHotkey
|
public enum EGlobalHotkey
|
||||||
{
|
{
|
||||||
ShowForm = 0,
|
ShowForm = 0,
|
||||||
|
|
@ -8,4 +8,3 @@
|
||||||
SystemProxyUnchanged = 3,
|
SystemProxyUnchanged = 3,
|
||||||
SystemProxyPac = 4,
|
SystemProxyPac = 4,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public enum EMove
|
public enum EMove
|
||||||
{
|
{
|
||||||
Top = 1,
|
Top = 1,
|
||||||
|
|
@ -8,4 +8,3 @@
|
||||||
Bottom = 4,
|
Bottom = 4,
|
||||||
Position = 5
|
Position = 5
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public enum EServerColName
|
public enum EServerColName
|
||||||
{
|
{
|
||||||
def = 0,
|
def = 0,
|
||||||
|
|
@ -19,4 +19,3 @@
|
||||||
totalDown,
|
totalDown,
|
||||||
totalUp
|
totalUp
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public enum ESpeedActionType
|
public enum ESpeedActionType
|
||||||
{
|
{
|
||||||
Ping,
|
Ping,
|
||||||
|
|
@ -8,4 +8,3 @@
|
||||||
Speedtest,
|
Speedtest,
|
||||||
Mixedtest
|
Mixedtest
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public enum ESysProxyType
|
public enum ESysProxyType
|
||||||
{
|
{
|
||||||
ForcedClear = 0,
|
ForcedClear = 0,
|
||||||
|
|
@ -7,4 +7,3 @@
|
||||||
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,7 +1,7 @@
|
||||||
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; }
|
||||||
|
|
@ -65,4 +65,3 @@ namespace v2rayN.Mode
|
||||||
|
|
||||||
[JsonProperty("body")] public string Body { get; set; }
|
[JsonProperty("body")] public string Body { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ProfileExItem
|
public class ProfileExItem
|
||||||
{
|
{
|
||||||
|
|
@ -12,4 +12,3 @@ namespace v2rayN.Mode
|
||||||
public decimal speed { get; set; }
|
public decimal speed { get; set; }
|
||||||
public int sort { get; set; }
|
public int sort { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ProfileItem
|
public class ProfileItem
|
||||||
{
|
{
|
||||||
|
|
@ -192,4 +192,3 @@ namespace v2rayN.Mode
|
||||||
public string shortId { get; set; }
|
public string shortId { get; set; }
|
||||||
public string spiderX { get; set; }
|
public string spiderX { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ProfileItemModel : ProfileItem
|
public class ProfileItemModel : ProfileItem
|
||||||
{
|
{
|
||||||
|
|
@ -15,4 +15,3 @@
|
||||||
public string totalUp { get; set; }
|
public string totalUp { get; set; }
|
||||||
public string totalDown { get; set; }
|
public string totalDown { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RoutingItem
|
public class RoutingItem
|
||||||
{
|
{
|
||||||
|
|
@ -19,4 +19,3 @@ namespace v2rayN.Mode
|
||||||
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]
|
[Serializable]
|
||||||
public class RoutingItemModel : RoutingItem
|
public class RoutingItemModel : RoutingItem
|
||||||
{
|
{
|
||||||
public bool isActive { get; set; }
|
public bool isActive { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RulesItem
|
public class RulesItem
|
||||||
{
|
{
|
||||||
|
|
@ -22,4 +22,3 @@
|
||||||
|
|
||||||
public bool enabled { get; set; } = true;
|
public bool enabled { get; set; } = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RulesItemModel : RulesItem
|
public class RulesItemModel : RulesItem
|
||||||
{
|
{
|
||||||
|
|
@ -11,4 +11,3 @@
|
||||||
|
|
||||||
public string protocols { get; set; }
|
public string protocols { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class ServerSpeedItem : ServerStatItem
|
internal class ServerSpeedItem : ServerStatItem
|
||||||
{
|
{
|
||||||
|
|
@ -37,4 +37,3 @@
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ServerStatItem
|
public class ServerStatItem
|
||||||
{
|
{
|
||||||
|
|
@ -36,4 +36,3 @@ namespace v2rayN.Mode
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class ServerTestItem
|
internal class ServerTestItem
|
||||||
{
|
{
|
||||||
|
|
@ -10,4 +10,3 @@
|
||||||
public bool allowTest { get; set; }
|
public bool allowTest { get; set; }
|
||||||
public int delay { get; set; }
|
public int delay { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public class SingboxConfig
|
public class SingboxConfig
|
||||||
{
|
{
|
||||||
public Log4Sbox log { get; set; }
|
public Log4Sbox log { get; set; }
|
||||||
|
|
@ -209,4 +209,3 @@
|
||||||
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,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
public class SsSIP008
|
public class SsSIP008
|
||||||
{
|
{
|
||||||
public List<SsServer> servers { get; set; }
|
public List<SsServer> servers { get; set; }
|
||||||
|
|
@ -15,4 +15,3 @@
|
||||||
public string password { get; set; }
|
public string password { get; set; }
|
||||||
public string plugin { get; set; }
|
public string plugin { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SubItem
|
public class SubItem
|
||||||
{
|
{
|
||||||
|
|
@ -28,4 +28,3 @@ namespace v2rayN.Mode
|
||||||
|
|
||||||
public string? convertTarget { get; set; }
|
public string? convertTarget { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
internal class SysproxyConfig
|
internal class SysproxyConfig
|
||||||
{
|
{
|
||||||
public bool UserSettingsRecorded;
|
public bool UserSettingsRecorded;
|
||||||
|
|
@ -17,4 +17,3 @@
|
||||||
PacUrl = "";
|
PacUrl = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// v2ray配置文件实体类
|
/// v2ray配置文件实体类
|
||||||
/// 例子SampleConfig.txt
|
/// 例子SampleConfig.txt
|
||||||
|
|
@ -632,4 +632,3 @@ namespace v2rayN.Mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string pass { get; set; }
|
public string pass { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tcp伪装http的Request,只要Host
|
/// Tcp伪装http的Request,只要Host
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -18,4 +18,3 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> Host { get; set; }
|
public List<string> Host { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
namespace v2rayN.Mode
|
namespace v2rayN.Mode;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://github.com/2dust/v2rayN/wiki/
|
/// https://github.com/2dust/v2rayN/wiki/
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -81,4 +81,3 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string fp { get; set; } = string.Empty;
|
public string fp { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
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)
|
||||||
|
|
@ -87,4 +87,3 @@ namespace v2rayN.Tool
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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
|
||||||
|
|
@ -173,4 +173,3 @@ namespace v2rayN
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Helper classes
|
#endregion Helper classes
|
||||||
}
|
|
||||||
|
|
@ -3,8 +3,8 @@ 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()
|
||||||
|
|
@ -52,4 +52,3 @@ namespace v2rayN.Tool
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
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)
|
||||||
|
|
@ -47,4 +47,3 @@ namespace v2rayN.Tool
|
||||||
return lamba;
|
return lamba;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
|
|
||||||
namespace v2rayN.Tool
|
namespace v2rayN.Tool;
|
||||||
{
|
|
||||||
public class SemanticVersion
|
public class SemanticVersion
|
||||||
{
|
{
|
||||||
private int major;
|
private int major;
|
||||||
|
|
@ -179,4 +179,3 @@ namespace v2rayN.Tool
|
||||||
|
|
||||||
#endregion Private
|
#endregion Private
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
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";
|
||||||
|
|
@ -21,4 +21,3 @@ 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,8 +30,8 @@ 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操作
|
||||||
|
|
@ -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);
|
||||||
|
|
@ -1274,4 +1275,3 @@ namespace v2rayN
|
||||||
|
|
||||||
#endregion Windows API
|
#endregion Windows API
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -11,8 +11,8 @@ 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;
|
||||||
|
|
@ -157,4 +157,3 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -8,8 +8,8 @@ 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;
|
||||||
|
|
@ -159,4 +159,3 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -7,8 +7,8 @@ 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;
|
||||||
|
|
@ -107,4 +107,3 @@ namespace v2rayN.ViewModels
|
||||||
_view.DialogResult = true;
|
_view.DialogResult = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -22,8 +22,8 @@ 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
|
||||||
|
|
@ -1843,4 +1843,3 @@ namespace v2rayN.ViewModels
|
||||||
|
|
||||||
#endregion UI
|
#endregion UI
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -7,8 +7,8 @@ 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;
|
||||||
|
|
@ -365,4 +365,3 @@ namespace v2rayN.ViewModels
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -8,8 +8,8 @@ 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;
|
||||||
|
|
@ -102,4 +102,3 @@ namespace v2rayN.ViewModels
|
||||||
_view.DialogResult = true;
|
_view.DialogResult = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -12,8 +12,8 @@ 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;
|
||||||
|
|
@ -357,4 +357,3 @@ namespace v2rayN.ViewModels
|
||||||
|
|
||||||
#endregion Import rules
|
#endregion Import rules
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -10,8 +10,8 @@ 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;
|
||||||
|
|
@ -305,4 +305,3 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -8,8 +8,8 @@ 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;
|
||||||
|
|
@ -83,4 +83,3 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -12,8 +12,8 @@ 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;
|
||||||
|
|
@ -127,4 +127,3 @@ 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,8 +6,8 @@ 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";
|
||||||
|
|
@ -145,4 +145,3 @@ 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)
|
||||||
{
|
{
|
||||||
|
|
@ -17,4 +14,3 @@ namespace v2rayUpgrade
|
||||||
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