mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +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,7 +1,7 @@
|
||||||
namespace AmazTool
|
namespace AmazTool;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
{
|
{
|
||||||
internal static class Program
|
|
||||||
{
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
private static void Main(string[] args)
|
private static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
@ -22,5 +22,4 @@ namespace AmazTool
|
||||||
|
|
||||||
UpgradeApp.Upgrade(argData);
|
UpgradeApp.Upgrade(argData);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ 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)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"{Resx.Resource.StartUnzipping}\n{fileName}");
|
Console.WriteLine($"{Resx.Resource.StartUnzipping}\n{fileName}");
|
||||||
|
@ -113,5 +113,4 @@ namespace AmazTool
|
||||||
|
|
||||||
Utils.StartV2RayN();
|
Utils.StartV2RayN();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace AmazTool
|
namespace AmazTool;
|
||||||
|
|
||||||
|
internal class Utils
|
||||||
{
|
{
|
||||||
internal class Utils
|
|
||||||
{
|
|
||||||
public static string GetExePath()
|
public static string GetExePath()
|
||||||
{
|
{
|
||||||
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||||
|
@ -48,5 +48,4 @@ namespace AmazTool
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,10 +1,10 @@
|
||||||
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
|
||||||
private const int IvSize = 16; // AES block size
|
private const int IvSize = 16; // AES block size
|
||||||
private const int Iterations = 10000;
|
private const int Iterations = 10000;
|
||||||
|
@ -97,5 +97,4 @@ namespace ServiceLib.Common
|
||||||
rng.GetBytes(randomNumber);
|
rng.GetBytes(randomNumber);
|
||||||
return randomNumber;
|
return randomNumber;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
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>
|
||||||
/// Encrypt
|
/// Encrypt
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -71,5 +71,4 @@ namespace ServiceLib.Common
|
||||||
{
|
{
|
||||||
return Utils.GetMd5(Utils.GetHomePath() + "DesUtils");
|
return Utils.GetMd5(Utils.GetHomePath() + "DesUtils");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
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());
|
||||||
public static DownloaderHelper Instance => _instance.Value;
|
public static DownloaderHelper Instance => _instance.Value;
|
||||||
|
|
||||||
|
@ -177,5 +177,4 @@ namespace ServiceLib.Common
|
||||||
|
|
||||||
downloadOpt = null;
|
downloadOpt = null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ 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";
|
||||||
|
|
||||||
public static bool ByteArrayToFile(string fileName, byte[] content)
|
public static bool ByteArrayToFile(string fileName, byte[] content)
|
||||||
|
@ -223,5 +223,4 @@ namespace ServiceLib.Common
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@ 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>
|
||||||
|
public class HttpClientHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// </summary>
|
|
||||||
public class HttpClientHelper
|
|
||||||
{
|
|
||||||
private static readonly Lazy<HttpClientHelper> _instance = new(() =>
|
private static readonly Lazy<HttpClientHelper> _instance = new(() =>
|
||||||
{
|
{
|
||||||
SocketsHttpHandler handler = new() { UseCookies = false };
|
SocketsHttpHandler handler = new() { UseCookies = false };
|
||||||
|
@ -202,5 +202,4 @@ 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,11 +1,11 @@
|
||||||
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";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -127,5 +127,4 @@ namespace ServiceLib.Common
|
||||||
/// <param name="obj"></param>
|
/// <param name="obj"></param>
|
||||||
/// <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,11 +1,11 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
using QRCodeGenerator qrGenerator = new();
|
using QRCodeGenerator qrGenerator = new();
|
||||||
|
@ -86,5 +86,4 @@ namespace ServiceLib.Common
|
||||||
canvas.DrawBitmap(bmp, 0, 0);
|
canvas.DrawBitmap(bmp, 0, 0);
|
||||||
return flipped;
|
return flipped;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Common
|
namespace ServiceLib.Common;
|
||||||
|
|
||||||
|
public class SemanticVersion
|
||||||
{
|
{
|
||||||
public class SemanticVersion
|
|
||||||
{
|
|
||||||
private readonly int major;
|
private readonly int major;
|
||||||
private readonly int minor;
|
private readonly int minor;
|
||||||
private readonly int patch;
|
private readonly int patch;
|
||||||
|
@ -183,5 +183,4 @@ namespace ServiceLib.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Private
|
#endregion Private
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
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());
|
||||||
public static SQLiteHelper Instance => _instance.Value;
|
public static SQLiteHelper Instance => _instance.Value;
|
||||||
private readonly string _connstr;
|
private readonly string _connstr;
|
||||||
|
@ -87,5 +87,4 @@ namespace ServiceLib.Common
|
||||||
_dbAsync = null;
|
_dbAsync = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
return string.IsNullOrEmpty(value) || string.IsNullOrWhiteSpace(value);
|
return string.IsNullOrEmpty(value) || string.IsNullOrWhiteSpace(value);
|
||||||
|
@ -79,5 +79,4 @@ namespace ServiceLib.Common
|
||||||
{
|
{
|
||||||
return int.TryParse(value, out var result) ? result : defaultValue;
|
return int.TryParse(value, out var result) ? result : defaultValue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,10 @@ 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";
|
||||||
|
|
||||||
#region 转换函数
|
#region 转换函数
|
||||||
|
@ -862,5 +862,4 @@ namespace ServiceLib.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Platform
|
#endregion Platform
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ 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";
|
||||||
|
|
||||||
public static string? RegReadValue(string path, string name, string def)
|
public static string? RegReadValue(string path, string name, string def)
|
||||||
|
@ -70,5 +70,4 @@ namespace ServiceLib.Common
|
||||||
Logging.SaveLog(_tag, ex);
|
Logging.SaveLog(_tag, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ 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";
|
||||||
|
|
||||||
#region YAML
|
#region YAML
|
||||||
|
@ -76,5 +76,4 @@ namespace ServiceLib.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion YAML
|
#endregion YAML
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EConfigType
|
||||||
{
|
{
|
||||||
public enum EConfigType
|
|
||||||
{
|
|
||||||
VMess = 1,
|
VMess = 1,
|
||||||
Custom = 2,
|
Custom = 2,
|
||||||
Shadowsocks = 3,
|
Shadowsocks = 3,
|
||||||
|
@ -12,5 +12,4 @@
|
||||||
TUIC = 8,
|
TUIC = 8,
|
||||||
WireGuard = 9,
|
WireGuard = 9,
|
||||||
HTTP = 10
|
HTTP = 10
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum ECoreType
|
||||||
{
|
{
|
||||||
public enum ECoreType
|
|
||||||
{
|
|
||||||
v2fly = 1,
|
v2fly = 1,
|
||||||
Xray = 2,
|
Xray = 2,
|
||||||
v2fly_v5 = 4,
|
v2fly_v5 = 4,
|
||||||
|
@ -15,5 +15,4 @@ namespace ServiceLib.Enums
|
||||||
brook = 27,
|
brook = 27,
|
||||||
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,11 +1,10 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EGlobalHotkey
|
||||||
{
|
{
|
||||||
public enum EGlobalHotkey
|
|
||||||
{
|
|
||||||
ShowForm = 0,
|
ShowForm = 0,
|
||||||
SystemProxyClear = 1,
|
SystemProxyClear = 1,
|
||||||
SystemProxySet = 2,
|
SystemProxySet = 2,
|
||||||
SystemProxyUnchanged = 3,
|
SystemProxyUnchanged = 3,
|
||||||
SystemProxyPac = 4,
|
SystemProxyPac = 4,
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EInboundProtocol
|
||||||
{
|
{
|
||||||
public enum EInboundProtocol
|
|
||||||
{
|
|
||||||
socks = 0,
|
socks = 0,
|
||||||
socks2,
|
socks2,
|
||||||
socks3,
|
socks3,
|
||||||
|
@ -10,5 +10,4 @@
|
||||||
api2,
|
api2,
|
||||||
mixed,
|
mixed,
|
||||||
speedtest = 21
|
speedtest = 21
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EMove
|
||||||
{
|
{
|
||||||
public enum EMove
|
|
||||||
{
|
|
||||||
Top = 1,
|
Top = 1,
|
||||||
Up = 2,
|
Up = 2,
|
||||||
Down = 3,
|
Down = 3,
|
||||||
Bottom = 4,
|
Bottom = 4,
|
||||||
Position = 5
|
Position = 5
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EMsgCommand
|
||||||
{
|
{
|
||||||
public enum EMsgCommand
|
|
||||||
{
|
|
||||||
ClearMsg,
|
ClearMsg,
|
||||||
SendMsgView,
|
SendMsgView,
|
||||||
SendSnackMsg,
|
SendSnackMsg,
|
||||||
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,10 +1,9 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum ERuleMode
|
||||||
{
|
{
|
||||||
public enum ERuleMode
|
|
||||||
{
|
|
||||||
Rule = 0,
|
Rule = 0,
|
||||||
Global = 1,
|
Global = 1,
|
||||||
Direct = 2,
|
Direct = 2,
|
||||||
Unchanged = 3
|
Unchanged = 3
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EServerColName
|
||||||
{
|
{
|
||||||
public enum EServerColName
|
|
||||||
{
|
|
||||||
Def = 0,
|
Def = 0,
|
||||||
ConfigType,
|
ConfigType,
|
||||||
Remarks,
|
Remarks,
|
||||||
|
@ -17,5 +17,4 @@
|
||||||
TodayUp,
|
TodayUp,
|
||||||
TotalDown,
|
TotalDown,
|
||||||
TotalUp
|
TotalUp
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,9 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum ESpeedActionType
|
||||||
{
|
{
|
||||||
public enum ESpeedActionType
|
|
||||||
{
|
|
||||||
Tcping,
|
Tcping,
|
||||||
Realping,
|
Realping,
|
||||||
Speedtest,
|
Speedtest,
|
||||||
Mixedtest
|
Mixedtest
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,9 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum ESysProxyType
|
||||||
{
|
{
|
||||||
public enum ESysProxyType
|
|
||||||
{
|
|
||||||
ForcedClear = 0,
|
ForcedClear = 0,
|
||||||
ForcedChange = 1,
|
ForcedChange = 1,
|
||||||
Unchanged = 2,
|
Unchanged = 2,
|
||||||
Pac = 3
|
Pac = 3
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum ETheme
|
||||||
{
|
{
|
||||||
public enum ETheme
|
|
||||||
{
|
|
||||||
FollowSystem,
|
FollowSystem,
|
||||||
Dark,
|
Dark,
|
||||||
Light,
|
Light,
|
||||||
|
@ -9,5 +9,4 @@
|
||||||
Desert,
|
Desert,
|
||||||
Dusk,
|
Dusk,
|
||||||
NightSky
|
NightSky
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum ETransport
|
||||||
{
|
{
|
||||||
public enum ETransport
|
|
||||||
{
|
|
||||||
tcp,
|
tcp,
|
||||||
kcp,
|
kcp,
|
||||||
ws,
|
ws,
|
||||||
|
@ -11,5 +11,4 @@
|
||||||
http,
|
http,
|
||||||
quic,
|
quic,
|
||||||
grpc
|
grpc
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Enums
|
namespace ServiceLib.Enums;
|
||||||
|
|
||||||
|
public enum EViewAction
|
||||||
{
|
{
|
||||||
public enum EViewAction
|
|
||||||
{
|
|
||||||
CloseWindow,
|
CloseWindow,
|
||||||
ShowYesNo,
|
ShowYesNo,
|
||||||
SaveFileDialog,
|
SaveFileDialog,
|
||||||
|
@ -42,5 +42,4 @@
|
||||||
DispatcherCheckUpdate,
|
DispatcherCheckUpdate,
|
||||||
DispatcherCheckUpdateFinished,
|
DispatcherCheckUpdateFinished,
|
||||||
DispatcherShowMsg,
|
DispatcherShowMsg,
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib
|
namespace ServiceLib;
|
||||||
|
|
||||||
|
public class Global
|
||||||
{
|
{
|
||||||
public class Global
|
|
||||||
{
|
|
||||||
#region const
|
#region const
|
||||||
|
|
||||||
public const string AppName = "v2rayN";
|
public const string AppName = "v2rayN";
|
||||||
|
@ -520,5 +520,4 @@ namespace ServiceLib
|
||||||
];
|
];
|
||||||
|
|
||||||
#endregion const
|
#endregion const
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
|
|
||||||
|
public sealed class AppHandler
|
||||||
{
|
{
|
||||||
public sealed class AppHandler
|
|
||||||
{
|
|
||||||
#region Property
|
#region Property
|
||||||
|
|
||||||
private static readonly Lazy<AppHandler> _instance = new(() => new());
|
private static readonly Lazy<AppHandler> _instance = new(() => new());
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,5 +244,4 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Core Type
|
#endregion Core Type
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
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";
|
||||||
|
|
||||||
public static async Task<bool> UpdateTask(Config config)
|
public static async Task<bool> UpdateTask(Config config)
|
||||||
|
@ -238,5 +238,4 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion macOS
|
#endregion macOS
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
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());
|
||||||
public static ClashApiHandler Instance => instance.Value;
|
public static ClashApiHandler Instance => instance.Value;
|
||||||
|
|
||||||
|
@ -184,5 +184,4 @@ namespace ServiceLib.Handler
|
||||||
{
|
{
|
||||||
return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}";
|
return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 本软件配置文件处理类
|
||||||
|
/// </summary>
|
||||||
|
public class ConfigHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 本软件配置文件处理类
|
|
||||||
/// </summary>
|
|
||||||
public class ConfigHandler
|
|
||||||
{
|
|
||||||
private static readonly string _configRes = Global.ConfigFileName;
|
private static readonly string _configRes = Global.ConfigFileName;
|
||||||
private static readonly string _tag = "ConfigHandler";
|
private static readonly string _tag = "ConfigHandler";
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -1915,5 +1922,4 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Regional Presets
|
#endregion Regional Presets
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Core configuration file processing class
|
||||||
|
/// </summary>
|
||||||
|
public class CoreConfigHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Core configuration file processing class
|
|
||||||
/// </summary>
|
|
||||||
public class CoreConfigHandler
|
|
||||||
{
|
|
||||||
private static readonly string _tag = "CoreConfigHandler";
|
private static readonly string _tag = "CoreConfigHandler";
|
||||||
|
|
||||||
public static async Task<RetResult> GenerateClientConfig(ProfileItem node, string? fileName)
|
public static async Task<RetResult> GenerateClientConfig(ProfileItem node, string? fileName)
|
||||||
|
@ -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)
|
||||||
|
@ -152,5 +152,4 @@ namespace ServiceLib.Handler
|
||||||
await File.WriteAllTextAsync(fileName, result.Data.ToString());
|
await File.WriteAllTextAsync(fileName, result.Data.ToString());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Handler
|
namespace ServiceLib.Handler;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Core process processing class
|
||||||
|
/// </summary>
|
||||||
|
public class CoreHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Core process processing class
|
|
||||||
/// </summary>
|
|
||||||
public class CoreHandler
|
|
||||||
{
|
|
||||||
private static readonly Lazy<CoreHandler> _instance = new(() => new());
|
private static readonly Lazy<CoreHandler> _instance = new(() => new());
|
||||||
public static CoreHandler Instance => _instance.Value;
|
public static CoreHandler Instance => _instance.Value;
|
||||||
private Config _config;
|
private Config _config;
|
||||||
|
@ -406,5 +406,4 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Linux
|
#endregion Linux
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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());
|
||||||
private List<CoreInfo>? _coreInfo;
|
private List<CoreInfo>? _coreInfo;
|
||||||
public static CoreInfoHandler Instance => _instance.Value;
|
public static CoreInfoHandler Instance => _instance.Value;
|
||||||
|
@ -214,5 +214,4 @@ namespace ServiceLib.Handler
|
||||||
{
|
{
|
||||||
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
|
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
if (Utils.IsIpv6(address))
|
if (Utils.IsIpv6(address))
|
||||||
|
@ -238,5 +238,4 @@ namespace ServiceLib.Handler.Fmt
|
||||||
var url = $"{Utils.UrlEncode(userInfo)}@{GetIpv6(address)}:{port}";
|
var url = $"{Utils.UrlEncode(userInfo)}@{GetIpv6(address)}:{port}";
|
||||||
return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}";
|
return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
if (Contains(strData, "port", "socks-port", "proxies"))
|
if (Contains(strData, "port", "socks-port", "proxies"))
|
||||||
|
@ -19,5 +19,4 @@
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
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";
|
||||||
|
|
||||||
public static string? GetShareUri(ProfileItem item)
|
public static string? GetShareUri(ProfileItem item)
|
||||||
|
@ -88,5 +88,4 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -98,5 +98,4 @@ namespace ServiceLib.Handler.Fmt
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
if (Contains(strData, "listen", "proxy", "<html>", "<body>"))
|
if (Contains(strData, "listen", "proxy", "<html>", "<body>"))
|
||||||
|
@ -19,5 +19,4 @@
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -176,5 +176,4 @@ namespace ServiceLib.Handler.Fmt
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
var configObjects = JsonUtils.Deserialize<object[]>(strData);
|
var configObjects = JsonUtils.Deserialize<object[]>(strData);
|
||||||
|
@ -44,5 +44,4 @@ namespace ServiceLib.Handler.Fmt
|
||||||
|
|
||||||
return profileItem;
|
return profileItem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -111,5 +111,4 @@ namespace ServiceLib.Handler.Fmt
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -44,5 +44,4 @@ 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,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -60,5 +60,4 @@ 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,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
var configObjects = JsonUtils.Deserialize<object[]>(strData);
|
var configObjects = JsonUtils.Deserialize<object[]>(strData);
|
||||||
|
@ -45,5 +45,4 @@ namespace ServiceLib.Handler.Fmt
|
||||||
|
|
||||||
return profileItem;
|
return profileItem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -56,5 +56,4 @@ 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,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -122,5 +122,4 @@ namespace ServiceLib.Handler.Fmt
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
msg = ResUI.ConfigurationFormatIncorrect;
|
msg = ResUI.ConfigurationFormatIncorrect;
|
||||||
|
@ -64,5 +64,4 @@ 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,9 +1,9 @@
|
||||||
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());
|
||||||
public static NoticeHandler Instance => _instance.Value;
|
public static NoticeHandler Instance => _instance.Value;
|
||||||
|
|
||||||
|
@ -40,5 +40,4 @@ namespace ServiceLib.Handler
|
||||||
Enqueue(msg);
|
Enqueue(msg);
|
||||||
SendMessage(msg);
|
SendMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
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;
|
||||||
private static int _httpPort;
|
private static int _httpPort;
|
||||||
private static int _pacPort;
|
private static int _pacPort;
|
||||||
|
@ -111,5 +111,4 @@ namespace ServiceLib.Handler
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ 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());
|
||||||
private ConcurrentBag<ProfileExItem> _lstProfileEx = [];
|
private ConcurrentBag<ProfileExItem> _lstProfileEx = [];
|
||||||
private readonly Queue<string> _queIndexIds = new();
|
private readonly Queue<string> _queIndexIds = new();
|
||||||
|
@ -178,5 +178,4 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
return _lstProfileEx.Max(t => t == null ? 0 : t.Sort);
|
return _lstProfileEx.Max(t => t == null ? 0 : t.Sort);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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());
|
||||||
public static StatisticsHandler Instance => instance.Value;
|
public static StatisticsHandler Instance => instance.Value;
|
||||||
|
|
||||||
|
@ -160,5 +160,4 @@
|
||||||
_serverStatItem.DateNow = ticks;
|
_serverStatItem.DateNow = ticks;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
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";
|
||||||
|
|
||||||
public static async Task SetProxy(string host, int port, string exceptions)
|
public static async Task SetProxy(string host, int port, string exceptions)
|
||||||
|
@ -29,5 +29,4 @@ namespace ServiceLib.Handler.SysProxy
|
||||||
|
|
||||||
await Utils.GetCliWrapOutput(fileName, args);
|
await Utils.GetCliWrapOutput(fileName, args);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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";
|
||||||
|
|
||||||
public static async Task SetProxy(string host, int port, string exceptions)
|
public static async Task SetProxy(string host, int port, string exceptions)
|
||||||
|
@ -34,5 +34,4 @@ namespace ServiceLib.Handler.SysProxy
|
||||||
|
|
||||||
await Utils.GetCliWrapOutput(fileName, args);
|
await Utils.GetCliWrapOutput(fileName, args);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
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";
|
||||||
|
|
||||||
private static bool SetProxyFallback(string? strProxy, string? exceptions, int type)
|
private static bool SetProxyFallback(string? strProxy, string? exceptions, int type)
|
||||||
|
@ -356,5 +356,4 @@ namespace ServiceLib.Handler.SysProxy
|
||||||
ref int lpcEntries // Number of entries written to the buffer
|
ref int lpcEntries // Number of entries written to the buffer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
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";
|
||||||
|
|
||||||
public static async Task<bool> UpdateSysProxy(Config config, bool forceDisable)
|
public static async Task<bool> UpdateSysProxy(Config config, bool forceDisable)
|
||||||
|
@ -95,5 +95,4 @@
|
||||||
var strProxy = $"{Global.HttpProtocol}{Global.Loopback}:{portPac}/pac?t={DateTime.Now.Ticks}";
|
var strProxy = $"{Global.HttpProtocol}{Global.Loopback}:{portPac}/pac?t={DateTime.Now.Ticks}";
|
||||||
ProxySettingWindows.SetProxy(strProxy, "", 4);
|
ProxySettingWindows.SetProxy(strProxy, "", 4);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
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());
|
||||||
public static TaskHandler Instance => _instance.Value;
|
public static TaskHandler Instance => _instance.Value;
|
||||||
|
|
||||||
|
@ -94,5 +94,4 @@ namespace ServiceLib.Handler
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
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());
|
||||||
public static WebDavHandler Instance => _instance.Value;
|
public static WebDavHandler Instance => _instance.Value;
|
||||||
|
|
||||||
|
@ -178,5 +178,4 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetLastError() => _lastDescription ?? string.Empty;
|
public string GetLastError() => _lastDescription ?? string.Empty;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
public class CheckUpdateModel
|
||||||
{
|
{
|
||||||
public class CheckUpdateModel
|
|
||||||
{
|
|
||||||
public bool? IsSelected { get; set; }
|
public bool? IsSelected { get; set; }
|
||||||
public string? CoreType { get; set; }
|
public string? CoreType { get; set; }
|
||||||
public string? Remarks { get; set; }
|
public string? Remarks { get; set; }
|
||||||
public string? FileName { get; set; }
|
public string? FileName { get; set; }
|
||||||
public bool? IsFinished { get; set; }
|
public bool? IsFinished { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
public class ClashConnectionModel
|
||||||
{
|
{
|
||||||
public class ClashConnectionModel
|
|
||||||
{
|
|
||||||
public string? Id { get; set; }
|
public string? Id { get; set; }
|
||||||
public string? Network { get; set; }
|
public string? Network { get; set; }
|
||||||
public string? Type { get; set; }
|
public string? Type { get; set; }
|
||||||
|
@ -13,5 +13,4 @@
|
||||||
public double Time { get; set; }
|
public double Time { get; set; }
|
||||||
public string? Elapsed { get; set; }
|
public string? Elapsed { get; set; }
|
||||||
public string? Chain { get; set; }
|
public string? Chain { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,14 +1,14 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
public class ClashConnections
|
||||||
{
|
{
|
||||||
public class ClashConnections
|
|
||||||
{
|
|
||||||
public ulong downloadTotal { get; set; }
|
public ulong downloadTotal { get; set; }
|
||||||
public ulong uploadTotal { get; set; }
|
public ulong uploadTotal { get; set; }
|
||||||
public List<ConnectionItem>? connections { get; set; }
|
public List<ConnectionItem>? connections { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConnectionItem
|
public class ConnectionItem
|
||||||
{
|
{
|
||||||
public string? id { get; set; }
|
public string? id { get; set; }
|
||||||
public MetadataItem? metadata { get; set; }
|
public MetadataItem? metadata { get; set; }
|
||||||
public ulong upload { get; set; }
|
public ulong upload { get; set; }
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
public List<string>? chains { get; set; }
|
public List<string>? chains { get; set; }
|
||||||
public string? rule { get; set; }
|
public string? rule { get; set; }
|
||||||
public string? rulePayload { get; set; }
|
public string? rulePayload { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MetadataItem
|
public class MetadataItem
|
||||||
{
|
{
|
||||||
public string? network { get; set; }
|
public string? network { get; set; }
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
public string? sourceIP { get; set; }
|
public string? sourceIP { get; set; }
|
||||||
|
@ -33,5 +33,4 @@
|
||||||
public string? process { get; set; }
|
public string? process { get; set; }
|
||||||
public string? processPath { get; set; }
|
public string? processPath { get; set; }
|
||||||
public string? remoteDestination { get; set; }
|
public string? remoteDestination { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
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; }
|
||||||
|
|
||||||
public class ProvidersItem
|
public class ProvidersItem
|
||||||
|
@ -13,5 +13,4 @@ namespace ServiceLib.Models
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
public string? vehicleType { get; set; }
|
public string? vehicleType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
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; }
|
||||||
|
|
||||||
public class ProxiesItem
|
public class ProxiesItem
|
||||||
|
@ -20,5 +20,4 @@
|
||||||
public string? time { get; set; }
|
public string? time { get; set; }
|
||||||
public int delay { get; set; }
|
public int delay { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ClashProxyModel
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ClashProxyModel
|
|
||||||
{
|
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
|
|
||||||
public string? Type { get; set; }
|
public string? Type { get; set; }
|
||||||
|
@ -14,5 +14,4 @@
|
||||||
public string? DelayName { get; set; }
|
public string? DelayName { get; set; }
|
||||||
|
|
||||||
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,7 +1,7 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
public class ComboItem
|
||||||
{
|
{
|
||||||
public class ComboItem
|
|
||||||
{
|
|
||||||
public string? ID
|
public string? ID
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
@ -11,5 +11,4 @@
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 本软件配置文件实体类
|
||||||
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
|
public class Config
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 本软件配置文件实体类
|
|
||||||
/// </summary>
|
|
||||||
[Serializable]
|
|
||||||
public class Config
|
|
||||||
{
|
|
||||||
#region property
|
#region property
|
||||||
|
|
||||||
public string IndexId { get; set; }
|
public string IndexId { get; set; }
|
||||||
|
@ -53,5 +53,4 @@
|
||||||
public List<CoreTypeItem> CoreTypeItem { get; set; }
|
public List<CoreTypeItem> CoreTypeItem { get; set; }
|
||||||
|
|
||||||
#endregion other entities
|
#endregion other entities
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class CoreBasicItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class CoreBasicItem
|
|
||||||
{
|
|
||||||
public bool LogEnabled { get; set; }
|
public bool LogEnabled { get; set; }
|
||||||
|
|
||||||
public string Loglevel { get; set; }
|
public string Loglevel { get; set; }
|
||||||
|
@ -18,11 +18,11 @@ namespace ServiceLib.Models
|
||||||
public bool EnableFragment { get; set; }
|
public bool EnableFragment { get; set; }
|
||||||
|
|
||||||
public bool EnableCacheFile4Sbox { get; set; } = true;
|
public bool EnableCacheFile4Sbox { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class InItem
|
public class InItem
|
||||||
{
|
{
|
||||||
public int LocalPort { get; set; }
|
public int LocalPort { get; set; }
|
||||||
public string Protocol { get; set; }
|
public string Protocol { get; set; }
|
||||||
public bool UdpEnabled { get; set; }
|
public bool UdpEnabled { get; set; }
|
||||||
|
@ -34,11 +34,11 @@ namespace ServiceLib.Models
|
||||||
public string User { get; set; }
|
public string User { get; set; }
|
||||||
public string Pass { get; set; }
|
public string Pass { get; set; }
|
||||||
public bool SecondLocalPortEnabled { get; set; }
|
public bool SecondLocalPortEnabled { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class KcpItem
|
public class KcpItem
|
||||||
{
|
{
|
||||||
public int Mtu { get; set; }
|
public int Mtu { get; set; }
|
||||||
|
|
||||||
public int Tti { get; set; }
|
public int Tti { get; set; }
|
||||||
|
@ -52,20 +52,20 @@ namespace ServiceLib.Models
|
||||||
public int ReadBufferSize { get; set; }
|
public int ReadBufferSize { get; set; }
|
||||||
|
|
||||||
public int WriteBufferSize { get; set; }
|
public int WriteBufferSize { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class GrpcItem
|
public class GrpcItem
|
||||||
{
|
{
|
||||||
public int? IdleTimeout { get; set; }
|
public int? IdleTimeout { get; set; }
|
||||||
public int? HealthCheckTimeout { get; set; }
|
public int? HealthCheckTimeout { get; set; }
|
||||||
public bool? PermitWithoutStream { get; set; }
|
public bool? PermitWithoutStream { get; set; }
|
||||||
public int? InitialWindowsSize { get; set; }
|
public int? InitialWindowsSize { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class GUIItem
|
public class GUIItem
|
||||||
{
|
{
|
||||||
public bool AutoRun { get; set; }
|
public bool AutoRun { get; set; }
|
||||||
public bool EnableStatistics { get; set; }
|
public bool EnableStatistics { get; set; }
|
||||||
public bool DisplayRealTimeSpeed { get; set; }
|
public bool DisplayRealTimeSpeed { get; set; }
|
||||||
|
@ -75,18 +75,18 @@ namespace ServiceLib.Models
|
||||||
public int TrayMenuServersLimit { get; set; } = 20;
|
public int TrayMenuServersLimit { get; set; } = 20;
|
||||||
public bool EnableHWA { get; set; } = false;
|
public bool EnableHWA { get; set; } = false;
|
||||||
public bool EnableLog { get; set; } = true;
|
public bool EnableLog { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class MsgUIItem
|
public class MsgUIItem
|
||||||
{
|
{
|
||||||
public string? MainMsgFilter { get; set; }
|
public string? MainMsgFilter { get; set; }
|
||||||
public bool? AutoRefresh { get; set; }
|
public bool? AutoRefresh { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class UIItem
|
public class UIItem
|
||||||
{
|
{
|
||||||
public bool EnableAutoAdjustMainLvColWidth { get; set; }
|
public bool EnableAutoAdjustMainLvColWidth { get; set; }
|
||||||
public bool EnableUpdateSubOnlyRemarksExist { get; set; }
|
public bool EnableUpdateSubOnlyRemarksExist { get; set; }
|
||||||
public double MainWidth { get; set; }
|
public double MainWidth { get; set; }
|
||||||
|
@ -105,20 +105,20 @@ namespace ServiceLib.Models
|
||||||
public bool Hide2TrayWhenClose { get; set; }
|
public bool Hide2TrayWhenClose { get; set; }
|
||||||
public List<ColumnItem> MainColumnItem { get; set; }
|
public List<ColumnItem> MainColumnItem { get; set; }
|
||||||
public bool ShowInTaskbar { get; set; }
|
public bool ShowInTaskbar { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ConstItem
|
public class ConstItem
|
||||||
{
|
{
|
||||||
public string? SubConvertUrl { get; set; }
|
public string? SubConvertUrl { get; set; }
|
||||||
public string? GeoSourceUrl { get; set; }
|
public string? GeoSourceUrl { get; set; }
|
||||||
public string? SrsSourceUrl { get; set; }
|
public string? SrsSourceUrl { get; set; }
|
||||||
public string? RouteRulesTemplateSourceUrl { get; set; }
|
public string? RouteRulesTemplateSourceUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class KeyEventItem
|
public class KeyEventItem
|
||||||
{
|
{
|
||||||
public EGlobalHotkey EGlobalHotkey { get; set; }
|
public EGlobalHotkey EGlobalHotkey { get; set; }
|
||||||
|
|
||||||
public bool Alt { get; set; }
|
public bool Alt { get; set; }
|
||||||
|
@ -128,19 +128,19 @@ namespace ServiceLib.Models
|
||||||
public bool Shift { get; set; }
|
public bool Shift { get; set; }
|
||||||
|
|
||||||
public int? KeyCode { get; set; }
|
public int? KeyCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class CoreTypeItem
|
public class CoreTypeItem
|
||||||
{
|
{
|
||||||
public EConfigType ConfigType { get; set; }
|
public EConfigType ConfigType { get; set; }
|
||||||
|
|
||||||
public ECoreType CoreType { get; set; }
|
public ECoreType CoreType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class TunModeItem
|
public class TunModeItem
|
||||||
{
|
{
|
||||||
public bool EnableTun { get; set; }
|
public bool EnableTun { get; set; }
|
||||||
public bool StrictRoute { get; set; } = true;
|
public bool StrictRoute { get; set; } = true;
|
||||||
public string Stack { get; set; }
|
public string Stack { get; set; }
|
||||||
|
@ -148,61 +148,61 @@ namespace ServiceLib.Models
|
||||||
public bool EnableExInbound { get; set; }
|
public bool EnableExInbound { get; set; }
|
||||||
public bool EnableIPv6Address { get; set; }
|
public bool EnableIPv6Address { get; set; }
|
||||||
public string? LinuxSudoPwd { get; set; }
|
public string? LinuxSudoPwd { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SpeedTestItem
|
public class SpeedTestItem
|
||||||
{
|
{
|
||||||
public int SpeedTestTimeout { get; set; }
|
public int SpeedTestTimeout { get; set; }
|
||||||
public string SpeedTestUrl { get; set; }
|
public string SpeedTestUrl { get; set; }
|
||||||
public string SpeedPingTestUrl { get; set; }
|
public string SpeedPingTestUrl { get; set; }
|
||||||
public int MixedConcurrencyCount { get; set; }
|
public int MixedConcurrencyCount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RoutingBasicItem
|
public class RoutingBasicItem
|
||||||
{
|
{
|
||||||
public string DomainStrategy { get; set; }
|
public string DomainStrategy { get; set; }
|
||||||
public string DomainStrategy4Singbox { get; set; }
|
public string DomainStrategy4Singbox { get; set; }
|
||||||
public string DomainMatcher { get; set; }
|
public string DomainMatcher { get; set; }
|
||||||
public string RoutingIndexId { get; set; }
|
public string RoutingIndexId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ColumnItem
|
public class ColumnItem
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public int Width { get; set; }
|
public int Width { get; set; }
|
||||||
public int Index { get; set; }
|
public int Index { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Mux4RayItem
|
public class Mux4RayItem
|
||||||
{
|
{
|
||||||
public int? Concurrency { get; set; }
|
public int? Concurrency { get; set; }
|
||||||
public int? XudpConcurrency { get; set; }
|
public int? XudpConcurrency { get; set; }
|
||||||
public string? XudpProxyUDP443 { get; set; }
|
public string? XudpProxyUDP443 { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Mux4SboxItem
|
public class Mux4SboxItem
|
||||||
{
|
{
|
||||||
public string Protocol { get; set; }
|
public string Protocol { get; set; }
|
||||||
public int MaxConnections { get; set; }
|
public int MaxConnections { get; set; }
|
||||||
public bool? Padding { get; set; }
|
public bool? Padding { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class HysteriaItem
|
public class HysteriaItem
|
||||||
{
|
{
|
||||||
public int UpMbps { get; set; }
|
public int UpMbps { get; set; }
|
||||||
public int DownMbps { get; set; }
|
public int DownMbps { get; set; }
|
||||||
public int HopInterval { get; set; } = 30;
|
public int HopInterval { get; set; } = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ClashUIItem
|
public class ClashUIItem
|
||||||
{
|
{
|
||||||
public ERuleMode RuleMode { get; set; }
|
public ERuleMode RuleMode { get; set; }
|
||||||
public bool EnableIPv6 { get; set; }
|
public bool EnableIPv6 { get; set; }
|
||||||
public bool EnableMixinContent { get; set; }
|
public bool EnableMixinContent { get; set; }
|
||||||
|
@ -211,38 +211,37 @@ namespace ServiceLib.Models
|
||||||
public int ProxiesAutoDelayTestInterval { get; set; } = 10;
|
public int ProxiesAutoDelayTestInterval { get; set; } = 10;
|
||||||
public bool ConnectionsAutoRefresh { get; set; }
|
public bool ConnectionsAutoRefresh { get; set; }
|
||||||
public int ConnectionsRefreshInterval { get; set; } = 2;
|
public int ConnectionsRefreshInterval { get; set; } = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SystemProxyItem
|
public class SystemProxyItem
|
||||||
{
|
{
|
||||||
public ESysProxyType SysProxyType { get; set; }
|
public ESysProxyType SysProxyType { get; set; }
|
||||||
public string SystemProxyExceptions { get; set; }
|
public string SystemProxyExceptions { get; set; }
|
||||||
public bool NotProxyLocalAddress { get; set; } = true;
|
public bool NotProxyLocalAddress { get; set; } = true;
|
||||||
public string SystemProxyAdvancedProtocol { get; set; }
|
public string SystemProxyAdvancedProtocol { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class WebDavItem
|
public class WebDavItem
|
||||||
{
|
{
|
||||||
public string? Url { get; set; }
|
public string? Url { get; set; }
|
||||||
public string? UserName { get; set; }
|
public string? UserName { get; set; }
|
||||||
public string? Password { get; set; }
|
public string? Password { get; set; }
|
||||||
public string? DirName { get; set; }
|
public string? DirName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class CheckUpdateItem
|
public class CheckUpdateItem
|
||||||
{
|
{
|
||||||
public bool CheckPreReleaseUpdate { get; set; }
|
public bool CheckPreReleaseUpdate { get; set; }
|
||||||
public List<string>? SelectedCoreTypes { get; set; }
|
public List<string>? SelectedCoreTypes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Fragment4RayItem
|
public class Fragment4RayItem
|
||||||
{
|
{
|
||||||
public string? Packets { get; set; }
|
public string? Packets { get; set; }
|
||||||
public string? Length { get; set; }
|
public string? Length { get; set; }
|
||||||
public string? Interval { get; set; }
|
public string? Interval { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class CoreInfo
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class CoreInfo
|
|
||||||
{
|
|
||||||
public ECoreType CoreType { get; set; }
|
public ECoreType CoreType { get; set; }
|
||||||
public List<string>? CoreExes { get; set; }
|
public List<string>? CoreExes { get; set; }
|
||||||
public string? Arguments { get; set; }
|
public string? Arguments { get; set; }
|
||||||
|
@ -17,5 +17,4 @@ namespace ServiceLib.Models
|
||||||
public string? Match { get; set; }
|
public string? Match { get; set; }
|
||||||
public string? VersionArg { get; set; }
|
public string? VersionArg { get; set; }
|
||||||
public bool AbsolutePath { get; set; }
|
public bool AbsolutePath { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class DNSItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class DNSItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
@ -16,5 +16,4 @@ namespace ServiceLib.Models
|
||||||
public string? TunDNS { get; set; }
|
public string? TunDNS { get; set; }
|
||||||
public string? DomainStrategy4Freedom { get; set; }
|
public string? DomainStrategy4Freedom { get; set; }
|
||||||
public string? DomainDNSAddress { get; set; }
|
public string? DomainDNSAddress { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
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; }
|
||||||
|
|
||||||
[JsonPropertyName("id")] public int Id { get; set; }
|
[JsonPropertyName("id")] public int Id { get; set; }
|
||||||
|
@ -27,10 +27,10 @@ namespace ServiceLib.Models
|
||||||
[JsonPropertyName("updated_at")] public DateTime UpdatedAt { get; set; }
|
[JsonPropertyName("updated_at")] public DateTime UpdatedAt { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("browser_download_url")] public string? BrowserDownloadUrl { get; set; }
|
[JsonPropertyName("browser_download_url")] public string? BrowserDownloadUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GitHubRelease
|
public class GitHubRelease
|
||||||
{
|
{
|
||||||
[JsonPropertyName("url")] public string? Url { get; set; }
|
[JsonPropertyName("url")] public string? Url { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("assets_url")] public string? AssetsUrl { get; set; }
|
[JsonPropertyName("assets_url")] public string? AssetsUrl { get; set; }
|
||||||
|
@ -64,5 +64,4 @@ namespace ServiceLib.Models
|
||||||
[JsonPropertyName("zipball_url")] public string? ZipballUrl { get; set; }
|
[JsonPropertyName("zipball_url")] public string? ZipballUrl { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("body")] public string? Body { get; set; }
|
[JsonPropertyName("body")] public string? Body { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
internal class IPAPIInfo
|
||||||
{
|
{
|
||||||
internal class IPAPIInfo
|
|
||||||
{
|
|
||||||
public string? ip { get; set; }
|
public string? ip { get; set; }
|
||||||
public string? city { get; set; }
|
public string? city { get; set; }
|
||||||
public string? region { get; set; }
|
public string? region { get; set; }
|
||||||
|
@ -9,5 +9,4 @@
|
||||||
public string? country { get; set; }
|
public string? country { get; set; }
|
||||||
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,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ProfileExItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ProfileExItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string IndexId { get; set; }
|
public string IndexId { get; set; }
|
||||||
|
|
||||||
|
@ -12,5 +12,4 @@ namespace ServiceLib.Models
|
||||||
public decimal Speed { get; set; }
|
public decimal Speed { get; set; }
|
||||||
public int Sort { get; set; }
|
public int Sort { get; set; }
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ProfileItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ProfileItem
|
|
||||||
{
|
|
||||||
public ProfileItem()
|
public ProfileItem()
|
||||||
{
|
{
|
||||||
IndexId = string.Empty;
|
IndexId = string.Empty;
|
||||||
|
@ -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; }
|
||||||
|
@ -92,5 +93,4 @@ namespace ServiceLib.Models
|
||||||
public string ShortId { get; set; }
|
public string ShortId { get; set; }
|
||||||
public string SpiderX { get; set; }
|
public string SpiderX { get; set; }
|
||||||
public string Extra { get; set; }
|
public string Extra { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ProfileItemModel : ProfileItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ProfileItemModel : ProfileItem
|
|
||||||
{
|
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
public string SubRemarks { get; set; }
|
public string SubRemarks { get; set; }
|
||||||
public int Delay { get; set; }
|
public int Delay { get; set; }
|
||||||
|
@ -14,5 +14,4 @@
|
||||||
public string TodayDown { get; set; }
|
public string TodayDown { get; set; }
|
||||||
public string TotalUp { get; set; }
|
public string TotalUp { get; set; }
|
||||||
public string TotalDown { get; set; }
|
public string TotalDown { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
public class RetResult
|
||||||
{
|
{
|
||||||
public class RetResult
|
|
||||||
{
|
|
||||||
public bool Success { get; set; }
|
public bool Success { get; set; }
|
||||||
public string? Msg { get; set; }
|
public string? Msg { get; set; }
|
||||||
public object? Data { get; set; }
|
public object? Data { get; set; }
|
||||||
|
@ -23,5 +23,4 @@
|
||||||
Msg = msg;
|
Msg = msg;
|
||||||
Data = data;
|
Data = data;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RoutingItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RoutingItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
@ -19,5 +19,4 @@ namespace ServiceLib.Models
|
||||||
public string DomainStrategy { get; set; }
|
public string DomainStrategy { get; set; }
|
||||||
public string DomainStrategy4Singbox { get; set; }
|
public string DomainStrategy4Singbox { get; set; }
|
||||||
public int Sort { get; set; }
|
public int Sort { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,8 +1,7 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RoutingItemModel : RoutingItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
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]
|
||||||
|
public class RoutingTemplate
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RoutingTemplate
|
|
||||||
{
|
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
public RoutingItem[] RoutingItems { get; set; }
|
public RoutingItem[] RoutingItems { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RulesItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RulesItem
|
|
||||||
{
|
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public string? Type { get; set; }
|
public string? Type { get; set; }
|
||||||
public string? Port { get; set; }
|
public string? Port { get; set; }
|
||||||
|
@ -15,5 +15,4 @@
|
||||||
public List<string>? Process { get; set; }
|
public List<string>? Process { get; set; }
|
||||||
public bool Enabled { get; set; } = true;
|
public bool Enabled { get; set; } = true;
|
||||||
public string? Remarks { get; set; }
|
public string? Remarks { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RulesItemModel : RulesItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class RulesItemModel : RulesItem
|
|
||||||
{
|
|
||||||
public string InboundTags { get; set; }
|
public string InboundTags { get; set; }
|
||||||
public string Ips { get; set; }
|
public string Ips { get; set; }
|
||||||
public string Domains { get; set; }
|
public string Domains { get; set; }
|
||||||
public string Protocols { get; set; }
|
public string Protocols { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ServerSpeedItem : ServerStatItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ServerSpeedItem : ServerStatItem
|
|
||||||
{
|
|
||||||
public long ProxyUp { get; set; }
|
public long ProxyUp { get; set; }
|
||||||
|
|
||||||
public long ProxyDown { get; set; }
|
public long ProxyDown { get; set; }
|
||||||
|
@ -10,13 +10,12 @@
|
||||||
public long DirectUp { get; set; }
|
public long DirectUp { get; set; }
|
||||||
|
|
||||||
public long DirectDown { get; set; }
|
public long DirectDown { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class TrafficItem
|
public class TrafficItem
|
||||||
{
|
{
|
||||||
public ulong Up { get; set; }
|
public ulong Up { get; set; }
|
||||||
|
|
||||||
public ulong Down { get; set; }
|
public ulong Down { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ServerStatItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ServerStatItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string IndexId { get; set; }
|
public string IndexId { get; set; }
|
||||||
|
|
||||||
|
@ -17,5 +17,4 @@ namespace ServiceLib.Models
|
||||||
public long TodayDown { get; set; }
|
public long TodayDown { get; set; }
|
||||||
|
|
||||||
public long DateNow { get; set; }
|
public long DateNow { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,13 +1,12 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ServerTestItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ServerTestItem
|
|
||||||
{
|
|
||||||
public string? IndexId { get; set; }
|
public string? IndexId { get; set; }
|
||||||
public string? Address { get; set; }
|
public string? Address { get; set; }
|
||||||
public int Port { get; set; }
|
public int Port { get; set; }
|
||||||
public EConfigType ConfigType { get; set; }
|
public EConfigType ConfigType { get; set; }
|
||||||
public bool AllowTest { get; set; }
|
public bool AllowTest { get; set; }
|
||||||
public int QueueNum { get; set; }
|
public int QueueNum { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
public class SingboxConfig
|
||||||
{
|
{
|
||||||
public class SingboxConfig
|
|
||||||
{
|
|
||||||
public Log4Sbox log { get; set; }
|
public Log4Sbox log { get; set; }
|
||||||
public Dns4Sbox? dns { get; set; }
|
public Dns4Sbox? dns { get; set; }
|
||||||
public List<Inbound4Sbox> inbounds { get; set; }
|
public List<Inbound4Sbox> inbounds { get; set; }
|
||||||
public List<Outbound4Sbox> outbounds { get; set; }
|
public List<Outbound4Sbox> outbounds { get; set; }
|
||||||
public Route4Sbox route { get; set; }
|
public Route4Sbox route { get; set; }
|
||||||
public Experimental4Sbox? experimental { get; set; }
|
public Experimental4Sbox? experimental { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Log4Sbox
|
public class Log4Sbox
|
||||||
{
|
{
|
||||||
public bool? disabled { get; set; }
|
public bool? disabled { get; set; }
|
||||||
public string level { get; set; }
|
public string level { get; set; }
|
||||||
public string output { get; set; }
|
public string output { get; set; }
|
||||||
public bool? timestamp { get; set; }
|
public bool? timestamp { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Dns4Sbox
|
public class Dns4Sbox
|
||||||
{
|
{
|
||||||
public List<Server4Sbox> servers { get; set; }
|
public List<Server4Sbox> servers { get; set; }
|
||||||
public List<Rule4Sbox> rules { get; set; }
|
public List<Rule4Sbox> rules { get; set; }
|
||||||
public string? final { get; set; }
|
public string? final { get; set; }
|
||||||
|
@ -30,18 +30,18 @@ namespace ServiceLib.Models
|
||||||
public bool? reverse_mapping { get; set; }
|
public bool? reverse_mapping { get; set; }
|
||||||
public string? client_subnet { get; set; }
|
public string? client_subnet { get; set; }
|
||||||
public Fakeip4Sbox? fakeip { get; set; }
|
public Fakeip4Sbox? fakeip { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Route4Sbox
|
public class Route4Sbox
|
||||||
{
|
{
|
||||||
public bool? auto_detect_interface { get; set; }
|
public bool? auto_detect_interface { get; set; }
|
||||||
public List<Rule4Sbox> rules { get; set; }
|
public List<Rule4Sbox> rules { get; set; }
|
||||||
public List<Ruleset4Sbox>? rule_set { get; set; }
|
public List<Ruleset4Sbox>? rule_set { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Rule4Sbox
|
public class Rule4Sbox
|
||||||
{
|
{
|
||||||
public string? outbound { get; set; }
|
public string? outbound { get; set; }
|
||||||
public string? server { get; set; }
|
public string? server { get; set; }
|
||||||
public bool? disable_cache { get; set; }
|
public bool? disable_cache { get; set; }
|
||||||
|
@ -67,11 +67,11 @@ namespace ServiceLib.Models
|
||||||
public List<string>? process_name { get; set; }
|
public List<string>? process_name { get; set; }
|
||||||
public List<string>? rule_set { get; set; }
|
public List<string>? rule_set { get; set; }
|
||||||
public List<Rule4Sbox>? rules { get; set; }
|
public List<Rule4Sbox>? rules { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Inbound4Sbox
|
public class Inbound4Sbox
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
public string listen { get; set; }
|
public string listen { get; set; }
|
||||||
|
@ -87,16 +87,16 @@ namespace ServiceLib.Models
|
||||||
public bool? sniff { get; set; }
|
public bool? sniff { get; set; }
|
||||||
public bool? sniff_override_destination { get; set; }
|
public bool? sniff_override_destination { get; set; }
|
||||||
public List<User4Sbox> users { get; set; }
|
public List<User4Sbox> users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class User4Sbox
|
public class User4Sbox
|
||||||
{
|
{
|
||||||
public string username { get; set; }
|
public string username { get; set; }
|
||||||
public string password { get; set; }
|
public string password { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Outbound4Sbox
|
public class Outbound4Sbox
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
public string? server { get; set; }
|
public string? server { get; set; }
|
||||||
|
@ -134,41 +134,41 @@ namespace ServiceLib.Models
|
||||||
public HyObfs4Sbox? obfs { get; set; }
|
public HyObfs4Sbox? obfs { get; set; }
|
||||||
public List<string>? outbounds { get; set; }
|
public List<string>? outbounds { get; set; }
|
||||||
public bool? interrupt_exist_connections { get; set; }
|
public bool? interrupt_exist_connections { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Tls4Sbox
|
public class Tls4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string? server_name { get; set; }
|
public string? server_name { get; set; }
|
||||||
public bool? insecure { get; set; }
|
public bool? insecure { get; set; }
|
||||||
public List<string>? alpn { get; set; }
|
public List<string>? alpn { get; set; }
|
||||||
public Utls4Sbox? utls { get; set; }
|
public Utls4Sbox? utls { get; set; }
|
||||||
public Reality4Sbox? reality { get; set; }
|
public Reality4Sbox? reality { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Multiplex4Sbox
|
public class Multiplex4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string protocol { get; set; }
|
public string protocol { get; set; }
|
||||||
public int max_connections { get; set; }
|
public int max_connections { get; set; }
|
||||||
public bool? padding { get; set; }
|
public bool? padding { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Utls4Sbox
|
public class Utls4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string fingerprint { get; set; }
|
public string fingerprint { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Reality4Sbox
|
public class Reality4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string public_key { get; set; }
|
public string public_key { get; set; }
|
||||||
public string short_id { get; set; }
|
public string short_id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Transport4Sbox
|
public class Transport4Sbox
|
||||||
{
|
{
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
public object? host { get; set; }
|
public object? host { get; set; }
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
|
@ -178,21 +178,21 @@ namespace ServiceLib.Models
|
||||||
public string? idle_timeout { get; set; }
|
public string? idle_timeout { get; set; }
|
||||||
public string? ping_timeout { get; set; }
|
public string? ping_timeout { get; set; }
|
||||||
public bool? permit_without_stream { get; set; }
|
public bool? permit_without_stream { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Headers4Sbox
|
public class Headers4Sbox
|
||||||
{
|
{
|
||||||
public string? Host { get; set; }
|
public string? Host { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HyObfs4Sbox
|
public class HyObfs4Sbox
|
||||||
{
|
{
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
public string? password { get; set; }
|
public string? password { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Server4Sbox
|
public class Server4Sbox
|
||||||
{
|
{
|
||||||
public string? tag { get; set; }
|
public string? tag { get; set; }
|
||||||
public string? address { get; set; }
|
public string? address { get; set; }
|
||||||
public string? address_resolver { get; set; }
|
public string? address_resolver { get; set; }
|
||||||
|
@ -200,52 +200,52 @@ namespace ServiceLib.Models
|
||||||
public string? strategy { get; set; }
|
public string? strategy { get; set; }
|
||||||
public string? detour { get; set; }
|
public string? detour { get; set; }
|
||||||
public string? client_subnet { get; set; }
|
public string? client_subnet { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Experimental4Sbox
|
public class Experimental4Sbox
|
||||||
{
|
{
|
||||||
public CacheFile4Sbox? cache_file { get; set; }
|
public CacheFile4Sbox? cache_file { get; set; }
|
||||||
public V2ray_Api4Sbox? v2ray_api { get; set; }
|
public V2ray_Api4Sbox? v2ray_api { get; set; }
|
||||||
public Clash_Api4Sbox? clash_api { get; set; }
|
public Clash_Api4Sbox? clash_api { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class V2ray_Api4Sbox
|
public class V2ray_Api4Sbox
|
||||||
{
|
{
|
||||||
public string listen { get; set; }
|
public string listen { get; set; }
|
||||||
public Stats4Sbox stats { get; set; }
|
public Stats4Sbox stats { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Clash_Api4Sbox
|
public class Clash_Api4Sbox
|
||||||
{
|
{
|
||||||
public string? external_controller { get; set; }
|
public string? external_controller { get; set; }
|
||||||
public bool? store_selected { get; set; }
|
public bool? store_selected { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Stats4Sbox
|
public class Stats4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public List<string>? inbounds { get; set; }
|
public List<string>? inbounds { get; set; }
|
||||||
public List<string>? outbounds { get; set; }
|
public List<string>? outbounds { get; set; }
|
||||||
public List<string>? users { get; set; }
|
public List<string>? users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Fakeip4Sbox
|
public class Fakeip4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string inet4_range { get; set; }
|
public string inet4_range { get; set; }
|
||||||
public string inet6_range { get; set; }
|
public string inet6_range { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CacheFile4Sbox
|
public class CacheFile4Sbox
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
public string? cache_id { get; set; }
|
public string? cache_id { get; set; }
|
||||||
public bool? store_fakeip { get; set; }
|
public bool? store_fakeip { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Ruleset4Sbox
|
public class Ruleset4Sbox
|
||||||
{
|
{
|
||||||
public string? tag { get; set; }
|
public string? tag { get; set; }
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
public string? format { get; set; }
|
public string? format { get; set; }
|
||||||
|
@ -253,5 +253,4 @@ namespace ServiceLib.Models
|
||||||
public string? url { get; set; }
|
public string? url { get; set; }
|
||||||
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,12 +1,11 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class SpeedTestResult
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class SpeedTestResult
|
|
||||||
{
|
|
||||||
public string? IndexId { get; set; }
|
public string? IndexId { get; set; }
|
||||||
|
|
||||||
public string? Delay { get; set; }
|
public string? Delay { get; set; }
|
||||||
|
|
||||||
public string? Speed { get; set; }
|
public string? Speed { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,18 +1,17 @@
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
{
|
|
||||||
public class SsSIP008
|
|
||||||
{
|
|
||||||
public List<SsServer>? servers { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
public class SsSIP008
|
||||||
public class SsServer
|
{
|
||||||
{
|
public List<SsServer>? servers { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class SsServer
|
||||||
|
{
|
||||||
public string? remarks { get; set; }
|
public string? remarks { get; set; }
|
||||||
public string? server { get; set; }
|
public string? server { get; set; }
|
||||||
public string? server_port { get; set; }
|
public string? server_port { get; set; }
|
||||||
public string? method { get; set; }
|
public string? method { get; set; }
|
||||||
public string? password { get; set; }
|
public string? password { get; set; }
|
||||||
public string? plugin { get; set; }
|
public string? plugin { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Models
|
namespace ServiceLib.Models;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class SubItem
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class SubItem
|
|
||||||
{
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
@ -35,5 +35,4 @@ namespace ServiceLib.Models
|
||||||
public int? PreSocksPort { get; set; }
|
public int? PreSocksPort { get; set; }
|
||||||
|
|
||||||
public string? Memo { get; set; }
|
public string? Memo { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
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; }
|
||||||
public object dns { get; set; }
|
public object dns { get; set; }
|
||||||
public List<Inbounds4Ray> inbounds { get; set; }
|
public List<Inbounds4Ray> inbounds { get; set; }
|
||||||
|
@ -12,39 +12,41 @@ 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; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Stats4Ray
|
public class Stats4Ray
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
public class Metrics4Ray
|
public class Metrics4Ray
|
||||||
{
|
{
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Policy4Ray
|
public class Policy4Ray
|
||||||
{
|
{
|
||||||
public SystemPolicy4Ray system { get; set; }
|
public SystemPolicy4Ray system { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SystemPolicy4Ray
|
public class SystemPolicy4Ray
|
||||||
{
|
{
|
||||||
public bool statsOutboundUplink { get; set; }
|
public bool statsOutboundUplink { get; set; }
|
||||||
public bool statsOutboundDownlink { get; set; }
|
public bool statsOutboundDownlink { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Log4Ray
|
public class Log4Ray
|
||||||
{
|
{
|
||||||
public string? access { get; set; }
|
public string? access { get; set; }
|
||||||
|
|
||||||
public string? error { get; set; }
|
public string? error { get; set; }
|
||||||
|
|
||||||
public string? loglevel { get; set; }
|
public string? loglevel { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Inbounds4Ray
|
public class Inbounds4Ray
|
||||||
{
|
{
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
|
|
||||||
public int port { get; set; }
|
public int port { get; set; }
|
||||||
|
@ -56,10 +58,10 @@ namespace ServiceLib.Models
|
||||||
public Sniffing4Ray sniffing { get; set; }
|
public Sniffing4Ray sniffing { get; set; }
|
||||||
|
|
||||||
public Inboundsettings4Ray settings { get; set; }
|
public Inboundsettings4Ray settings { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Inboundsettings4Ray
|
public class Inboundsettings4Ray
|
||||||
{
|
{
|
||||||
public string? auth { get; set; }
|
public string? auth { get; set; }
|
||||||
|
|
||||||
public bool? udp { get; set; }
|
public bool? udp { get; set; }
|
||||||
|
@ -75,10 +77,10 @@ namespace ServiceLib.Models
|
||||||
public bool? allowTransparent { get; set; }
|
public bool? allowTransparent { get; set; }
|
||||||
|
|
||||||
public List<AccountsItem4Ray>? accounts { get; set; }
|
public List<AccountsItem4Ray>? accounts { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UsersItem4Ray
|
public class UsersItem4Ray
|
||||||
{
|
{
|
||||||
public string? id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
public int? alterId { get; set; }
|
public int? alterId { get; set; }
|
||||||
|
@ -90,17 +92,17 @@ namespace ServiceLib.Models
|
||||||
public string? encryption { get; set; }
|
public string? encryption { get; set; }
|
||||||
|
|
||||||
public string? flow { get; set; }
|
public string? flow { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Sniffing4Ray
|
public class Sniffing4Ray
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public List<string>? destOverride { get; set; }
|
public List<string>? destOverride { get; set; }
|
||||||
public bool routeOnly { get; set; }
|
public bool routeOnly { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Outbounds4Ray
|
public class Outbounds4Ray
|
||||||
{
|
{
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
|
|
||||||
public string protocol { get; set; }
|
public string protocol { get; set; }
|
||||||
|
@ -110,10 +112,10 @@ namespace ServiceLib.Models
|
||||||
public StreamSettings4Ray streamSettings { get; set; }
|
public StreamSettings4Ray streamSettings { get; set; }
|
||||||
|
|
||||||
public Mux4Ray mux { get; set; }
|
public Mux4Ray mux { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Outboundsettings4Ray
|
public class Outboundsettings4Ray
|
||||||
{
|
{
|
||||||
public List<VnextItem4Ray>? vnext { get; set; }
|
public List<VnextItem4Ray>? vnext { get; set; }
|
||||||
|
|
||||||
public List<ServersItem4Ray>? servers { get; set; }
|
public List<ServersItem4Ray>? servers { get; set; }
|
||||||
|
@ -125,19 +127,19 @@ namespace ServiceLib.Models
|
||||||
public int? userLevel { get; set; }
|
public int? userLevel { get; set; }
|
||||||
|
|
||||||
public FragmentItem4Ray? fragment { get; set; }
|
public FragmentItem4Ray? fragment { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class VnextItem4Ray
|
public class VnextItem4Ray
|
||||||
{
|
{
|
||||||
public string address { get; set; }
|
public string address { get; set; }
|
||||||
|
|
||||||
public int port { get; set; }
|
public int port { get; set; }
|
||||||
|
|
||||||
public List<UsersItem4Ray> users { get; set; }
|
public List<UsersItem4Ray> users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ServersItem4Ray
|
public class ServersItem4Ray
|
||||||
{
|
{
|
||||||
public string email { get; set; }
|
public string email { get; set; }
|
||||||
|
|
||||||
public string address { get; set; }
|
public string address { get; set; }
|
||||||
|
@ -155,43 +157,43 @@ namespace ServiceLib.Models
|
||||||
public string flow { get; set; }
|
public string flow { get; set; }
|
||||||
|
|
||||||
public List<SocksUsersItem4Ray> users { get; set; }
|
public List<SocksUsersItem4Ray> users { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SocksUsersItem4Ray
|
public class SocksUsersItem4Ray
|
||||||
{
|
{
|
||||||
public string user { get; set; }
|
public string user { get; set; }
|
||||||
|
|
||||||
public string pass { get; set; }
|
public string pass { get; set; }
|
||||||
|
|
||||||
public int? level { get; set; }
|
public int? level { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Mux4Ray
|
public class Mux4Ray
|
||||||
{
|
{
|
||||||
public bool enabled { get; set; }
|
public bool enabled { get; set; }
|
||||||
public int? concurrency { get; set; }
|
public int? concurrency { get; set; }
|
||||||
public int? xudpConcurrency { get; set; }
|
public int? xudpConcurrency { get; set; }
|
||||||
public string? xudpProxyUDP443 { get; set; }
|
public string? xudpProxyUDP443 { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Response4Ray
|
public class Response4Ray
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Dns4Ray
|
public class Dns4Ray
|
||||||
{
|
{
|
||||||
public List<string> servers { get; set; }
|
public List<string> servers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DnsServer4Ray
|
public class DnsServer4Ray
|
||||||
{
|
{
|
||||||
public string? address { get; set; }
|
public string? address { get; set; }
|
||||||
public List<string>? domains { get; set; }
|
public List<string>? domains { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Routing4Ray
|
public class Routing4Ray
|
||||||
{
|
{
|
||||||
public string domainStrategy { get; set; }
|
public string domainStrategy { get; set; }
|
||||||
|
|
||||||
public string? domainMatcher { get; set; }
|
public string? domainMatcher { get; set; }
|
||||||
|
@ -199,11 +201,11 @@ namespace ServiceLib.Models
|
||||||
public List<RulesItem4Ray> rules { get; set; }
|
public List<RulesItem4Ray> rules { get; set; }
|
||||||
|
|
||||||
public List<BalancersItem4Ray>? balancers { get; set; }
|
public List<BalancersItem4Ray>? balancers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class RulesItem4Ray
|
public class RulesItem4Ray
|
||||||
{
|
{
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
|
|
||||||
public string? port { get; set; }
|
public string? port { get; set; }
|
||||||
|
@ -220,22 +222,62 @@ namespace ServiceLib.Models
|
||||||
public List<string>? domain { get; set; }
|
public List<string>? domain { get; set; }
|
||||||
|
|
||||||
public List<string>? protocol { get; set; }
|
public List<string>? protocol { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BalancersItem4Ray
|
public class BalancersItem4Ray
|
||||||
{
|
{
|
||||||
public List<string>? selector { get; set; }
|
public List<string>? selector { get; set; }
|
||||||
public BalancersStrategy4Ray? strategy { get; set; }
|
public BalancersStrategy4Ray? strategy { get; set; }
|
||||||
public string? tag { get; set; }
|
public string? tag { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BalancersStrategy4Ray
|
public class BalancersStrategy4Ray
|
||||||
{
|
{
|
||||||
public string? type { get; set; }
|
public string? type { get; set; }
|
||||||
}
|
public BalancersStrategySettings4Ray? settings { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class StreamSettings4Ray
|
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 string network { get; set; }
|
public string network { get; set; }
|
||||||
|
|
||||||
public string security { get; set; }
|
public string security { get; set; }
|
||||||
|
@ -261,10 +303,10 @@ namespace ServiceLib.Models
|
||||||
public GrpcSettings4Ray? grpcSettings { get; set; }
|
public GrpcSettings4Ray? grpcSettings { get; set; }
|
||||||
|
|
||||||
public Sockopt4Ray? sockopt { get; set; }
|
public Sockopt4Ray? sockopt { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TlsSettings4Ray
|
public class TlsSettings4Ray
|
||||||
{
|
{
|
||||||
public bool? allowInsecure { get; set; }
|
public bool? allowInsecure { get; set; }
|
||||||
|
|
||||||
public string? serverName { get; set; }
|
public string? serverName { get; set; }
|
||||||
|
@ -277,15 +319,15 @@ namespace ServiceLib.Models
|
||||||
public string? publicKey { get; set; }
|
public string? publicKey { get; set; }
|
||||||
public string? shortId { get; set; }
|
public string? shortId { get; set; }
|
||||||
public string? spiderX { get; set; }
|
public string? spiderX { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TcpSettings4Ray
|
public class TcpSettings4Ray
|
||||||
{
|
{
|
||||||
public Header4Ray header { get; set; }
|
public Header4Ray header { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Header4Ray
|
public class Header4Ray
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
|
|
||||||
public object request { get; set; }
|
public object request { get; set; }
|
||||||
|
@ -293,10 +335,10 @@ namespace ServiceLib.Models
|
||||||
public object response { get; set; }
|
public object response { get; set; }
|
||||||
|
|
||||||
public string? domain { get; set; }
|
public string? domain { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class KcpSettings4Ray
|
public class KcpSettings4Ray
|
||||||
{
|
{
|
||||||
public int mtu { get; set; }
|
public int mtu { get; set; }
|
||||||
|
|
||||||
public int tti { get; set; }
|
public int tti { get; set; }
|
||||||
|
@ -314,57 +356,57 @@ namespace ServiceLib.Models
|
||||||
public Header4Ray header { get; set; }
|
public Header4Ray header { get; set; }
|
||||||
|
|
||||||
public string seed { get; set; }
|
public string seed { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WsSettings4Ray
|
public class WsSettings4Ray
|
||||||
{
|
{
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
public string? host { get; set; }
|
public string? host { get; set; }
|
||||||
|
|
||||||
public Headers4Ray headers { get; set; }
|
public Headers4Ray headers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Headers4Ray
|
public class Headers4Ray
|
||||||
{
|
{
|
||||||
public string Host { get; set; }
|
public string Host { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("User-Agent")]
|
[JsonPropertyName("User-Agent")]
|
||||||
public string UserAgent { get; set; }
|
public string UserAgent { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HttpupgradeSettings4Ray
|
public class HttpupgradeSettings4Ray
|
||||||
{
|
{
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
|
|
||||||
public string? host { get; set; }
|
public string? host { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class XhttpSettings4Ray
|
public class XhttpSettings4Ray
|
||||||
{
|
{
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
public string? host { get; set; }
|
public string? host { get; set; }
|
||||||
public string? mode { get; set; }
|
public string? mode { get; set; }
|
||||||
public object? extra { get; set; }
|
public object? extra { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HttpSettings4Ray
|
public class HttpSettings4Ray
|
||||||
{
|
{
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
|
|
||||||
public List<string>? host { get; set; }
|
public List<string>? host { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QuicSettings4Ray
|
public class QuicSettings4Ray
|
||||||
{
|
{
|
||||||
public string security { get; set; }
|
public string security { get; set; }
|
||||||
|
|
||||||
public string key { get; set; }
|
public string key { get; set; }
|
||||||
|
|
||||||
public Header4Ray header { get; set; }
|
public Header4Ray header { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GrpcSettings4Ray
|
public class GrpcSettings4Ray
|
||||||
{
|
{
|
||||||
public string? authority { get; set; }
|
public string? authority { get; set; }
|
||||||
public string? serviceName { get; set; }
|
public string? serviceName { get; set; }
|
||||||
public bool multiMode { get; set; }
|
public bool multiMode { get; set; }
|
||||||
|
@ -372,24 +414,23 @@ namespace ServiceLib.Models
|
||||||
public int? health_check_timeout { get; set; }
|
public int? health_check_timeout { get; set; }
|
||||||
public bool? permit_without_stream { get; set; }
|
public bool? permit_without_stream { get; set; }
|
||||||
public int? initial_windows_size { get; set; }
|
public int? initial_windows_size { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AccountsItem4Ray
|
public class AccountsItem4Ray
|
||||||
{
|
{
|
||||||
public string user { get; set; }
|
public string user { get; set; }
|
||||||
|
|
||||||
public string pass { get; set; }
|
public string pass { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Sockopt4Ray
|
public class Sockopt4Ray
|
||||||
{
|
{
|
||||||
public string? dialerProxy { get; set; }
|
public string? dialerProxy { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FragmentItem4Ray
|
public class FragmentItem4Ray
|
||||||
{
|
{
|
||||||
public string? packets { get; set; }
|
public string? packets { get; set; }
|
||||||
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