mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 12:32:10 +00:00
Compare commits
13 commits
6ad0762731
...
24ccfb8077
Author | SHA1 | Date | |
---|---|---|---|
![]() |
24ccfb8077 | ||
![]() |
204451db6c | ||
![]() |
f553bbc41e | ||
![]() |
8cb4f2f961 | ||
![]() |
4d3db56065 | ||
![]() |
d92540121f | ||
![]() |
17d586ea26 | ||
![]() |
9a096d31fc | ||
![]() |
bf83dbdfea | ||
![]() |
e31cd0e199 | ||
![]() |
1e11477e27 | ||
![]() |
e0750df96c | ||
![]() |
e3580b05f7 |
204 changed files with 24422 additions and 24339 deletions
|
@ -1,5 +1,5 @@
|
||||||
namespace AmazTool
|
namespace AmazTool;
|
||||||
{
|
|
||||||
internal static class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
[STAThread]
|
[STAThread]
|
||||||
|
@ -23,4 +23,3 @@ namespace AmazTool
|
||||||
UpgradeApp.Upgrade(argData);
|
UpgradeApp.Upgrade(argData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ using System.Diagnostics;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace AmazTool
|
namespace AmazTool;
|
||||||
{
|
|
||||||
internal class UpgradeApp
|
internal class UpgradeApp
|
||||||
{
|
{
|
||||||
public static void Upgrade(string fileName)
|
public static void Upgrade(string fileName)
|
||||||
|
@ -114,4 +114,3 @@ namespace AmazTool
|
||||||
Utils.StartV2RayN();
|
Utils.StartV2RayN();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace AmazTool
|
namespace AmazTool;
|
||||||
{
|
|
||||||
internal class Utils
|
internal class Utils
|
||||||
{
|
{
|
||||||
public static string GetExePath()
|
public static string GetExePath()
|
||||||
|
@ -49,4 +49,3 @@ namespace AmazTool
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>7.10.5</Version>
|
<Version>7.11.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||||
<NoWarn>CA1031;CS1591;NU1507;CA1416</NoWarn>
|
<NoWarn>CA1031;CS1591;NU1507;CA1416;IDE0058</NoWarn>
|
||||||
<Nullable>annotations</Nullable>
|
<Nullable>annotations</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Authors>2dust</Authors>
|
<Authors>2dust</Authors>
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.5" />
|
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.6" />
|
||||||
<PackageVersion Include="Avalonia.Desktop" Version="11.2.5" />
|
<PackageVersion Include="Avalonia.Desktop" Version="11.2.6" />
|
||||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.2.5" />
|
<PackageVersion Include="Avalonia.Diagnostics" Version="11.2.6" />
|
||||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.2.5" />
|
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.2.6" />
|
||||||
<PackageVersion Include="CliWrap" Version="3.8.2" />
|
<PackageVersion Include="CliWrap" Version="3.8.2" />
|
||||||
<PackageVersion Include="Downloader" Version="3.3.4" />
|
<PackageVersion Include="Downloader" Version="3.3.4" />
|
||||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.0" />
|
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.0" />
|
||||||
|
@ -18,12 +18,12 @@
|
||||||
<PackageVersion Include="ReactiveUI" Version="20.2.45" />
|
<PackageVersion Include="ReactiveUI" Version="20.2.45" />
|
||||||
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||||
<PackageVersion Include="ReactiveUI.WPF" Version="20.2.45" />
|
<PackageVersion Include="ReactiveUI.WPF" Version="20.2.45" />
|
||||||
<PackageVersion Include="Semi.Avalonia" Version="11.2.1.5" />
|
<PackageVersion Include="Semi.Avalonia" Version="11.2.1.6" />
|
||||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1.5" />
|
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1.6" />
|
||||||
<PackageVersion Include="Splat.NLog" Version="15.3.1" />
|
<PackageVersion Include="Splat.NLog" Version="15.3.1" />
|
||||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||||
<PackageVersion Include="TaskScheduler" Version="2.12.1" />
|
<PackageVersion Include="TaskScheduler" Version="2.12.1" />
|
||||||
<PackageVersion Include="WebDav.Client" Version="2.8.0" />
|
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
||||||
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
|
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
|
||||||
<PackageVersion Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.14" />
|
<PackageVersion Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace ServiceLib.Base;
|
||||||
|
|
||||||
namespace ServiceLib.Base
|
|
||||||
{
|
|
||||||
public class MyReactiveObject : ReactiveObject
|
public class MyReactiveObject : ReactiveObject
|
||||||
{
|
{
|
||||||
protected static Config? _config;
|
protected static Config? _config;
|
||||||
protected Func<EViewAction, object?, Task<bool>>? _updateView;
|
protected Func<EViewAction, object?, Task<bool>>? _updateView;
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class AesUtils
|
public class AesUtils
|
||||||
{
|
{
|
||||||
private const int KeySize = 256; // AES-256
|
private const int KeySize = 256; // AES-256
|
||||||
|
@ -98,4 +98,3 @@ namespace ServiceLib.Common
|
||||||
return randomNumber;
|
return randomNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class DesUtils
|
public class DesUtils
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -72,4 +72,3 @@ namespace ServiceLib.Common
|
||||||
return Utils.GetMd5(Utils.GetHomePath() + "DesUtils");
|
return Utils.GetMd5(Utils.GetHomePath() + "DesUtils");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Downloader;
|
using Downloader;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class DownloaderHelper
|
public class DownloaderHelper
|
||||||
{
|
{
|
||||||
private static readonly Lazy<DownloaderHelper> _instance = new(() => new());
|
private static readonly Lazy<DownloaderHelper> _instance = new(() => new());
|
||||||
|
@ -178,4 +178,3 @@ namespace ServiceLib.Common
|
||||||
downloadOpt = null;
|
downloadOpt = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ using System.Formats.Tar;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public static class FileManager
|
public static class FileManager
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "FileManager";
|
private static readonly string _tag = "FileManager";
|
||||||
|
@ -224,4 +224,3 @@ namespace ServiceLib.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ using System.Net.Http.Headers;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class HttpClientHelper
|
public class HttpClientHelper
|
||||||
|
@ -203,4 +203,3 @@ namespace ServiceLib.Common
|
||||||
} while (isMoreToRead);
|
} while (isMoreToRead);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* 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
|
||||||
|
@ -178,4 +177,4 @@ namespace ServiceLib.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Helper classes
|
#endregion Helper classes
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class JsonUtils
|
public class JsonUtils
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "JsonUtils";
|
private static readonly string _tag = "JsonUtils";
|
||||||
|
@ -128,4 +128,3 @@ namespace ServiceLib.Common
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static JsonNode? SerializeToNode(object? obj) => JsonSerializer.SerializeToNode(obj);
|
public static JsonNode? SerializeToNode(object? obj) => JsonSerializer.SerializeToNode(obj);
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -2,10 +2,13 @@ using NLog;
|
||||||
using NLog.Config;
|
using NLog.Config;
|
||||||
using NLog.Targets;
|
using NLog.Targets;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class Logging
|
public class Logging
|
||||||
{
|
{
|
||||||
|
private static readonly Logger _logger1 = LogManager.GetLogger("Log1");
|
||||||
|
private static readonly Logger _logger2 = LogManager.GetLogger("Log2");
|
||||||
|
|
||||||
public static void Setup()
|
public static void Setup()
|
||||||
{
|
{
|
||||||
LoggingConfiguration config = new();
|
LoggingConfiguration config = new();
|
||||||
|
@ -32,7 +35,7 @@ namespace ServiceLib.Common
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogManager.GetLogger("Log1").Info(strContent);
|
_logger1.Info(strContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SaveLog(string strTitle, Exception ex)
|
public static void SaveLog(string strTitle, Exception ex)
|
||||||
|
@ -42,13 +45,11 @@ namespace ServiceLib.Common
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var logger = LogManager.GetLogger("Log2");
|
_logger2.Debug($"{strTitle},{ex.Message}");
|
||||||
logger.Debug($"{strTitle},{ex.Message}");
|
_logger2.Debug(ex.StackTrace);
|
||||||
logger.Debug(ex.StackTrace);
|
|
||||||
if (ex?.InnerException != null)
|
if (ex?.InnerException != null)
|
||||||
{
|
{
|
||||||
logger.Error(ex.InnerException);
|
_logger2.Error(ex.InnerException);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
using QRCoder;
|
using QRCoder;
|
||||||
using SkiaSharp;
|
using SkiaSharp;
|
||||||
using ZXing.SkiaSharp;
|
using ZXing.SkiaSharp;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class QRCodeHelper
|
public class QRCodeHelper
|
||||||
{
|
{
|
||||||
public static byte[]? GenQRCode(string? url)
|
public static byte[]? GenQRCode(string? url)
|
||||||
|
@ -87,4 +87,3 @@ namespace ServiceLib.Common
|
||||||
return flipped;
|
return flipped;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class SemanticVersion
|
public class SemanticVersion
|
||||||
{
|
{
|
||||||
private readonly int major;
|
private readonly int major;
|
||||||
|
@ -184,4 +184,3 @@ namespace ServiceLib.Common
|
||||||
|
|
||||||
#endregion Private
|
#endregion Private
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public sealed class SQLiteHelper
|
public sealed class SQLiteHelper
|
||||||
{
|
{
|
||||||
private static readonly Lazy<SQLiteHelper> _instance = new(() => new());
|
private static readonly Lazy<SQLiteHelper> _instance = new(() => new());
|
||||||
|
@ -88,4 +88,3 @@ namespace ServiceLib.Common
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public static class StringEx
|
public static class StringEx
|
||||||
{
|
{
|
||||||
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
|
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
|
||||||
|
@ -80,4 +80,3 @@ namespace ServiceLib.Common
|
||||||
return int.TryParse(value, out var result) ? result : defaultValue;
|
return int.TryParse(value, out var result) ? result : defaultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ using System.Text;
|
||||||
using CliWrap;
|
using CliWrap;
|
||||||
using CliWrap.Buffered;
|
using CliWrap.Buffered;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class Utils
|
public class Utils
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "Utils";
|
private static readonly string _tag = "Utils";
|
||||||
|
@ -863,4 +863,3 @@ namespace ServiceLib.Common
|
||||||
|
|
||||||
#endregion Platform
|
#endregion Platform
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
internal static class WindowsUtils
|
internal static class WindowsUtils
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "WindowsUtils";
|
private static readonly string _tag = "WindowsUtils";
|
||||||
|
@ -71,4 +71,3 @@ namespace ServiceLib.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ using YamlDotNet.Core;
|
||||||
using YamlDotNet.Serialization;
|
using YamlDotNet.Serialization;
|
||||||
using YamlDotNet.Serialization.NamingConventions;
|
using YamlDotNet.Serialization.NamingConventions;
|
||||||
|
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
{
|
|
||||||
public class YamlUtils
|
public class YamlUtils
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "YamlUtils";
|
private static readonly string _tag = "YamlUtils";
|
||||||
|
@ -77,4 +77,3 @@ namespace ServiceLib.Common
|
||||||
|
|
||||||
#endregion YAML
|
#endregion YAML
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum EConfigType
|
public enum EConfigType
|
||||||
{
|
{
|
||||||
VMess = 1,
|
VMess = 1,
|
||||||
|
@ -13,4 +13,3 @@
|
||||||
WireGuard = 9,
|
WireGuard = 9,
|
||||||
HTTP = 10
|
HTTP = 10
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum ECoreType
|
public enum ECoreType
|
||||||
{
|
{
|
||||||
v2fly = 1,
|
v2fly = 1,
|
||||||
|
@ -16,4 +16,3 @@ namespace ServiceLib.Enums
|
||||||
overtls = 28,
|
overtls = 28,
|
||||||
v2rayN = 99
|
v2rayN = 99
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum EGirdOrientation
|
public enum EGirdOrientation
|
||||||
{
|
{
|
||||||
Horizontal,
|
Horizontal,
|
||||||
Vertical,
|
Vertical,
|
||||||
Tab,
|
Tab,
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
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 ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum EInboundProtocol
|
public enum EInboundProtocol
|
||||||
{
|
{
|
||||||
socks = 0,
|
socks = 0,
|
||||||
|
@ -11,4 +11,3 @@
|
||||||
mixed,
|
mixed,
|
||||||
speedtest = 21
|
speedtest = 21
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
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 ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum EMsgCommand
|
public enum EMsgCommand
|
||||||
{
|
{
|
||||||
ClearMsg,
|
ClearMsg,
|
||||||
|
@ -8,4 +8,3 @@ namespace ServiceLib.Enums
|
||||||
RefreshProfiles,
|
RefreshProfiles,
|
||||||
AppExit
|
AppExit
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
9
v2rayN/ServiceLib/Enums/EMultipleLoad.cs
Normal file
9
v2rayN/ServiceLib/Enums/EMultipleLoad.cs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EMultipleLoad
|
||||||
|
{
|
||||||
|
Random,
|
||||||
|
RoundRobin,
|
||||||
|
LeastPing,
|
||||||
|
LeastLoad
|
||||||
|
}
|
|
@ -1,9 +1,8 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum EPresetType
|
public enum EPresetType
|
||||||
{
|
{
|
||||||
Default = 0,
|
Default = 0,
|
||||||
Russia = 1,
|
Russia = 1,
|
||||||
Iran = 2,
|
Iran = 2,
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum ERuleMode
|
public enum ERuleMode
|
||||||
{
|
{
|
||||||
Rule = 0,
|
Rule = 0,
|
||||||
|
@ -7,4 +7,3 @@
|
||||||
Direct = 2,
|
Direct = 2,
|
||||||
Unchanged = 3
|
Unchanged = 3
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum EServerColName
|
public enum EServerColName
|
||||||
{
|
{
|
||||||
Def = 0,
|
Def = 0,
|
||||||
|
@ -18,4 +18,3 @@
|
||||||
TotalDown,
|
TotalDown,
|
||||||
TotalUp
|
TotalUp
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum ESpeedActionType
|
public enum ESpeedActionType
|
||||||
{
|
{
|
||||||
Tcping,
|
Tcping,
|
||||||
|
@ -7,4 +7,3 @@
|
||||||
Speedtest,
|
Speedtest,
|
||||||
Mixedtest
|
Mixedtest
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum ESysProxyType
|
public enum ESysProxyType
|
||||||
{
|
{
|
||||||
ForcedClear = 0,
|
ForcedClear = 0,
|
||||||
|
@ -7,4 +7,3 @@
|
||||||
Unchanged = 2,
|
Unchanged = 2,
|
||||||
Pac = 3
|
Pac = 3
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum ETheme
|
public enum ETheme
|
||||||
{
|
{
|
||||||
FollowSystem,
|
FollowSystem,
|
||||||
|
@ -10,4 +10,3 @@
|
||||||
Dusk,
|
Dusk,
|
||||||
NightSky
|
NightSky
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum ETransport
|
public enum ETransport
|
||||||
{
|
{
|
||||||
tcp,
|
tcp,
|
||||||
|
@ -12,4 +12,3 @@
|
||||||
quic,
|
quic,
|
||||||
grpc
|
grpc
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
{
|
|
||||||
public enum EViewAction
|
public enum EViewAction
|
||||||
{
|
{
|
||||||
CloseWindow,
|
CloseWindow,
|
||||||
|
@ -43,4 +43,3 @@
|
||||||
DispatcherCheckUpdateFinished,
|
DispatcherCheckUpdateFinished,
|
||||||
DispatcherShowMsg,
|
DispatcherShowMsg,
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib
|
namespace ServiceLib;
|
||||||
{
|
|
||||||
public class Global
|
public class Global
|
||||||
{
|
{
|
||||||
#region const
|
#region const
|
||||||
|
@ -521,4 +521,3 @@ namespace ServiceLib
|
||||||
|
|
||||||
#endregion const
|
#endregion const
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public sealed class AppHandler
|
public sealed class AppHandler
|
||||||
{
|
{
|
||||||
#region Property
|
#region Property
|
||||||
|
@ -80,6 +80,10 @@ namespace ServiceLib.Handler
|
||||||
Logging.SaveLog($"v2rayN start up | {Utils.GetRuntimeInfo()}");
|
Logging.SaveLog($"v2rayN start up | {Utils.GetRuntimeInfo()}");
|
||||||
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
|
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
|
||||||
|
|
||||||
|
//First determine the port value
|
||||||
|
_ = StatePort;
|
||||||
|
_ = StatePort2;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,4 +245,3 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
#endregion Core Type
|
#endregion Core Type
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public static class AutoStartupHandler
|
public static class AutoStartupHandler
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "AutoStartupHandler";
|
private static readonly string _tag = "AutoStartupHandler";
|
||||||
|
@ -239,4 +239,3 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
#endregion macOS
|
#endregion macOS
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using static ServiceLib.Models.ClashProxies;
|
using static ServiceLib.Models.ClashProxies;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public sealed class ClashApiHandler
|
public sealed class ClashApiHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<ClashApiHandler> instance = new(() => new());
|
private static readonly Lazy<ClashApiHandler> instance = new(() => new());
|
||||||
|
@ -185,4 +185,3 @@ namespace ServiceLib.Handler
|
||||||
return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}";
|
return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 本软件配置文件处理类
|
/// 本软件配置文件处理类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1005,12 +1005,12 @@ namespace ServiceLib.Handler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<RetResult> AddCustomServer4Multiple(Config config, List<ProfileItem> selecteds, ECoreType coreType)
|
public static async Task<RetResult> AddCustomServer4Multiple(Config config, List<ProfileItem> selecteds, ECoreType coreType, EMultipleLoad multipleLoad)
|
||||||
{
|
{
|
||||||
var indexId = Utils.GetMd5(Global.CoreMultipleLoadConfigFileName);
|
var indexId = Utils.GetMd5(Global.CoreMultipleLoadConfigFileName);
|
||||||
var configPath = Utils.GetConfigPath(Global.CoreMultipleLoadConfigFileName);
|
var configPath = Utils.GetConfigPath(Global.CoreMultipleLoadConfigFileName);
|
||||||
|
|
||||||
var result = await CoreConfigHandler.GenerateClientMultipleLoadConfig(config, configPath, selecteds, coreType);
|
var result = await CoreConfigHandler.GenerateClientMultipleLoadConfig(config, configPath, selecteds, coreType, multipleLoad);
|
||||||
if (result.Success != true)
|
if (result.Success != true)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
@ -1023,7 +1023,14 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new();
|
var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new();
|
||||||
profileItem.IndexId = indexId;
|
profileItem.IndexId = indexId;
|
||||||
profileItem.Remarks = coreType == ECoreType.sing_box ? ResUI.menuSetDefaultMultipleServer : ResUI.menuSetDefaultLoadBalanceServer;
|
profileItem.Remarks = multipleLoad switch
|
||||||
|
{
|
||||||
|
EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom,
|
||||||
|
EMultipleLoad.RoundRobin => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
|
||||||
|
EMultipleLoad.LeastPing => ResUI.menuSetDefaultMultipleServerXrayLeastPing,
|
||||||
|
EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad,
|
||||||
|
_ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
|
||||||
|
};
|
||||||
profileItem.Address = Global.CoreMultipleLoadConfigFileName;
|
profileItem.Address = Global.CoreMultipleLoadConfigFileName;
|
||||||
profileItem.ConfigType = EConfigType.Custom;
|
profileItem.ConfigType = EConfigType.Custom;
|
||||||
profileItem.CoreType = coreType;
|
profileItem.CoreType = coreType;
|
||||||
|
@ -1916,4 +1923,3 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
#endregion Regional Presets
|
#endregion Regional Presets
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Core configuration file processing class
|
/// Core configuration file processing class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -133,16 +133,16 @@ namespace ServiceLib.Handler
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType)
|
public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType, EMultipleLoad multipleLoad)
|
||||||
{
|
{
|
||||||
var result = new RetResult();
|
var result = new RetResult();
|
||||||
if (coreType == ECoreType.sing_box)
|
if (coreType == ECoreType.sing_box)
|
||||||
{
|
{
|
||||||
result = await new CoreConfigSingboxService(config).GenerateClientMultipleLoadConfig(selecteds);
|
result = await new CoreConfigSingboxService(config).GenerateClientMultipleLoadConfig(selecteds);
|
||||||
}
|
}
|
||||||
else if (coreType == ECoreType.Xray)
|
else
|
||||||
{
|
{
|
||||||
result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds);
|
result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds, multipleLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.Success != true)
|
if (result.Success != true)
|
||||||
|
@ -153,4 +153,3 @@ namespace ServiceLib.Handler
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Core process processing class
|
/// Core process processing class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -407,4 +407,3 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
#endregion Linux
|
#endregion Linux
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public sealed class CoreInfoHandler
|
public sealed class CoreInfoHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<CoreInfoHandler> _instance = new(() => new());
|
private static readonly Lazy<CoreInfoHandler> _instance = new(() => new());
|
||||||
|
@ -215,4 +215,3 @@ namespace ServiceLib.Handler
|
||||||
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
|
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class BaseFmt
|
public class BaseFmt
|
||||||
{
|
{
|
||||||
protected static string GetIpv6(string address)
|
protected static string GetIpv6(string address)
|
||||||
|
@ -239,4 +239,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}";
|
return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class ClashFmt : BaseFmt
|
public class ClashFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
|
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
|
||||||
|
@ -20,4 +20,3 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class FmtHandler
|
public class FmtHandler
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "FmtHandler";
|
private static readonly string _tag = "FmtHandler";
|
||||||
|
@ -89,4 +89,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class Hysteria2Fmt : BaseFmt
|
public class Hysteria2Fmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -99,4 +99,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class NaiveproxyFmt : BaseFmt
|
public class NaiveproxyFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
|
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
|
||||||
|
@ -20,4 +20,3 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class ShadowsocksFmt : BaseFmt
|
public class ShadowsocksFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -177,4 +177,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class SingboxFmt : BaseFmt
|
public class SingboxFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
|
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
|
||||||
|
@ -45,4 +45,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return profileItem;
|
return profileItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class SocksFmt : BaseFmt
|
public class SocksFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -112,4 +112,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class TrojanFmt : BaseFmt
|
public class TrojanFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -45,4 +45,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return ToUri(EConfigType.Trojan, item.Address, item.Port, item.Id, dicQuery, remark);
|
return ToUri(EConfigType.Trojan, item.Address, item.Port, item.Id, dicQuery, remark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class TuicFmt : BaseFmt
|
public class TuicFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -61,4 +61,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return ToUri(EConfigType.TUIC, item.Address, item.Port, $"{item.Id}:{item.Security}", dicQuery, remark);
|
return ToUri(EConfigType.TUIC, item.Address, item.Port, $"{item.Id}:{item.Security}", dicQuery, remark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class V2rayFmt : BaseFmt
|
public class V2rayFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
|
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
|
||||||
|
@ -46,4 +46,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return profileItem;
|
return profileItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class VLESSFmt : BaseFmt
|
public class VLESSFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -57,4 +57,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return ToUri(EConfigType.VLESS, item.Address, item.Port, item.Id, dicQuery, remark);
|
return ToUri(EConfigType.VLESS, item.Address, item.Port, item.Id, dicQuery, remark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class VmessFmt : BaseFmt
|
public class VmessFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -123,4 +123,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.Fmt
|
namespace ServiceLib.Handler.Fmt;
|
||||||
{
|
|
||||||
public class WireguardFmt : BaseFmt
|
public class WireguardFmt : BaseFmt
|
||||||
{
|
{
|
||||||
public static ProfileItem? Resolve(string str, out string msg)
|
public static ProfileItem? Resolve(string str, out string msg)
|
||||||
|
@ -65,4 +65,3 @@ namespace ServiceLib.Handler.Fmt
|
||||||
return ToUri(EConfigType.WireGuard, item.Address, item.Port, item.Id, dicQuery, remark);
|
return ToUri(EConfigType.WireGuard, item.Address, item.Port, item.Id, dicQuery, remark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace ServiceLib.Handler;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
|
||||||
{
|
|
||||||
public class NoticeHandler
|
public class NoticeHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<NoticeHandler> _instance = new(() => new());
|
private static readonly Lazy<NoticeHandler> _instance = new(() => new());
|
||||||
|
@ -41,4 +41,3 @@ namespace ServiceLib.Handler
|
||||||
SendMessage(msg);
|
SendMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public class PacHandler
|
public class PacHandler
|
||||||
{
|
{
|
||||||
private static string _configPath;
|
private static string _configPath;
|
||||||
|
@ -112,4 +112,3 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ using System.Collections.Concurrent;
|
||||||
|
|
||||||
//using System.Reactive.Linq;
|
//using System.Reactive.Linq;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public class ProfileExHandler
|
public class ProfileExHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<ProfileExHandler> _instance = new(() => new());
|
private static readonly Lazy<ProfileExHandler> _instance = new(() => new());
|
||||||
|
@ -179,4 +179,3 @@ namespace ServiceLib.Handler
|
||||||
return _lstProfileEx.Max(t => t == null ? 0 : t.Sort);
|
return _lstProfileEx.Max(t => t == null ? 0 : t.Sort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public class StatisticsHandler
|
public class StatisticsHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<StatisticsHandler> instance = new(() => new());
|
private static readonly Lazy<StatisticsHandler> instance = new(() => new());
|
||||||
|
@ -161,4 +161,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.SysProxy
|
namespace ServiceLib.Handler.SysProxy;
|
||||||
{
|
|
||||||
public class ProxySettingLinux
|
public class ProxySettingLinux
|
||||||
{
|
{
|
||||||
private static readonly string _proxySetFileName = $"{Global.ProxySetLinuxShellFileName.Replace(Global.NamespaceSample, "")}.sh";
|
private static readonly string _proxySetFileName = $"{Global.ProxySetLinuxShellFileName.Replace(Global.NamespaceSample, "")}.sh";
|
||||||
|
@ -30,4 +30,3 @@ namespace ServiceLib.Handler.SysProxy
|
||||||
await Utils.GetCliWrapOutput(fileName, args);
|
await Utils.GetCliWrapOutput(fileName, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.SysProxy
|
namespace ServiceLib.Handler.SysProxy;
|
||||||
{
|
|
||||||
public class ProxySettingOSX
|
public class ProxySettingOSX
|
||||||
{
|
{
|
||||||
private static readonly string _proxySetFileName = $"{Global.ProxySetOSXShellFileName.Replace(Global.NamespaceSample, "")}.sh";
|
private static readonly string _proxySetFileName = $"{Global.ProxySetOSXShellFileName.Replace(Global.NamespaceSample, "")}.sh";
|
||||||
|
@ -35,4 +35,3 @@ namespace ServiceLib.Handler.SysProxy
|
||||||
await Utils.GetCliWrapOutput(fileName, args);
|
await Utils.GetCliWrapOutput(fileName, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using static ServiceLib.Handler.SysProxy.ProxySettingWindows.InternetConnectionOption;
|
using static ServiceLib.Handler.SysProxy.ProxySettingWindows.InternetConnectionOption;
|
||||||
|
|
||||||
namespace ServiceLib.Handler.SysProxy
|
namespace ServiceLib.Handler.SysProxy;
|
||||||
{
|
|
||||||
public class ProxySettingWindows
|
public class ProxySettingWindows
|
||||||
{
|
{
|
||||||
private const string _regPath = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings";
|
private const string _regPath = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings";
|
||||||
|
@ -357,4 +357,3 @@ namespace ServiceLib.Handler.SysProxy
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler.SysProxy
|
namespace ServiceLib.Handler.SysProxy;
|
||||||
{
|
|
||||||
public static class SysProxyHandler
|
public static class SysProxyHandler
|
||||||
{
|
{
|
||||||
private static readonly string _tag = "SysProxyHandler";
|
private static readonly string _tag = "SysProxyHandler";
|
||||||
|
@ -96,4 +96,3 @@
|
||||||
ProxySettingWindows.SetProxy(strProxy, "", 4);
|
ProxySettingWindows.SetProxy(strProxy, "", 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public class TaskHandler
|
public class TaskHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<TaskHandler> _instance = new(() => new());
|
private static readonly Lazy<TaskHandler> _instance = new(() => new());
|
||||||
|
@ -95,4 +95,3 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using WebDav;
|
using WebDav;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
{
|
|
||||||
public sealed class WebDavHandler
|
public sealed class WebDavHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<WebDavHandler> _instance = new(() => new());
|
private static readonly Lazy<WebDavHandler> _instance = new(() => new());
|
||||||
|
@ -179,4 +179,3 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
public string GetLastError() => _lastDescription ?? string.Empty;
|
public string GetLastError() => _lastDescription ?? string.Empty;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class CheckUpdateModel
|
public class CheckUpdateModel
|
||||||
{
|
{
|
||||||
public bool? IsSelected { get; set; }
|
public bool? IsSelected { get; set; }
|
||||||
|
@ -8,4 +8,3 @@
|
||||||
public string? FileName { get; set; }
|
public string? FileName { get; set; }
|
||||||
public bool? IsFinished { get; set; }
|
public bool? IsFinished { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class ClashConnectionModel
|
public class ClashConnectionModel
|
||||||
{
|
{
|
||||||
public string? Id { get; set; }
|
public string? Id { get; set; }
|
||||||
|
@ -14,4 +14,3 @@
|
||||||
public string? Elapsed { get; set; }
|
public string? Elapsed { get; set; }
|
||||||
public string? Chain { get; set; }
|
public string? Chain { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class ClashConnections
|
public class ClashConnections
|
||||||
{
|
{
|
||||||
public ulong downloadTotal { get; set; }
|
public ulong downloadTotal { get; set; }
|
||||||
|
@ -34,4 +34,3 @@
|
||||||
public string? processPath { get; set; }
|
public string? processPath { get; set; }
|
||||||
public string? remoteDestination { get; set; }
|
public string? remoteDestination { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
using static ServiceLib.Models.ClashProxies;
|
using static ServiceLib.Models.ClashProxies;
|
||||||
|
|
||||||
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
|
||||||
{
|
|
||||||
public class ClashProviders
|
public class ClashProviders
|
||||||
{
|
{
|
||||||
public Dictionary<string, ProvidersItem>? providers { get; set; }
|
public Dictionary<string, ProvidersItem>? providers { get; set; }
|
||||||
|
@ -14,4 +14,3 @@ namespace ServiceLib.Models
|
||||||
public string? vehicleType { get; set; }
|
public string? vehicleType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class ClashProxies
|
public class ClashProxies
|
||||||
{
|
{
|
||||||
public Dictionary<string, ProxiesItem>? proxies { get; set; }
|
public Dictionary<string, ProxiesItem>? proxies { get; set; }
|
||||||
|
@ -21,4 +21,3 @@
|
||||||
public int delay { get; set; }
|
public int delay { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ClashProxyModel
|
public class ClashProxyModel
|
||||||
{
|
{
|
||||||
|
@ -15,4 +15,3 @@
|
||||||
|
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,8 +1,7 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class CmdItem
|
public class CmdItem
|
||||||
{
|
{
|
||||||
public string? Cmd { get; set; }
|
public string? Cmd { get; set; }
|
||||||
public List<string>? Arguments { get; set; }
|
public List<string>? Arguments { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
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 ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 本软件配置文件实体类
|
/// 本软件配置文件实体类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -54,4 +54,3 @@
|
||||||
|
|
||||||
#endregion other entities
|
#endregion other entities
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class CoreBasicItem
|
public class CoreBasicItem
|
||||||
{
|
{
|
||||||
|
@ -245,4 +245,3 @@ namespace ServiceLib.Models
|
||||||
public string? Length { get; set; }
|
public string? Length { get; set; }
|
||||||
public string? Interval { get; set; }
|
public string? Interval { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class CoreInfo
|
public class CoreInfo
|
||||||
{
|
{
|
||||||
|
@ -18,4 +18,3 @@ namespace ServiceLib.Models
|
||||||
public string? VersionArg { get; set; }
|
public string? VersionArg { get; set; }
|
||||||
public bool AbsolutePath { get; set; }
|
public bool AbsolutePath { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class DNSItem
|
public class DNSItem
|
||||||
{
|
{
|
||||||
|
@ -17,4 +17,3 @@ namespace ServiceLib.Models
|
||||||
public string? DomainStrategy4Freedom { get; set; }
|
public string? DomainStrategy4Freedom { get; set; }
|
||||||
public string? DomainDNSAddress { get; set; }
|
public string? DomainDNSAddress { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
|
||||||
{
|
|
||||||
public class GitHubReleaseAsset
|
public class GitHubReleaseAsset
|
||||||
{
|
{
|
||||||
[JsonPropertyName("url")] public string? Url { get; set; }
|
[JsonPropertyName("url")] public string? Url { get; set; }
|
||||||
|
@ -65,4 +65,3 @@ namespace ServiceLib.Models
|
||||||
|
|
||||||
[JsonPropertyName("body")] public string? Body { get; set; }
|
[JsonPropertyName("body")] public string? Body { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
internal class IPAPIInfo
|
internal class IPAPIInfo
|
||||||
{
|
{
|
||||||
public string? ip { get; set; }
|
public string? ip { get; set; }
|
||||||
|
@ -10,4 +10,3 @@
|
||||||
public string? country_name { get; set; }
|
public string? country_name { get; set; }
|
||||||
public string? country_code { get; set; }
|
public string? country_code { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ProfileExItem
|
public class ProfileExItem
|
||||||
{
|
{
|
||||||
|
@ -13,4 +13,3 @@ namespace ServiceLib.Models
|
||||||
public int Sort { get; set; }
|
public int Sort { get; set; }
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ProfileItem
|
public class ProfileItem
|
||||||
{
|
{
|
||||||
|
@ -64,6 +64,7 @@ namespace ServiceLib.Models
|
||||||
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string IndexId { get; set; }
|
public string IndexId { get; set; }
|
||||||
|
|
||||||
public EConfigType ConfigType { get; set; }
|
public EConfigType ConfigType { get; set; }
|
||||||
public int ConfigVersion { get; set; }
|
public int ConfigVersion { get; set; }
|
||||||
public string Address { get; set; }
|
public string Address { get; set; }
|
||||||
|
@ -93,4 +94,3 @@ namespace ServiceLib.Models
|
||||||
public string SpiderX { get; set; }
|
public string SpiderX { get; set; }
|
||||||
public string Extra { get; set; }
|
public string Extra { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[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,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class RetResult
|
public class RetResult
|
||||||
{
|
{
|
||||||
public bool Success { get; set; }
|
public bool Success { get; set; }
|
||||||
|
@ -24,4 +24,3 @@
|
||||||
Data = data;
|
Data = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RoutingItem
|
public class RoutingItem
|
||||||
{
|
{
|
||||||
|
@ -20,4 +20,3 @@ namespace ServiceLib.Models
|
||||||
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 ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RoutingItemModel : RoutingItem
|
public class RoutingItemModel : RoutingItem
|
||||||
{
|
{
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,9 +1,8 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RoutingTemplate
|
public class RoutingTemplate
|
||||||
{
|
{
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
public RoutingItem[] RoutingItems { get; set; }
|
public RoutingItem[] RoutingItems { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RulesItem
|
public class RulesItem
|
||||||
{
|
{
|
||||||
|
@ -16,4 +16,3 @@
|
||||||
public bool Enabled { get; set; } = true;
|
public bool Enabled { get; set; } = true;
|
||||||
public string? Remarks { get; set; }
|
public string? Remarks { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RulesItemModel : RulesItem
|
public class RulesItemModel : RulesItem
|
||||||
{
|
{
|
||||||
|
@ -8,4 +8,3 @@
|
||||||
public string Domains { get; set; }
|
public string Domains { get; set; }
|
||||||
public string Protocols { get; set; }
|
public string Protocols { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ServerSpeedItem : ServerStatItem
|
public class ServerSpeedItem : ServerStatItem
|
||||||
{
|
{
|
||||||
|
@ -19,4 +19,3 @@
|
||||||
|
|
||||||
public ulong Down { get; set; }
|
public ulong Down { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ServerStatItem
|
public class ServerStatItem
|
||||||
{
|
{
|
||||||
|
@ -18,4 +18,3 @@ namespace ServiceLib.Models
|
||||||
|
|
||||||
public long DateNow { get; set; }
|
public long DateNow { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ServerTestItem
|
public class ServerTestItem
|
||||||
{
|
{
|
||||||
|
@ -10,4 +10,3 @@ namespace ServiceLib.Models
|
||||||
public bool AllowTest { get; set; }
|
public bool AllowTest { get; set; }
|
||||||
public int QueueNum { get; set; }
|
public int QueueNum { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class SingboxConfig
|
public class SingboxConfig
|
||||||
{
|
{
|
||||||
public Log4Sbox log { get; set; }
|
public Log4Sbox log { get; set; }
|
||||||
|
@ -254,4 +254,3 @@ namespace ServiceLib.Models
|
||||||
public string? download_detour { get; set; }
|
public string? download_detour { get; set; }
|
||||||
public string? update_interval { get; set; }
|
public string? update_interval { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SpeedTestResult
|
public class SpeedTestResult
|
||||||
{
|
{
|
||||||
|
@ -9,4 +9,3 @@
|
||||||
|
|
||||||
public string? Speed { get; set; }
|
public string? Speed { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
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 ServiceLib.Models;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
|
||||||
{
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SubItem
|
public class SubItem
|
||||||
{
|
{
|
||||||
|
@ -36,4 +36,3 @@ namespace ServiceLib.Models
|
||||||
|
|
||||||
public string? Memo { get; set; }
|
public string? Memo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class V2rayConfig
|
public class V2rayConfig
|
||||||
{
|
{
|
||||||
public Log4Ray log { get; set; }
|
public Log4Ray log { get; set; }
|
||||||
|
@ -12,6 +12,8 @@ namespace ServiceLib.Models
|
||||||
public Metrics4Ray? metrics { get; set; }
|
public Metrics4Ray? metrics { get; set; }
|
||||||
public Policy4Ray? policy { get; set; }
|
public Policy4Ray? policy { get; set; }
|
||||||
public Stats4Ray? stats { get; set; }
|
public Stats4Ray? stats { get; set; }
|
||||||
|
public Observatory4Ray? observatory { get; set; }
|
||||||
|
public BurstObservatory4Ray? burstObservatory { get; set; }
|
||||||
public string? remarks { get; set; }
|
public string? remarks { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,6 +234,46 @@ namespace ServiceLib.Models
|
||||||
public class BalancersStrategy4Ray
|
public class BalancersStrategy4Ray
|
||||||
{
|
{
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
|
public BalancersStrategySettings4Ray? settings { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BalancersStrategySettings4Ray
|
||||||
|
{
|
||||||
|
public int? expected { get; set; }
|
||||||
|
public string? maxRTT { get; set; }
|
||||||
|
public float? tolerance { get; set; }
|
||||||
|
public List<string>? baselines { get; set; }
|
||||||
|
public List<BalancersStrategySettingsCosts4Ray>? costs { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BalancersStrategySettingsCosts4Ray
|
||||||
|
{
|
||||||
|
public bool? regexp { get; set; }
|
||||||
|
public string? match { get; set; }
|
||||||
|
public float? value { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Observatory4Ray
|
||||||
|
{
|
||||||
|
public List<string>? subjectSelector { get; set; }
|
||||||
|
public string? probeUrl { get; set; }
|
||||||
|
public string? probeInterval { get; set; }
|
||||||
|
public bool? enableConcurrency { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BurstObservatory4Ray
|
||||||
|
{
|
||||||
|
public List<string>? subjectSelector { get; set; }
|
||||||
|
public BurstObservatoryPingConfig4Ray? pingConfig { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BurstObservatoryPingConfig4Ray
|
||||||
|
{
|
||||||
|
public string? destination { get; set; }
|
||||||
|
public string? connectivity { get; set; }
|
||||||
|
public string? interval { get; set; }
|
||||||
|
public int? sampling { get; set; }
|
||||||
|
public string? timeout { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StreamSettings4Ray
|
public class StreamSettings4Ray
|
||||||
|
@ -392,4 +434,3 @@ namespace ServiceLib.Models
|
||||||
public string? length { get; set; }
|
public string? length { get; set; }
|
||||||
public string? interval { get; set; }
|
public string? interval { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue