Compare commits

..

No commits in common. "24ccfb80776585bee04b0544999f2ba58eb9e21c" and "6ad07627314ebd7a6f523264884e18c1046cbd69" have entirely different histories.

204 changed files with 24063 additions and 24146 deletions

View file

@ -1,5 +1,5 @@
namespace AmazTool; namespace AmazTool
{
internal static class Program internal static class Program
{ {
[STAThread] [STAThread]
@ -23,3 +23,4 @@ internal static class Program
UpgradeApp.Upgrade(argData); UpgradeApp.Upgrade(argData);
} }
} }
}

View file

@ -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,3 +114,4 @@ internal class UpgradeApp
Utils.StartV2RayN(); Utils.StartV2RayN();
} }
} }
}

View file

@ -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,3 +49,4 @@ internal class Utils
} }
} }
} }
}

View file

@ -1,14 +1,14 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>7.11.0</Version> <Version>7.10.5</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;IDE0058</NoWarn> <NoWarn>CA1031;CS1591;NU1507;CA1416</NoWarn>
<Nullable>annotations</Nullable> <Nullable>annotations</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Authors>2dust</Authors> <Authors>2dust</Authors>

View file

@ -5,10 +5,10 @@
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled> <CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.6" /> <PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.5" />
<PackageVersion Include="Avalonia.Desktop" Version="11.2.6" /> <PackageVersion Include="Avalonia.Desktop" Version="11.2.5" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.2.6" /> <PackageVersion Include="Avalonia.Diagnostics" Version="11.2.5" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.2.6" /> <PackageVersion Include="Avalonia.ReactiveUI" Version="11.2.5" />
<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.6" /> <PackageVersion Include="Semi.Avalonia" Version="11.2.1.5" />
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1.6" /> <PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1.5" />
<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.9.0" /> <PackageVersion Include="WebDav.Client" Version="2.8.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>

View file

@ -1,9 +1,10 @@
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;
} }
}

View file

@ -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,3 +98,4 @@ public class AesUtils
return randomNumber; return randomNumber;
} }
} }
}

View file

@ -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,3 +72,4 @@ public class DesUtils
return Utils.GetMd5(Utils.GetHomePath() + "DesUtils"); return Utils.GetMd5(Utils.GetHomePath() + "DesUtils");
} }
} }
}

View file

@ -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,3 +178,4 @@ public class DownloaderHelper
downloadOpt = null; downloadOpt = null;
} }
} }
}

View file

@ -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,3 +224,4 @@ public static class FileManager
} }
} }
} }
}

View file

@ -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,3 +203,4 @@ public class HttpClientHelper
} while (isMoreToRead); } while (isMoreToRead);
} }
} }
}

View file

@ -1,7 +1,8 @@
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
@ -177,4 +178,4 @@ namespace ServiceLib.Common;
} }
#endregion Helper classes #endregion Helper classes
}

View file

@ -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,3 +128,4 @@ public class JsonUtils
/// <returns></returns> /// <returns></returns>
public static JsonNode? SerializeToNode(object? obj) => JsonSerializer.SerializeToNode(obj); public static JsonNode? SerializeToNode(object? obj) => JsonSerializer.SerializeToNode(obj);
} }
}

View file

@ -2,13 +2,10 @@ 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();
@ -35,7 +32,7 @@ public class Logging
return; return;
} }
_logger1.Info(strContent); LogManager.GetLogger("Log1").Info(strContent);
} }
public static void SaveLog(string strTitle, Exception ex) public static void SaveLog(string strTitle, Exception ex)
@ -45,11 +42,13 @@ public class Logging
return; return;
} }
_logger2.Debug($"{strTitle},{ex.Message}"); var logger = LogManager.GetLogger("Log2");
_logger2.Debug(ex.StackTrace); logger.Debug($"{strTitle},{ex.Message}");
logger.Debug(ex.StackTrace);
if (ex?.InnerException != null) if (ex?.InnerException != null)
{ {
_logger2.Error(ex.InnerException); logger.Error(ex.InnerException);
}
} }
} }
} }

View file

@ -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,3 +87,4 @@ public class QRCodeHelper
return flipped; return flipped;
} }
} }
}

View file

@ -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,3 +184,4 @@ public class SemanticVersion
#endregion Private #endregion Private
} }
}

View file

@ -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,3 +88,4 @@ public sealed class SQLiteHelper
}); });
} }
} }
}

View file

@ -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,3 +80,4 @@ public static class StringEx
return int.TryParse(value, out var result) ? result : defaultValue; return int.TryParse(value, out var result) ? result : defaultValue;
} }
} }
}

View file

@ -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,3 +863,4 @@ public class Utils
#endregion Platform #endregion Platform
} }
}

View file

@ -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,3 +71,4 @@ internal static class WindowsUtils
} }
} }
} }
}

View file

@ -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,3 +77,4 @@ public class YamlUtils
#endregion YAML #endregion YAML
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EConfigType public enum EConfigType
{ {
VMess = 1, VMess = 1,
@ -13,3 +13,4 @@ public enum EConfigType
WireGuard = 9, WireGuard = 9,
HTTP = 10 HTTP = 10
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum ECoreType public enum ECoreType
{ {
v2fly = 1, v2fly = 1,
@ -16,3 +16,4 @@ public enum ECoreType
overtls = 28, overtls = 28,
v2rayN = 99 v2rayN = 99
} }
}

View file

@ -1,8 +1,9 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EGirdOrientation public enum EGirdOrientation
{ {
Horizontal, Horizontal,
Vertical, Vertical,
Tab, Tab,
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EGlobalHotkey public enum EGlobalHotkey
{ {
ShowForm = 0, ShowForm = 0,
@ -8,3 +8,4 @@ public enum EGlobalHotkey
SystemProxyUnchanged = 3, SystemProxyUnchanged = 3,
SystemProxyPac = 4, SystemProxyPac = 4,
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EInboundProtocol public enum EInboundProtocol
{ {
socks = 0, socks = 0,
@ -11,3 +11,4 @@ public enum EInboundProtocol
mixed, mixed,
speedtest = 21 speedtest = 21
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EMove public enum EMove
{ {
Top = 1, Top = 1,
@ -8,3 +8,4 @@ public enum EMove
Bottom = 4, Bottom = 4,
Position = 5 Position = 5
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EMsgCommand public enum EMsgCommand
{ {
ClearMsg, ClearMsg,
@ -8,3 +8,4 @@ public enum EMsgCommand
RefreshProfiles, RefreshProfiles,
AppExit AppExit
} }
}

View file

@ -1,9 +0,0 @@
namespace ServiceLib.Enums;
public enum EMultipleLoad
{
Random,
RoundRobin,
LeastPing,
LeastLoad
}

View file

@ -1,8 +1,9 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EPresetType public enum EPresetType
{ {
Default = 0, Default = 0,
Russia = 1, Russia = 1,
Iran = 2, Iran = 2,
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum ERuleMode public enum ERuleMode
{ {
Rule = 0, Rule = 0,
@ -7,3 +7,4 @@ public enum ERuleMode
Direct = 2, Direct = 2,
Unchanged = 3 Unchanged = 3
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EServerColName public enum EServerColName
{ {
Def = 0, Def = 0,
@ -18,3 +18,4 @@ public enum EServerColName
TotalDown, TotalDown,
TotalUp TotalUp
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum ESpeedActionType public enum ESpeedActionType
{ {
Tcping, Tcping,
@ -7,3 +7,4 @@ public enum ESpeedActionType
Speedtest, Speedtest,
Mixedtest Mixedtest
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum ESysProxyType public enum ESysProxyType
{ {
ForcedClear = 0, ForcedClear = 0,
@ -7,3 +7,4 @@ public enum ESysProxyType
Unchanged = 2, Unchanged = 2,
Pac = 3 Pac = 3
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum ETheme public enum ETheme
{ {
FollowSystem, FollowSystem,
@ -10,3 +10,4 @@ public enum ETheme
Dusk, Dusk,
NightSky NightSky
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum ETransport public enum ETransport
{ {
tcp, tcp,
@ -12,3 +12,4 @@ public enum ETransport
quic, quic,
grpc grpc
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums; namespace ServiceLib.Enums
{
public enum EViewAction public enum EViewAction
{ {
CloseWindow, CloseWindow,
@ -43,3 +43,4 @@ public enum EViewAction
DispatcherCheckUpdateFinished, DispatcherCheckUpdateFinished,
DispatcherShowMsg, DispatcherShowMsg,
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib; namespace ServiceLib
{
public class Global public class Global
{ {
#region const #region const
@ -521,3 +521,4 @@ public class Global
#endregion const #endregion const
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler; namespace ServiceLib.Handler
{
public sealed class AppHandler public sealed class AppHandler
{ {
#region Property #region Property
@ -80,10 +80,6 @@ public sealed class AppHandler
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;
} }
@ -245,3 +241,4 @@ public sealed class AppHandler
#endregion Core Type #endregion Core Type
} }
}

View file

@ -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,3 +239,4 @@ public static class AutoStartupHandler
#endregion macOS #endregion macOS
} }
}

View file

@ -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,3 +185,4 @@ public sealed class ClashApiHandler
return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}"; return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}";
} }
} }
}

View file

@ -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 @@ public class ConfigHandler
return 0; return 0;
} }
public static async Task<RetResult> AddCustomServer4Multiple(Config config, List<ProfileItem> selecteds, ECoreType coreType, EMultipleLoad multipleLoad) public static async Task<RetResult> AddCustomServer4Multiple(Config config, List<ProfileItem> selecteds, ECoreType coreType)
{ {
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, multipleLoad); var result = await CoreConfigHandler.GenerateClientMultipleLoadConfig(config, configPath, selecteds, coreType);
if (result.Success != true) if (result.Success != true)
{ {
return result; return result;
@ -1023,14 +1023,7 @@ public class ConfigHandler
var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new(); var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new();
profileItem.IndexId = indexId; profileItem.IndexId = indexId;
profileItem.Remarks = multipleLoad switch profileItem.Remarks = coreType == ECoreType.sing_box ? ResUI.menuSetDefaultMultipleServer : ResUI.menuSetDefaultLoadBalanceServer;
{
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;
@ -1923,3 +1916,4 @@ public class ConfigHandler
#endregion Regional Presets #endregion Regional Presets
} }
}

View file

@ -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 @@ public class CoreConfigHandler
return result; return result;
} }
public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType, EMultipleLoad multipleLoad) public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType)
{ {
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 else if (coreType == ECoreType.Xray)
{ {
result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds, multipleLoad); result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds);
} }
if (result.Success != true) if (result.Success != true)
@ -153,3 +153,4 @@ public class CoreConfigHandler
return result; return result;
} }
} }
}

View file

@ -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,3 +407,4 @@ public class CoreHandler
#endregion Linux #endregion Linux
} }
}

View file

@ -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,3 +215,4 @@ public sealed class CoreInfoHandler
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases"; return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
} }
} }
}

View file

@ -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,3 +239,4 @@ public class BaseFmt
return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}"; return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}";
} }
} }
}

View file

@ -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,3 +20,4 @@ public class ClashFmt : BaseFmt
return null; return null;
} }
} }
}

View file

@ -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,3 +89,4 @@ public class FmtHandler
} }
} }
} }
}

View file

@ -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,3 +99,4 @@ public class Hysteria2Fmt : BaseFmt
return null; return null;
} }
} }
}

View file

@ -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,3 +20,4 @@ public class NaiveproxyFmt : BaseFmt
return null; return null;
} }
} }
}

View file

@ -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,3 +177,4 @@ public class ShadowsocksFmt : BaseFmt
return null; return null;
} }
} }
}

View file

@ -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,3 +45,4 @@ public class SingboxFmt : BaseFmt
return profileItem; return profileItem;
} }
} }
}

View file

@ -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,3 +112,4 @@ public class SocksFmt : BaseFmt
return item; return item;
} }
} }
}

View file

@ -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,3 +45,4 @@ public class TrojanFmt : BaseFmt
return ToUri(EConfigType.Trojan, item.Address, item.Port, item.Id, dicQuery, remark); return ToUri(EConfigType.Trojan, item.Address, item.Port, item.Id, dicQuery, remark);
} }
} }
}

View file

@ -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,3 +61,4 @@ public class TuicFmt : BaseFmt
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);
} }
} }
}

View file

@ -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,3 +46,4 @@ public class V2rayFmt : BaseFmt
return profileItem; return profileItem;
} }
} }
}

View file

@ -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,3 +57,4 @@ public class VLESSFmt : BaseFmt
return ToUri(EConfigType.VLESS, item.Address, item.Port, item.Id, dicQuery, remark); return ToUri(EConfigType.VLESS, item.Address, item.Port, item.Id, dicQuery, remark);
} }
} }
}

View file

@ -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,3 +123,4 @@ public class VmessFmt : BaseFmt
return item; return item;
} }
} }
}

View file

@ -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,3 +65,4 @@ public class WireguardFmt : BaseFmt
return ToUri(EConfigType.WireGuard, item.Address, item.Port, item.Id, dicQuery, remark); return ToUri(EConfigType.WireGuard, item.Address, item.Port, item.Id, dicQuery, remark);
} }
} }
}

View file

@ -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,3 +41,4 @@ public class NoticeHandler
SendMessage(msg); SendMessage(msg);
} }
} }
}

View file

@ -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,3 +112,4 @@ public class PacHandler
} }
} }
} }
}

View file

@ -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,3 +179,4 @@ public class ProfileExHandler
return _lstProfileEx.Max(t => t == null ? 0 : t.Sort); return _lstProfileEx.Max(t => t == null ? 0 : t.Sort);
} }
} }
}

View file

@ -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,3 +161,4 @@ public class StatisticsHandler
} }
} }
} }
}

View file

@ -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,3 +30,4 @@ public class ProxySettingLinux
await Utils.GetCliWrapOutput(fileName, args); await Utils.GetCliWrapOutput(fileName, args);
} }
} }
}

View file

@ -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,3 +35,4 @@ public class ProxySettingOSX
await Utils.GetCliWrapOutput(fileName, args); await Utils.GetCliWrapOutput(fileName, args);
} }
} }
}

View file

@ -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,3 +357,4 @@ public class ProxySettingWindows
); );
} }
} }
}

View file

@ -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,3 +96,4 @@ public static class SysProxyHandler
ProxySettingWindows.SetProxy(strProxy, "", 4); ProxySettingWindows.SetProxy(strProxy, "", 4);
} }
} }
}

View file

@ -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,3 +95,4 @@ public class TaskHandler
} }
} }
} }
}

View file

@ -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,3 +179,4 @@ public sealed class WebDavHandler
public string GetLastError() => _lastDescription ?? string.Empty; public string GetLastError() => _lastDescription ?? string.Empty;
} }
}

View file

@ -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,3 +8,4 @@ public class CheckUpdateModel
public string? FileName { get; set; } public string? FileName { get; set; }
public bool? IsFinished { get; set; } public bool? IsFinished { get; set; }
} }
}

View file

@ -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,3 +14,4 @@ public class ClashConnectionModel
public string? Elapsed { get; set; } public string? Elapsed { get; set; }
public string? Chain { get; set; } public string? Chain { get; set; }
} }
}

View file

@ -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,3 +34,4 @@ public class MetadataItem
public string? processPath { get; set; } public string? processPath { get; set; }
public string? remoteDestination { get; set; } public string? remoteDestination { get; set; }
} }
}

View file

@ -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,3 +14,4 @@ public class ClashProviders
public string? vehicleType { get; set; } public string? vehicleType { get; set; }
} }
} }
}

View file

@ -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,3 +21,4 @@ public class ClashProxies
public int delay { get; set; } public int delay { get; set; }
} }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class ClashProxyModel public class ClashProxyModel
{ {
@ -15,3 +15,4 @@ public class ClashProxyModel
public bool IsActive { get; set; } public bool IsActive { get; set; }
} }
}

View file

@ -1,7 +1,8 @@
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; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
public class ComboItem public class ComboItem
{ {
public string? ID public string? ID
@ -12,3 +12,4 @@ public class ComboItem
get; set; get; set;
} }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
/// <summary> /// <summary>
/// 本软件配置文件实体类 /// 本软件配置文件实体类
/// </summary> /// </summary>
@ -54,3 +54,4 @@ public class Config
#endregion other entities #endregion other entities
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class CoreBasicItem public class CoreBasicItem
{ {
@ -245,3 +245,4 @@ public class Fragment4RayItem
public string? Length { get; set; } public string? Length { get; set; }
public string? Interval { get; set; } public string? Interval { get; set; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class CoreInfo public class CoreInfo
{ {
@ -18,3 +18,4 @@ public class CoreInfo
public string? VersionArg { get; set; } public string? VersionArg { get; set; }
public bool AbsolutePath { get; set; } public bool AbsolutePath { get; set; }
} }
}

View file

@ -1,7 +1,7 @@
using SQLite; using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class DNSItem public class DNSItem
{ {
@ -17,3 +17,4 @@ public class DNSItem
public string? DomainStrategy4Freedom { get; set; } public string? DomainStrategy4Freedom { get; set; }
public string? DomainDNSAddress { get; set; } public string? DomainDNSAddress { get; set; }
} }
}

View file

@ -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,3 +65,4 @@ public class GitHubRelease
[JsonPropertyName("body")] public string? Body { get; set; } [JsonPropertyName("body")] public string? Body { get; set; }
} }
}

View file

@ -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,3 +10,4 @@ internal class IPAPIInfo
public string? country_name { get; set; } public string? country_name { get; set; }
public string? country_code { get; set; } public string? country_code { get; set; }
} }
}

View file

@ -1,7 +1,7 @@
using SQLite; using SQLite;
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class ProfileExItem public class ProfileExItem
{ {
@ -13,3 +13,4 @@ public class ProfileExItem
public int Sort { get; set; } public int Sort { get; set; }
public string? Message { get; set; } public string? Message { get; set; }
} }
}

View file

@ -1,7 +1,7 @@
using SQLite; using SQLite;
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class ProfileItem public class ProfileItem
{ {
@ -64,7 +64,6 @@ public class ProfileItem
[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; }
@ -94,3 +93,4 @@ public class ProfileItem
public string SpiderX { get; set; } public string SpiderX { get; set; }
public string Extra { get; set; } public string Extra { get; set; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class ProfileItemModel : ProfileItem public class ProfileItemModel : ProfileItem
{ {
@ -15,3 +15,4 @@ public class ProfileItemModel : ProfileItem
public string TotalUp { get; set; } public string TotalUp { get; set; }
public string TotalDown { get; set; } public string TotalDown { get; set; }
} }
}

View file

@ -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,3 +24,4 @@ public class RetResult
Data = data; Data = data;
} }
} }
}

View file

@ -1,7 +1,7 @@
using SQLite; using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class RoutingItem public class RoutingItem
{ {
@ -20,3 +20,4 @@ public class RoutingItem
public string DomainStrategy4Singbox { get; set; } public string DomainStrategy4Singbox { get; set; }
public int Sort { get; set; } public int Sort { get; set; }
} }
}

View file

@ -1,7 +1,8 @@
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; }
} }
}

View file

@ -1,8 +1,9 @@
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; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class RulesItem public class RulesItem
{ {
@ -16,3 +16,4 @@ public class RulesItem
public bool Enabled { get; set; } = true; public bool Enabled { get; set; } = true;
public string? Remarks { get; set; } public string? Remarks { get; set; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class RulesItemModel : RulesItem public class RulesItemModel : RulesItem
{ {
@ -8,3 +8,4 @@ public class RulesItemModel : RulesItem
public string Domains { get; set; } public string Domains { get; set; }
public string Protocols { get; set; } public string Protocols { get; set; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class ServerSpeedItem : ServerStatItem public class ServerSpeedItem : ServerStatItem
{ {
@ -19,3 +19,4 @@ public class TrafficItem
public ulong Down { get; set; } public ulong Down { get; set; }
} }
}

View file

@ -1,7 +1,7 @@
using SQLite; using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class ServerStatItem public class ServerStatItem
{ {
@ -18,3 +18,4 @@ public class ServerStatItem
public long DateNow { get; set; } public long DateNow { get; set; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class ServerTestItem public class ServerTestItem
{ {
@ -10,3 +10,4 @@ public class ServerTestItem
public bool AllowTest { get; set; } public bool AllowTest { get; set; }
public int QueueNum { get; set; } public int QueueNum { get; set; }
} }
}

View file

@ -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,3 +254,4 @@ public class Ruleset4Sbox
public string? download_detour { get; set; } public string? download_detour { get; set; }
public string? update_interval { get; set; } public string? update_interval { get; set; }
} }
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models; namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class SpeedTestResult public class SpeedTestResult
{ {
@ -9,3 +9,4 @@ public class SpeedTestResult
public string? Speed { get; set; } public string? Speed { get; set; }
} }
}

View file

@ -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,3 +15,4 @@ public class SsServer
public string? password { get; set; } public string? password { get; set; }
public string? plugin { get; set; } public string? plugin { get; set; }
} }
}

View file

@ -1,7 +1,7 @@
using SQLite; using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable] [Serializable]
public class SubItem public class SubItem
{ {
@ -36,3 +36,4 @@ public class SubItem
public string? Memo { get; set; } public string? Memo { get; set; }
} }
}

View file

@ -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,8 +12,6 @@ public class V2rayConfig
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; }
} }
@ -234,46 +232,6 @@ public class BalancersItem4Ray
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
@ -434,3 +392,4 @@ public class FragmentItem4Ray
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