mirror of
https://github.com/2dust/v2rayN.git
synced 2025-09-17 23:43:05 +00:00
Compare commits
No commits in common. "24ccfb80776585bee04b0544999f2ba58eb9e21c" and "6ad07627314ebd7a6f523264884e18c1046cbd69" have entirely different histories.
24ccfb8077
...
6ad0762731
204 changed files with 24063 additions and 24146 deletions
|
@ -1,7 +1,7 @@
|
|||
namespace AmazTool;
|
||||
|
||||
internal static class Program
|
||||
namespace AmazTool
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
|
@ -22,4 +22,5 @@ internal static class Program
|
|||
|
||||
UpgradeApp.Upgrade(argData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ using System.Diagnostics;
|
|||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
|
||||
namespace AmazTool;
|
||||
|
||||
internal class UpgradeApp
|
||||
namespace AmazTool
|
||||
{
|
||||
internal class UpgradeApp
|
||||
{
|
||||
public static void Upgrade(string fileName)
|
||||
{
|
||||
Console.WriteLine($"{Resx.Resource.StartUnzipping}\n{fileName}");
|
||||
|
@ -113,4 +113,5 @@ internal class UpgradeApp
|
|||
|
||||
Utils.StartV2RayN();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace AmazTool;
|
||||
|
||||
internal class Utils
|
||||
namespace AmazTool
|
||||
{
|
||||
internal class Utils
|
||||
{
|
||||
public static string GetExePath()
|
||||
{
|
||||
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||
|
@ -48,4 +48,5 @@ internal class Utils
|
|||
Thread.Sleep(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>7.11.0</Version>
|
||||
<Version>7.10.5</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||
<NoWarn>CA1031;CS1591;NU1507;CA1416;IDE0058</NoWarn>
|
||||
<NoWarn>CA1031;CS1591;NU1507;CA1416</NoWarn>
|
||||
<Nullable>annotations</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Authors>2dust</Authors>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.6" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.2.6" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.2.6" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.2.6" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.5" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.2.5" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.2.5" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.2.5" />
|
||||
<PackageVersion Include="CliWrap" Version="3.8.2" />
|
||||
<PackageVersion Include="Downloader" Version="3.3.4" />
|
||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.0" />
|
||||
|
@ -18,12 +18,12 @@
|
|||
<PackageVersion Include="ReactiveUI" Version="20.2.45" />
|
||||
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||
<PackageVersion Include="ReactiveUI.WPF" Version="20.2.45" />
|
||||
<PackageVersion Include="Semi.Avalonia" Version="11.2.1.6" />
|
||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1.6" />
|
||||
<PackageVersion Include="Semi.Avalonia" Version="11.2.1.5" />
|
||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1.5" />
|
||||
<PackageVersion Include="Splat.NLog" Version="15.3.1" />
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageVersion Include="TaskScheduler" Version="2.12.1" />
|
||||
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
||||
<PackageVersion Include="WebDav.Client" Version="2.8.0" />
|
||||
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
|
||||
<PackageVersion Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.14" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
using ReactiveUI;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace ServiceLib.Base;
|
||||
|
||||
public class MyReactiveObject : ReactiveObject
|
||||
namespace ServiceLib.Base
|
||||
{
|
||||
public class MyReactiveObject : ReactiveObject
|
||||
{
|
||||
protected static Config? _config;
|
||||
protected Func<EViewAction, object?, Task<bool>>? _updateView;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class AesUtils
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class AesUtils
|
||||
{
|
||||
private const int KeySize = 256; // AES-256
|
||||
private const int IvSize = 16; // AES block size
|
||||
private const int Iterations = 10000;
|
||||
|
@ -97,4 +97,5 @@ public class AesUtils
|
|||
rng.GetBytes(randomNumber);
|
||||
return randomNumber;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class DesUtils
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class DesUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// Encrypt
|
||||
/// </summary>
|
||||
|
@ -71,4 +71,5 @@ public class DesUtils
|
|||
{
|
||||
return Utils.GetMd5(Utils.GetHomePath() + "DesUtils");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using System.Net;
|
||||
using Downloader;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class DownloaderHelper
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class DownloaderHelper
|
||||
{
|
||||
private static readonly Lazy<DownloaderHelper> _instance = new(() => new());
|
||||
public static DownloaderHelper Instance => _instance.Value;
|
||||
|
||||
|
@ -177,4 +177,5 @@ public class DownloaderHelper
|
|||
|
||||
downloadOpt = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ using System.Formats.Tar;
|
|||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public static class FileManager
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public static class FileManager
|
||||
{
|
||||
private static readonly string _tag = "FileManager";
|
||||
|
||||
public static bool ByteArrayToFile(string fileName, byte[] content)
|
||||
|
@ -223,4 +223,5 @@ public static class FileManager
|
|||
// ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@ using System.Net.Http.Headers;
|
|||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class HttpClientHelper
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class HttpClientHelper
|
||||
{
|
||||
private static readonly Lazy<HttpClientHelper> _instance = new(() =>
|
||||
{
|
||||
SocketsHttpHandler handler = new() { UseCookies = false };
|
||||
|
@ -202,4 +202,5 @@ public class HttpClientHelper
|
|||
}
|
||||
} while (isMoreToRead);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
/*
|
||||
* See:
|
||||
* http://stackoverflow.com/questions/6266820/working-example-of-createjobobject-setinformationjobobject-pinvoke-in-net
|
||||
|
@ -177,4 +178,4 @@ namespace ServiceLib.Common;
|
|||
}
|
||||
|
||||
#endregion Helper classes
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class JsonUtils
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class JsonUtils
|
||||
{
|
||||
private static readonly string _tag = "JsonUtils";
|
||||
|
||||
/// <summary>
|
||||
|
@ -127,4 +127,5 @@ public class JsonUtils
|
|||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public static JsonNode? SerializeToNode(object? obj) => JsonSerializer.SerializeToNode(obj);
|
||||
}
|
||||
}
|
|
@ -2,13 +2,10 @@ using NLog;
|
|||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class Logging
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
private static readonly Logger _logger1 = LogManager.GetLogger("Log1");
|
||||
private static readonly Logger _logger2 = LogManager.GetLogger("Log2");
|
||||
|
||||
public class Logging
|
||||
{
|
||||
public static void Setup()
|
||||
{
|
||||
LoggingConfiguration config = new();
|
||||
|
@ -35,7 +32,7 @@ public class Logging
|
|||
return;
|
||||
}
|
||||
|
||||
_logger1.Info(strContent);
|
||||
LogManager.GetLogger("Log1").Info(strContent);
|
||||
}
|
||||
|
||||
public static void SaveLog(string strTitle, Exception ex)
|
||||
|
@ -45,11 +42,13 @@ public class Logging
|
|||
return;
|
||||
}
|
||||
|
||||
_logger2.Debug($"{strTitle},{ex.Message}");
|
||||
_logger2.Debug(ex.StackTrace);
|
||||
var logger = LogManager.GetLogger("Log2");
|
||||
logger.Debug($"{strTitle},{ex.Message}");
|
||||
logger.Debug(ex.StackTrace);
|
||||
if (ex?.InnerException != null)
|
||||
{
|
||||
_logger2.Error(ex.InnerException);
|
||||
logger.Error(ex.InnerException);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using QRCoder;
|
||||
using QRCoder;
|
||||
using SkiaSharp;
|
||||
using ZXing.SkiaSharp;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class QRCodeHelper
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class QRCodeHelper
|
||||
{
|
||||
public static byte[]? GenQRCode(string? url)
|
||||
{
|
||||
using QRCodeGenerator qrGenerator = new();
|
||||
|
@ -86,4 +86,5 @@ public class QRCodeHelper
|
|||
canvas.DrawBitmap(bmp, 0, 0);
|
||||
return flipped;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Common;
|
||||
|
||||
public class SemanticVersion
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class SemanticVersion
|
||||
{
|
||||
private readonly int major;
|
||||
private readonly int minor;
|
||||
private readonly int patch;
|
||||
|
@ -183,4 +183,5 @@ public class SemanticVersion
|
|||
}
|
||||
|
||||
#endregion Private
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Collections;
|
||||
using SQLite;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public sealed class SQLiteHelper
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public sealed class SQLiteHelper
|
||||
{
|
||||
private static readonly Lazy<SQLiteHelper> _instance = new(() => new());
|
||||
public static SQLiteHelper Instance => _instance.Value;
|
||||
private readonly string _connstr;
|
||||
|
@ -87,4 +87,5 @@ public sealed class SQLiteHelper
|
|||
_dbAsync = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public static class StringEx
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public static class StringEx
|
||||
{
|
||||
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
|
||||
{
|
||||
return string.IsNullOrEmpty(value) || string.IsNullOrWhiteSpace(value);
|
||||
|
@ -79,4 +79,5 @@ public static class StringEx
|
|||
{
|
||||
return int.TryParse(value, out var result) ? result : defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@ using System.Text;
|
|||
using CliWrap;
|
||||
using CliWrap.Buffered;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class Utils
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class Utils
|
||||
{
|
||||
private static readonly string _tag = "Utils";
|
||||
|
||||
#region 转换函数
|
||||
|
@ -862,4 +862,5 @@ public class Utils
|
|||
}
|
||||
|
||||
#endregion Platform
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ using System.Security.Cryptography;
|
|||
using System.Text;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
internal static class WindowsUtils
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
internal static class WindowsUtils
|
||||
{
|
||||
private static readonly string _tag = "WindowsUtils";
|
||||
|
||||
public static string? RegReadValue(string path, string name, string def)
|
||||
|
@ -70,4 +70,5 @@ internal static class WindowsUtils
|
|||
Logging.SaveLog(_tag, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ using YamlDotNet.Core;
|
|||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
|
||||
namespace ServiceLib.Common;
|
||||
|
||||
public class YamlUtils
|
||||
namespace ServiceLib.Common
|
||||
{
|
||||
public class YamlUtils
|
||||
{
|
||||
private static readonly string _tag = "YamlUtils";
|
||||
|
||||
#region YAML
|
||||
|
@ -76,4 +76,5 @@ public class YamlUtils
|
|||
}
|
||||
|
||||
#endregion YAML
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EConfigType
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EConfigType
|
||||
{
|
||||
VMess = 1,
|
||||
Custom = 2,
|
||||
Shadowsocks = 3,
|
||||
|
@ -12,4 +12,5 @@ public enum EConfigType
|
|||
TUIC = 8,
|
||||
WireGuard = 9,
|
||||
HTTP = 10
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum ECoreType
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum ECoreType
|
||||
{
|
||||
v2fly = 1,
|
||||
Xray = 2,
|
||||
v2fly_v5 = 4,
|
||||
|
@ -15,4 +15,5 @@ public enum ECoreType
|
|||
brook = 27,
|
||||
overtls = 28,
|
||||
v2rayN = 99
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EGirdOrientation
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EGirdOrientation
|
||||
{
|
||||
Horizontal,
|
||||
Vertical,
|
||||
Tab,
|
||||
}
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EGlobalHotkey
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EGlobalHotkey
|
||||
{
|
||||
ShowForm = 0,
|
||||
SystemProxyClear = 1,
|
||||
SystemProxySet = 2,
|
||||
SystemProxyUnchanged = 3,
|
||||
SystemProxyPac = 4,
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EInboundProtocol
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EInboundProtocol
|
||||
{
|
||||
socks = 0,
|
||||
socks2,
|
||||
socks3,
|
||||
|
@ -10,4 +10,5 @@ public enum EInboundProtocol
|
|||
api2,
|
||||
mixed,
|
||||
speedtest = 21
|
||||
}
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EMove
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EMove
|
||||
{
|
||||
Top = 1,
|
||||
Up = 2,
|
||||
Down = 3,
|
||||
Bottom = 4,
|
||||
Position = 5
|
||||
}
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EMsgCommand
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EMsgCommand
|
||||
{
|
||||
ClearMsg,
|
||||
SendMsgView,
|
||||
SendSnackMsg,
|
||||
RefreshProfiles,
|
||||
AppExit
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EMultipleLoad
|
||||
{
|
||||
Random,
|
||||
RoundRobin,
|
||||
LeastPing,
|
||||
LeastLoad
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EPresetType
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EPresetType
|
||||
{
|
||||
Default = 0,
|
||||
Russia = 1,
|
||||
Iran = 2,
|
||||
}
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum ERuleMode
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum ERuleMode
|
||||
{
|
||||
Rule = 0,
|
||||
Global = 1,
|
||||
Direct = 2,
|
||||
Unchanged = 3
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EServerColName
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EServerColName
|
||||
{
|
||||
Def = 0,
|
||||
ConfigType,
|
||||
Remarks,
|
||||
|
@ -17,4 +17,5 @@ public enum EServerColName
|
|||
TodayUp,
|
||||
TotalDown,
|
||||
TotalUp
|
||||
}
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum ESpeedActionType
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum ESpeedActionType
|
||||
{
|
||||
Tcping,
|
||||
Realping,
|
||||
Speedtest,
|
||||
Mixedtest
|
||||
}
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum ESysProxyType
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum ESysProxyType
|
||||
{
|
||||
ForcedClear = 0,
|
||||
ForcedChange = 1,
|
||||
Unchanged = 2,
|
||||
Pac = 3
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum ETheme
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum ETheme
|
||||
{
|
||||
FollowSystem,
|
||||
Dark,
|
||||
Light,
|
||||
|
@ -9,4 +9,5 @@ public enum ETheme
|
|||
Desert,
|
||||
Dusk,
|
||||
NightSky
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum ETransport
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum ETransport
|
||||
{
|
||||
tcp,
|
||||
kcp,
|
||||
ws,
|
||||
|
@ -11,4 +11,5 @@ public enum ETransport
|
|||
http,
|
||||
quic,
|
||||
grpc
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Enums;
|
||||
|
||||
public enum EViewAction
|
||||
namespace ServiceLib.Enums
|
||||
{
|
||||
public enum EViewAction
|
||||
{
|
||||
CloseWindow,
|
||||
ShowYesNo,
|
||||
SaveFileDialog,
|
||||
|
@ -42,4 +42,5 @@ public enum EViewAction
|
|||
DispatcherCheckUpdate,
|
||||
DispatcherCheckUpdateFinished,
|
||||
DispatcherShowMsg,
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib;
|
||||
|
||||
public class Global
|
||||
namespace ServiceLib
|
||||
{
|
||||
public class Global
|
||||
{
|
||||
#region const
|
||||
|
||||
public const string AppName = "v2rayN";
|
||||
|
@ -520,4 +520,5 @@ public class Global
|
|||
];
|
||||
|
||||
#endregion const
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler;
|
||||
|
||||
public sealed class AppHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public sealed class AppHandler
|
||||
{
|
||||
#region Property
|
||||
|
||||
private static readonly Lazy<AppHandler> _instance = new(() => new());
|
||||
|
@ -80,10 +80,6 @@ public sealed class AppHandler
|
|||
Logging.SaveLog($"v2rayN start up | {Utils.GetRuntimeInfo()}");
|
||||
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
|
||||
|
||||
//First determine the port value
|
||||
_ = StatePort;
|
||||
_ = StatePort2;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -244,4 +240,5 @@ public sealed class AppHandler
|
|||
}
|
||||
|
||||
#endregion Core Type
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Security.Principal;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
public static class AutoStartupHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public static class AutoStartupHandler
|
||||
{
|
||||
private static readonly string _tag = "AutoStartupHandler";
|
||||
|
||||
public static async Task<bool> UpdateTask(Config config)
|
||||
|
@ -238,4 +238,5 @@ public static class AutoStartupHandler
|
|||
}
|
||||
|
||||
#endregion macOS
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using static ServiceLib.Models.ClashProxies;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
public sealed class ClashApiHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public sealed class ClashApiHandler
|
||||
{
|
||||
private static readonly Lazy<ClashApiHandler> instance = new(() => new());
|
||||
public static ClashApiHandler Instance => instance.Value;
|
||||
|
||||
|
@ -184,4 +184,5 @@ public sealed class ClashApiHandler
|
|||
{
|
||||
return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
using System.Data;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
/// <summary>
|
||||
/// 本软件配置文件处理类
|
||||
/// </summary>
|
||||
public class ConfigHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
/// <summary>
|
||||
/// 本软件配置文件处理类
|
||||
/// </summary>
|
||||
public class ConfigHandler
|
||||
{
|
||||
private static readonly string _configRes = Global.ConfigFileName;
|
||||
private static readonly string _tag = "ConfigHandler";
|
||||
|
||||
|
@ -1005,12 +1005,12 @@ public class ConfigHandler
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static async Task<RetResult> AddCustomServer4Multiple(Config config, List<ProfileItem> selecteds, ECoreType coreType, EMultipleLoad multipleLoad)
|
||||
public static async Task<RetResult> AddCustomServer4Multiple(Config config, List<ProfileItem> selecteds, ECoreType coreType)
|
||||
{
|
||||
var indexId = Utils.GetMd5(Global.CoreMultipleLoadConfigFileName);
|
||||
var configPath = Utils.GetConfigPath(Global.CoreMultipleLoadConfigFileName);
|
||||
|
||||
var result = await CoreConfigHandler.GenerateClientMultipleLoadConfig(config, configPath, selecteds, coreType, multipleLoad);
|
||||
var result = await CoreConfigHandler.GenerateClientMultipleLoadConfig(config, configPath, selecteds, coreType);
|
||||
if (result.Success != true)
|
||||
{
|
||||
return result;
|
||||
|
@ -1023,14 +1023,7 @@ public class ConfigHandler
|
|||
|
||||
var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new();
|
||||
profileItem.IndexId = indexId;
|
||||
profileItem.Remarks = multipleLoad switch
|
||||
{
|
||||
EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom,
|
||||
EMultipleLoad.RoundRobin => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
|
||||
EMultipleLoad.LeastPing => ResUI.menuSetDefaultMultipleServerXrayLeastPing,
|
||||
EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad,
|
||||
_ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
|
||||
};
|
||||
profileItem.Remarks = coreType == ECoreType.sing_box ? ResUI.menuSetDefaultMultipleServer : ResUI.menuSetDefaultLoadBalanceServer;
|
||||
profileItem.Address = Global.CoreMultipleLoadConfigFileName;
|
||||
profileItem.ConfigType = EConfigType.Custom;
|
||||
profileItem.CoreType = coreType;
|
||||
|
@ -1922,4 +1915,5 @@ public class ConfigHandler
|
|||
}
|
||||
|
||||
#endregion Regional Presets
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
namespace ServiceLib.Handler;
|
||||
|
||||
/// <summary>
|
||||
/// Core configuration file processing class
|
||||
/// </summary>
|
||||
public class CoreConfigHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
/// <summary>
|
||||
/// Core configuration file processing class
|
||||
/// </summary>
|
||||
public class CoreConfigHandler
|
||||
{
|
||||
private static readonly string _tag = "CoreConfigHandler";
|
||||
|
||||
public static async Task<RetResult> GenerateClientConfig(ProfileItem node, string? fileName)
|
||||
|
@ -133,16 +133,16 @@ public class CoreConfigHandler
|
|||
return result;
|
||||
}
|
||||
|
||||
public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType, EMultipleLoad multipleLoad)
|
||||
public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType)
|
||||
{
|
||||
var result = new RetResult();
|
||||
if (coreType == ECoreType.sing_box)
|
||||
{
|
||||
result = await new CoreConfigSingboxService(config).GenerateClientMultipleLoadConfig(selecteds);
|
||||
}
|
||||
else
|
||||
else if (coreType == ECoreType.Xray)
|
||||
{
|
||||
result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds, multipleLoad);
|
||||
result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds);
|
||||
}
|
||||
|
||||
if (result.Success != true)
|
||||
|
@ -152,4 +152,5 @@ public class CoreConfigHandler
|
|||
await File.WriteAllTextAsync(fileName, result.Data.ToString());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
/// <summary>
|
||||
/// Core process processing class
|
||||
/// </summary>
|
||||
public class CoreHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
/// <summary>
|
||||
/// Core process processing class
|
||||
/// </summary>
|
||||
public class CoreHandler
|
||||
{
|
||||
private static readonly Lazy<CoreHandler> _instance = new(() => new());
|
||||
public static CoreHandler Instance => _instance.Value;
|
||||
private Config _config;
|
||||
|
@ -406,4 +406,5 @@ public class CoreHandler
|
|||
}
|
||||
|
||||
#endregion Linux
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler;
|
||||
|
||||
public sealed class CoreInfoHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public sealed class CoreInfoHandler
|
||||
{
|
||||
private static readonly Lazy<CoreInfoHandler> _instance = new(() => new());
|
||||
private List<CoreInfo>? _coreInfo;
|
||||
public static CoreInfoHandler Instance => _instance.Value;
|
||||
|
@ -214,4 +214,5 @@ public sealed class CoreInfoHandler
|
|||
{
|
||||
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using System.Collections.Specialized;
|
||||
|
||||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class BaseFmt
|
||||
{
|
||||
protected static string GetIpv6(string address)
|
||||
{
|
||||
if (Utils.IsIpv6(address))
|
||||
|
@ -238,4 +238,5 @@ public class BaseFmt
|
|||
var url = $"{Utils.UrlEncode(userInfo)}@{GetIpv6(address)}:{port}";
|
||||
return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class ClashFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class ClashFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
|
||||
{
|
||||
if (Contains(strData, "port", "socks-port", "proxies"))
|
||||
|
@ -19,4 +19,5 @@ public class ClashFmt : BaseFmt
|
|||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class FmtHandler
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class FmtHandler
|
||||
{
|
||||
private static readonly string _tag = "FmtHandler";
|
||||
|
||||
public static string? GetShareUri(ProfileItem item)
|
||||
|
@ -88,4 +88,5 @@ public class FmtHandler
|
|||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class Hysteria2Fmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class Hysteria2Fmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -98,4 +98,5 @@ public class Hysteria2Fmt : BaseFmt
|
|||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class NaiveproxyFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class NaiveproxyFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
|
||||
{
|
||||
if (Contains(strData, "listen", "proxy", "<html>", "<body>"))
|
||||
|
@ -19,4 +19,5 @@ public class NaiveproxyFmt : BaseFmt
|
|||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class ShadowsocksFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class ShadowsocksFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -176,4 +176,5 @@ public class ShadowsocksFmt : BaseFmt
|
|||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class SingboxFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class SingboxFmt : BaseFmt
|
||||
{
|
||||
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
|
||||
{
|
||||
var configObjects = JsonUtils.Deserialize<object[]>(strData);
|
||||
|
@ -44,4 +44,5 @@ public class SingboxFmt : BaseFmt
|
|||
|
||||
return profileItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class SocksFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class SocksFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -111,4 +111,5 @@ public class SocksFmt : BaseFmt
|
|||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class TrojanFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class TrojanFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -44,4 +44,5 @@ public class TrojanFmt : BaseFmt
|
|||
|
||||
return ToUri(EConfigType.Trojan, item.Address, item.Port, item.Id, dicQuery, remark);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class TuicFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class TuicFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -60,4 +60,5 @@ public class TuicFmt : BaseFmt
|
|||
|
||||
return ToUri(EConfigType.TUIC, item.Address, item.Port, $"{item.Id}:{item.Security}", dicQuery, remark);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class V2rayFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class V2rayFmt : BaseFmt
|
||||
{
|
||||
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
|
||||
{
|
||||
var configObjects = JsonUtils.Deserialize<object[]>(strData);
|
||||
|
@ -45,4 +45,5 @@ public class V2rayFmt : BaseFmt
|
|||
|
||||
return profileItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class VLESSFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class VLESSFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -56,4 +56,5 @@ public class VLESSFmt : BaseFmt
|
|||
|
||||
return ToUri(EConfigType.VLESS, item.Address, item.Port, item.Id, dicQuery, remark);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class VmessFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class VmessFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -122,4 +122,5 @@ public class VmessFmt : BaseFmt
|
|||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class WireguardFmt : BaseFmt
|
||||
namespace ServiceLib.Handler.Fmt
|
||||
{
|
||||
public class WireguardFmt : BaseFmt
|
||||
{
|
||||
public static ProfileItem? Resolve(string str, out string msg)
|
||||
{
|
||||
msg = ResUI.ConfigurationFormatIncorrect;
|
||||
|
@ -64,4 +64,5 @@ public class WireguardFmt : BaseFmt
|
|||
}
|
||||
return ToUri(EConfigType.WireGuard, item.Address, item.Port, item.Id, dicQuery, remark);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using ReactiveUI;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
public class NoticeHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public class NoticeHandler
|
||||
{
|
||||
private static readonly Lazy<NoticeHandler> _instance = new(() => new());
|
||||
public static NoticeHandler Instance => _instance.Value;
|
||||
|
||||
|
@ -40,4 +40,5 @@ public class NoticeHandler
|
|||
Enqueue(msg);
|
||||
SendMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
public class PacHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public class PacHandler
|
||||
{
|
||||
private static string _configPath;
|
||||
private static int _httpPort;
|
||||
private static int _pacPort;
|
||||
|
@ -111,4 +111,5 @@ public class PacHandler
|
|||
// ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ using System.Collections.Concurrent;
|
|||
|
||||
//using System.Reactive.Linq;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
public class ProfileExHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public class ProfileExHandler
|
||||
{
|
||||
private static readonly Lazy<ProfileExHandler> _instance = new(() => new());
|
||||
private ConcurrentBag<ProfileExItem> _lstProfileEx = [];
|
||||
private readonly Queue<string> _queIndexIds = new();
|
||||
|
@ -178,4 +178,5 @@ public class ProfileExHandler
|
|||
}
|
||||
return _lstProfileEx.Max(t => t == null ? 0 : t.Sort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler;
|
||||
|
||||
public class StatisticsHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public class StatisticsHandler
|
||||
{
|
||||
private static readonly Lazy<StatisticsHandler> instance = new(() => new());
|
||||
public static StatisticsHandler Instance => instance.Value;
|
||||
|
||||
|
@ -160,4 +160,5 @@ public class StatisticsHandler
|
|||
_serverStatItem.DateNow = ticks;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.SysProxy;
|
||||
|
||||
public class ProxySettingLinux
|
||||
namespace ServiceLib.Handler.SysProxy
|
||||
{
|
||||
public class ProxySettingLinux
|
||||
{
|
||||
private static readonly string _proxySetFileName = $"{Global.ProxySetLinuxShellFileName.Replace(Global.NamespaceSample, "")}.sh";
|
||||
|
||||
public static async Task SetProxy(string host, int port, string exceptions)
|
||||
|
@ -29,4 +29,5 @@ public class ProxySettingLinux
|
|||
|
||||
await Utils.GetCliWrapOutput(fileName, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.SysProxy;
|
||||
|
||||
public class ProxySettingOSX
|
||||
namespace ServiceLib.Handler.SysProxy
|
||||
{
|
||||
public class ProxySettingOSX
|
||||
{
|
||||
private static readonly string _proxySetFileName = $"{Global.ProxySetOSXShellFileName.Replace(Global.NamespaceSample, "")}.sh";
|
||||
|
||||
public static async Task SetProxy(string host, int port, string exceptions)
|
||||
|
@ -34,4 +34,5 @@ public class ProxySettingOSX
|
|||
|
||||
await Utils.GetCliWrapOutput(fileName, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using static ServiceLib.Handler.SysProxy.ProxySettingWindows.InternetConnectionOption;
|
||||
|
||||
namespace ServiceLib.Handler.SysProxy;
|
||||
|
||||
public class ProxySettingWindows
|
||||
namespace ServiceLib.Handler.SysProxy
|
||||
{
|
||||
public class ProxySettingWindows
|
||||
{
|
||||
private const string _regPath = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings";
|
||||
|
||||
private static bool SetProxyFallback(string? strProxy, string? exceptions, int type)
|
||||
|
@ -356,4 +356,5 @@ public class ProxySettingWindows
|
|||
ref int lpcEntries // Number of entries written to the buffer
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler.SysProxy;
|
||||
|
||||
public static class SysProxyHandler
|
||||
namespace ServiceLib.Handler.SysProxy
|
||||
{
|
||||
public static class SysProxyHandler
|
||||
{
|
||||
private static readonly string _tag = "SysProxyHandler";
|
||||
|
||||
public static async Task<bool> UpdateSysProxy(Config config, bool forceDisable)
|
||||
|
@ -95,4 +95,5 @@ public static class SysProxyHandler
|
|||
var strProxy = $"{Global.HttpProtocol}{Global.Loopback}:{portPac}/pac?t={DateTime.Now.Ticks}";
|
||||
ProxySettingWindows.SetProxy(strProxy, "", 4);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Handler;
|
||||
|
||||
public class TaskHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public class TaskHandler
|
||||
{
|
||||
private static readonly Lazy<TaskHandler> _instance = new(() => new());
|
||||
public static TaskHandler Instance => _instance.Value;
|
||||
|
||||
|
@ -94,4 +94,5 @@ public class TaskHandler
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Net;
|
||||
using WebDav;
|
||||
|
||||
namespace ServiceLib.Handler;
|
||||
|
||||
public sealed class WebDavHandler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public sealed class WebDavHandler
|
||||
{
|
||||
private static readonly Lazy<WebDavHandler> _instance = new(() => new());
|
||||
public static WebDavHandler Instance => _instance.Value;
|
||||
|
||||
|
@ -178,4 +178,5 @@ public sealed class WebDavHandler
|
|||
}
|
||||
|
||||
public string GetLastError() => _lastDescription ?? string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class CheckUpdateModel
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class CheckUpdateModel
|
||||
{
|
||||
public bool? IsSelected { get; set; }
|
||||
public string? CoreType { get; set; }
|
||||
public string? Remarks { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public bool? IsFinished { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class ClashConnectionModel
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class ClashConnectionModel
|
||||
{
|
||||
public string? Id { get; set; }
|
||||
public string? Network { get; set; }
|
||||
public string? Type { get; set; }
|
||||
|
@ -13,4 +13,5 @@ public class ClashConnectionModel
|
|||
public double Time { get; set; }
|
||||
public string? Elapsed { get; set; }
|
||||
public string? Chain { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class ClashConnections
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class ClashConnections
|
||||
{
|
||||
public ulong downloadTotal { get; set; }
|
||||
public ulong uploadTotal { get; set; }
|
||||
public List<ConnectionItem>? connections { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class ConnectionItem
|
||||
{
|
||||
public class ConnectionItem
|
||||
{
|
||||
public string? id { get; set; }
|
||||
public MetadataItem? metadata { get; set; }
|
||||
public ulong upload { get; set; }
|
||||
|
@ -17,10 +17,10 @@ public class ConnectionItem
|
|||
public List<string>? chains { get; set; }
|
||||
public string? rule { get; set; }
|
||||
public string? rulePayload { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class MetadataItem
|
||||
{
|
||||
public class MetadataItem
|
||||
{
|
||||
public string? network { get; set; }
|
||||
public string? type { get; set; }
|
||||
public string? sourceIP { get; set; }
|
||||
|
@ -33,4 +33,5 @@ public class MetadataItem
|
|||
public string? process { get; set; }
|
||||
public string? processPath { get; set; }
|
||||
public string? remoteDestination { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
using static ServiceLib.Models.ClashProxies;
|
||||
using static ServiceLib.Models.ClashProxies;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
public class ClashProviders
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class ClashProviders
|
||||
{
|
||||
public Dictionary<string, ProvidersItem>? providers { get; set; }
|
||||
|
||||
public class ProvidersItem
|
||||
|
@ -13,4 +13,5 @@ public class ClashProviders
|
|||
public string? type { get; set; }
|
||||
public string? vehicleType { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class ClashProxies
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class ClashProxies
|
||||
{
|
||||
public Dictionary<string, ProxiesItem>? proxies { get; set; }
|
||||
|
||||
public class ProxiesItem
|
||||
|
@ -20,4 +20,5 @@ public class ClashProxies
|
|||
public string? time { get; set; }
|
||||
public int delay { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ClashProxyModel
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ClashProxyModel
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? Type { get; set; }
|
||||
|
@ -14,4 +14,5 @@ public class ClashProxyModel
|
|||
public string? DelayName { get; set; }
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class CmdItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class CmdItem
|
||||
{
|
||||
public string? Cmd { get; set; }
|
||||
public List<string>? Arguments { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class ComboItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class ComboItem
|
||||
{
|
||||
public string? ID
|
||||
{
|
||||
get; set;
|
||||
|
@ -11,4 +11,5 @@ public class ComboItem
|
|||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 本软件配置文件实体类
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Config
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 本软件配置文件实体类
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Config
|
||||
{
|
||||
#region property
|
||||
|
||||
public string IndexId { get; set; }
|
||||
|
@ -53,4 +53,5 @@ public class Config
|
|||
public List<CoreTypeItem> CoreTypeItem { get; set; }
|
||||
|
||||
#endregion other entities
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class CoreBasicItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class CoreBasicItem
|
||||
{
|
||||
public bool LogEnabled { get; set; }
|
||||
|
||||
public string Loglevel { get; set; }
|
||||
|
@ -18,11 +18,11 @@ public class CoreBasicItem
|
|||
public bool EnableFragment { get; set; }
|
||||
|
||||
public bool EnableCacheFile4Sbox { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class InItem
|
||||
{
|
||||
[Serializable]
|
||||
public class InItem
|
||||
{
|
||||
public int LocalPort { get; set; }
|
||||
public string Protocol { get; set; }
|
||||
public bool UdpEnabled { get; set; }
|
||||
|
@ -34,11 +34,11 @@ public class InItem
|
|||
public string User { get; set; }
|
||||
public string Pass { get; set; }
|
||||
public bool SecondLocalPortEnabled { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class KcpItem
|
||||
{
|
||||
[Serializable]
|
||||
public class KcpItem
|
||||
{
|
||||
public int Mtu { get; set; }
|
||||
|
||||
public int Tti { get; set; }
|
||||
|
@ -52,20 +52,20 @@ public class KcpItem
|
|||
public int ReadBufferSize { get; set; }
|
||||
|
||||
public int WriteBufferSize { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GrpcItem
|
||||
{
|
||||
[Serializable]
|
||||
public class GrpcItem
|
||||
{
|
||||
public int? IdleTimeout { get; set; }
|
||||
public int? HealthCheckTimeout { get; set; }
|
||||
public bool? PermitWithoutStream { get; set; }
|
||||
public int? InitialWindowsSize { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GUIItem
|
||||
{
|
||||
[Serializable]
|
||||
public class GUIItem
|
||||
{
|
||||
public bool AutoRun { get; set; }
|
||||
public bool EnableStatistics { get; set; }
|
||||
public bool DisplayRealTimeSpeed { get; set; }
|
||||
|
@ -75,18 +75,18 @@ public class GUIItem
|
|||
public int TrayMenuServersLimit { get; set; } = 20;
|
||||
public bool EnableHWA { get; set; } = false;
|
||||
public bool EnableLog { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class MsgUIItem
|
||||
{
|
||||
[Serializable]
|
||||
public class MsgUIItem
|
||||
{
|
||||
public string? MainMsgFilter { get; set; }
|
||||
public bool? AutoRefresh { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class UIItem
|
||||
{
|
||||
[Serializable]
|
||||
public class UIItem
|
||||
{
|
||||
public bool EnableAutoAdjustMainLvColWidth { get; set; }
|
||||
public bool EnableUpdateSubOnlyRemarksExist { get; set; }
|
||||
public double MainWidth { get; set; }
|
||||
|
@ -105,20 +105,20 @@ public class UIItem
|
|||
public bool Hide2TrayWhenClose { get; set; }
|
||||
public List<ColumnItem> MainColumnItem { get; set; }
|
||||
public bool ShowInTaskbar { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ConstItem
|
||||
{
|
||||
[Serializable]
|
||||
public class ConstItem
|
||||
{
|
||||
public string? SubConvertUrl { get; set; }
|
||||
public string? GeoSourceUrl { get; set; }
|
||||
public string? SrsSourceUrl { get; set; }
|
||||
public string? RouteRulesTemplateSourceUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class KeyEventItem
|
||||
{
|
||||
[Serializable]
|
||||
public class KeyEventItem
|
||||
{
|
||||
public EGlobalHotkey EGlobalHotkey { get; set; }
|
||||
|
||||
public bool Alt { get; set; }
|
||||
|
@ -128,19 +128,19 @@ public class KeyEventItem
|
|||
public bool Shift { get; set; }
|
||||
|
||||
public int? KeyCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CoreTypeItem
|
||||
{
|
||||
[Serializable]
|
||||
public class CoreTypeItem
|
||||
{
|
||||
public EConfigType ConfigType { get; set; }
|
||||
|
||||
public ECoreType CoreType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class TunModeItem
|
||||
{
|
||||
[Serializable]
|
||||
public class TunModeItem
|
||||
{
|
||||
public bool EnableTun { get; set; }
|
||||
public bool StrictRoute { get; set; } = true;
|
||||
public string Stack { get; set; }
|
||||
|
@ -148,61 +148,61 @@ public class TunModeItem
|
|||
public bool EnableExInbound { get; set; }
|
||||
public bool EnableIPv6Address { get; set; }
|
||||
public string? LinuxSudoPwd { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SpeedTestItem
|
||||
{
|
||||
[Serializable]
|
||||
public class SpeedTestItem
|
||||
{
|
||||
public int SpeedTestTimeout { get; set; }
|
||||
public string SpeedTestUrl { get; set; }
|
||||
public string SpeedPingTestUrl { get; set; }
|
||||
public int MixedConcurrencyCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class RoutingBasicItem
|
||||
{
|
||||
[Serializable]
|
||||
public class RoutingBasicItem
|
||||
{
|
||||
public string DomainStrategy { get; set; }
|
||||
public string DomainStrategy4Singbox { get; set; }
|
||||
public string DomainMatcher { get; set; }
|
||||
public string RoutingIndexId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ColumnItem
|
||||
{
|
||||
[Serializable]
|
||||
public class ColumnItem
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int Index { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Mux4RayItem
|
||||
{
|
||||
[Serializable]
|
||||
public class Mux4RayItem
|
||||
{
|
||||
public int? Concurrency { get; set; }
|
||||
public int? XudpConcurrency { get; set; }
|
||||
public string? XudpProxyUDP443 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Mux4SboxItem
|
||||
{
|
||||
[Serializable]
|
||||
public class Mux4SboxItem
|
||||
{
|
||||
public string Protocol { get; set; }
|
||||
public int MaxConnections { get; set; }
|
||||
public bool? Padding { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class HysteriaItem
|
||||
{
|
||||
[Serializable]
|
||||
public class HysteriaItem
|
||||
{
|
||||
public int UpMbps { get; set; }
|
||||
public int DownMbps { get; set; }
|
||||
public int HopInterval { get; set; } = 30;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ClashUIItem
|
||||
{
|
||||
[Serializable]
|
||||
public class ClashUIItem
|
||||
{
|
||||
public ERuleMode RuleMode { get; set; }
|
||||
public bool EnableIPv6 { get; set; }
|
||||
public bool EnableMixinContent { get; set; }
|
||||
|
@ -211,37 +211,38 @@ public class ClashUIItem
|
|||
public int ProxiesAutoDelayTestInterval { get; set; } = 10;
|
||||
public bool ConnectionsAutoRefresh { get; set; }
|
||||
public int ConnectionsRefreshInterval { get; set; } = 2;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SystemProxyItem
|
||||
{
|
||||
[Serializable]
|
||||
public class SystemProxyItem
|
||||
{
|
||||
public ESysProxyType SysProxyType { get; set; }
|
||||
public string SystemProxyExceptions { get; set; }
|
||||
public bool NotProxyLocalAddress { get; set; } = true;
|
||||
public string SystemProxyAdvancedProtocol { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WebDavItem
|
||||
{
|
||||
[Serializable]
|
||||
public class WebDavItem
|
||||
{
|
||||
public string? Url { get; set; }
|
||||
public string? UserName { get; set; }
|
||||
public string? Password { get; set; }
|
||||
public string? DirName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CheckUpdateItem
|
||||
{
|
||||
[Serializable]
|
||||
public class CheckUpdateItem
|
||||
{
|
||||
public bool CheckPreReleaseUpdate { get; set; }
|
||||
public List<string>? SelectedCoreTypes { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Fragment4RayItem
|
||||
{
|
||||
[Serializable]
|
||||
public class Fragment4RayItem
|
||||
{
|
||||
public string? Packets { get; set; }
|
||||
public string? Length { get; set; }
|
||||
public string? Interval { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class CoreInfo
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class CoreInfo
|
||||
{
|
||||
public ECoreType CoreType { get; set; }
|
||||
public List<string>? CoreExes { get; set; }
|
||||
public string? Arguments { get; set; }
|
||||
|
@ -17,4 +17,5 @@ public class CoreInfo
|
|||
public string? Match { get; set; }
|
||||
public string? VersionArg { get; set; }
|
||||
public bool AbsolutePath { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using SQLite;
|
||||
using SQLite;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class DNSItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class DNSItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string Id { get; set; }
|
||||
|
||||
|
@ -16,4 +16,5 @@ public class DNSItem
|
|||
public string? TunDNS { get; set; }
|
||||
public string? DomainStrategy4Freedom { get; set; }
|
||||
public string? DomainDNSAddress { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
public class GitHubReleaseAsset
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class GitHubReleaseAsset
|
||||
{
|
||||
[JsonPropertyName("url")] public string? Url { get; set; }
|
||||
|
||||
[JsonPropertyName("id")] public int Id { get; set; }
|
||||
|
@ -27,10 +27,10 @@ public class GitHubReleaseAsset
|
|||
[JsonPropertyName("updated_at")] public DateTime UpdatedAt { 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("assets_url")] public string? AssetsUrl { get; set; }
|
||||
|
@ -64,4 +64,5 @@ public class GitHubRelease
|
|||
[JsonPropertyName("zipball_url")] public string? ZipballUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("body")] public string? Body { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
internal class IPAPIInfo
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
internal class IPAPIInfo
|
||||
{
|
||||
public string? ip { get; set; }
|
||||
public string? city { get; set; }
|
||||
public string? region { get; set; }
|
||||
|
@ -9,4 +9,5 @@ internal class IPAPIInfo
|
|||
public string? country { get; set; }
|
||||
public string? country_name { get; set; }
|
||||
public string? country_code { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using SQLite;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ProfileExItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ProfileExItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string IndexId { get; set; }
|
||||
|
||||
|
@ -12,4 +12,5 @@ public class ProfileExItem
|
|||
public decimal Speed { get; set; }
|
||||
public int Sort { get; set; }
|
||||
public string? Message { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using SQLite;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ProfileItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ProfileItem
|
||||
{
|
||||
public ProfileItem()
|
||||
{
|
||||
IndexId = string.Empty;
|
||||
|
@ -64,7 +64,6 @@ public class ProfileItem
|
|||
|
||||
[PrimaryKey]
|
||||
public string IndexId { get; set; }
|
||||
|
||||
public EConfigType ConfigType { get; set; }
|
||||
public int ConfigVersion { get; set; }
|
||||
public string Address { get; set; }
|
||||
|
@ -93,4 +92,5 @@ public class ProfileItem
|
|||
public string ShortId { get; set; }
|
||||
public string SpiderX { get; set; }
|
||||
public string Extra { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ProfileItemModel : ProfileItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ProfileItemModel : ProfileItem
|
||||
{
|
||||
public bool IsActive { get; set; }
|
||||
public string SubRemarks { get; set; }
|
||||
public int Delay { get; set; }
|
||||
|
@ -14,4 +14,5 @@ public class ProfileItemModel : ProfileItem
|
|||
public string TodayDown { get; set; }
|
||||
public string TotalUp { get; set; }
|
||||
public string TotalDown { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class RetResult
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class RetResult
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string? Msg { get; set; }
|
||||
public object? Data { get; set; }
|
||||
|
@ -23,4 +23,5 @@ public class RetResult
|
|||
Msg = msg;
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using SQLite;
|
||||
using SQLite;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class RoutingItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class RoutingItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string Id { get; set; }
|
||||
|
||||
|
@ -19,4 +19,5 @@ public class RoutingItem
|
|||
public string DomainStrategy { get; set; }
|
||||
public string DomainStrategy4Singbox { get; set; }
|
||||
public int Sort { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class RoutingItemModel : RoutingItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class RoutingItemModel : RoutingItem
|
||||
{
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class RoutingTemplate
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class RoutingTemplate
|
||||
{
|
||||
public string Version { get; set; }
|
||||
public RoutingItem[] RoutingItems { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class RulesItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class RulesItem
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string? Type { get; set; }
|
||||
public string? Port { get; set; }
|
||||
|
@ -15,4 +15,5 @@ public class RulesItem
|
|||
public List<string>? Process { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
public string? Remarks { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class RulesItemModel : RulesItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class RulesItemModel : RulesItem
|
||||
{
|
||||
public string InboundTags { get; set; }
|
||||
public string Ips { get; set; }
|
||||
public string Domains { get; set; }
|
||||
public string Protocols { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ServerSpeedItem : ServerStatItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ServerSpeedItem : ServerStatItem
|
||||
{
|
||||
public long ProxyUp { get; set; }
|
||||
|
||||
public long ProxyDown { get; set; }
|
||||
|
@ -10,12 +10,13 @@ public class ServerSpeedItem : ServerStatItem
|
|||
public long DirectUp { get; set; }
|
||||
|
||||
public long DirectDown { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class TrafficItem
|
||||
{
|
||||
[Serializable]
|
||||
public class TrafficItem
|
||||
{
|
||||
public ulong Up { get; set; }
|
||||
|
||||
public ulong Down { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using SQLite;
|
||||
using SQLite;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ServerStatItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ServerStatItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string IndexId { get; set; }
|
||||
|
||||
|
@ -17,4 +17,5 @@ public class ServerStatItem
|
|||
public long TodayDown { get; set; }
|
||||
|
||||
public long DateNow { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,12 +1,13 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ServerTestItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ServerTestItem
|
||||
{
|
||||
public string? IndexId { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public int Port { get; set; }
|
||||
public EConfigType ConfigType { get; set; }
|
||||
public bool AllowTest { get; set; }
|
||||
public int QueueNum { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class SingboxConfig
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class SingboxConfig
|
||||
{
|
||||
public Log4Sbox log { get; set; }
|
||||
public Dns4Sbox? dns { get; set; }
|
||||
public List<Inbound4Sbox> inbounds { get; set; }
|
||||
public List<Outbound4Sbox> outbounds { get; set; }
|
||||
public Route4Sbox route { get; set; }
|
||||
public Experimental4Sbox? experimental { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Log4Sbox
|
||||
{
|
||||
public class Log4Sbox
|
||||
{
|
||||
public bool? disabled { get; set; }
|
||||
public string level { get; set; }
|
||||
public string output { get; set; }
|
||||
public bool? timestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Dns4Sbox
|
||||
{
|
||||
public class Dns4Sbox
|
||||
{
|
||||
public List<Server4Sbox> servers { get; set; }
|
||||
public List<Rule4Sbox> rules { get; set; }
|
||||
public string? final { get; set; }
|
||||
|
@ -30,18 +30,18 @@ public class Dns4Sbox
|
|||
public bool? reverse_mapping { get; set; }
|
||||
public string? client_subnet { get; set; }
|
||||
public Fakeip4Sbox? fakeip { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Route4Sbox
|
||||
{
|
||||
public class Route4Sbox
|
||||
{
|
||||
public bool? auto_detect_interface { get; set; }
|
||||
public List<Rule4Sbox> rules { get; set; }
|
||||
public List<Ruleset4Sbox>? rule_set { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Rule4Sbox
|
||||
{
|
||||
[Serializable]
|
||||
public class Rule4Sbox
|
||||
{
|
||||
public string? outbound { get; set; }
|
||||
public string? server { get; set; }
|
||||
public bool? disable_cache { get; set; }
|
||||
|
@ -67,11 +67,11 @@ public class Rule4Sbox
|
|||
public List<string>? process_name { get; set; }
|
||||
public List<string>? rule_set { get; set; }
|
||||
public List<Rule4Sbox>? rules { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Inbound4Sbox
|
||||
{
|
||||
[Serializable]
|
||||
public class Inbound4Sbox
|
||||
{
|
||||
public string type { get; set; }
|
||||
public string tag { get; set; }
|
||||
public string listen { get; set; }
|
||||
|
@ -87,16 +87,16 @@ public class Inbound4Sbox
|
|||
public bool? sniff { get; set; }
|
||||
public bool? sniff_override_destination { get; set; }
|
||||
public List<User4Sbox> users { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class User4Sbox
|
||||
{
|
||||
public class User4Sbox
|
||||
{
|
||||
public string username { get; set; }
|
||||
public string password { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Outbound4Sbox
|
||||
{
|
||||
public class Outbound4Sbox
|
||||
{
|
||||
public string type { get; set; }
|
||||
public string tag { get; set; }
|
||||
public string? server { get; set; }
|
||||
|
@ -134,41 +134,41 @@ public class Outbound4Sbox
|
|||
public HyObfs4Sbox? obfs { get; set; }
|
||||
public List<string>? outbounds { get; set; }
|
||||
public bool? interrupt_exist_connections { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Tls4Sbox
|
||||
{
|
||||
public class Tls4Sbox
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public string? server_name { get; set; }
|
||||
public bool? insecure { get; set; }
|
||||
public List<string>? alpn { get; set; }
|
||||
public Utls4Sbox? utls { get; set; }
|
||||
public Reality4Sbox? reality { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Multiplex4Sbox
|
||||
{
|
||||
public class Multiplex4Sbox
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public string protocol { get; set; }
|
||||
public int max_connections { get; set; }
|
||||
public bool? padding { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Utls4Sbox
|
||||
{
|
||||
public class Utls4Sbox
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public string fingerprint { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Reality4Sbox
|
||||
{
|
||||
public class Reality4Sbox
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public string public_key { get; set; }
|
||||
public string short_id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Transport4Sbox
|
||||
{
|
||||
public class Transport4Sbox
|
||||
{
|
||||
public string? type { get; set; }
|
||||
public object? host { get; set; }
|
||||
public string? path { get; set; }
|
||||
|
@ -178,21 +178,21 @@ public class Transport4Sbox
|
|||
public string? idle_timeout { get; set; }
|
||||
public string? ping_timeout { get; set; }
|
||||
public bool? permit_without_stream { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Headers4Sbox
|
||||
{
|
||||
public class Headers4Sbox
|
||||
{
|
||||
public string? Host { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class HyObfs4Sbox
|
||||
{
|
||||
public class HyObfs4Sbox
|
||||
{
|
||||
public string? type { get; set; }
|
||||
public string? password { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Server4Sbox
|
||||
{
|
||||
public class Server4Sbox
|
||||
{
|
||||
public string? tag { get; set; }
|
||||
public string? address { get; set; }
|
||||
public string? address_resolver { get; set; }
|
||||
|
@ -200,52 +200,52 @@ public class Server4Sbox
|
|||
public string? strategy { get; set; }
|
||||
public string? detour { get; set; }
|
||||
public string? client_subnet { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Experimental4Sbox
|
||||
{
|
||||
public class Experimental4Sbox
|
||||
{
|
||||
public CacheFile4Sbox? cache_file { get; set; }
|
||||
public V2ray_Api4Sbox? v2ray_api { get; set; }
|
||||
public Clash_Api4Sbox? clash_api { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class V2ray_Api4Sbox
|
||||
{
|
||||
public class V2ray_Api4Sbox
|
||||
{
|
||||
public string listen { get; set; }
|
||||
public Stats4Sbox stats { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Clash_Api4Sbox
|
||||
{
|
||||
public class Clash_Api4Sbox
|
||||
{
|
||||
public string? external_controller { get; set; }
|
||||
public bool? store_selected { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Stats4Sbox
|
||||
{
|
||||
public class Stats4Sbox
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public List<string>? inbounds { get; set; }
|
||||
public List<string>? outbounds { get; set; }
|
||||
public List<string>? users { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Fakeip4Sbox
|
||||
{
|
||||
public class Fakeip4Sbox
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public string inet4_range { get; set; }
|
||||
public string inet6_range { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class CacheFile4Sbox
|
||||
{
|
||||
public class CacheFile4Sbox
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public string? path { get; set; }
|
||||
public string? cache_id { get; set; }
|
||||
public bool? store_fakeip { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Ruleset4Sbox
|
||||
{
|
||||
public class Ruleset4Sbox
|
||||
{
|
||||
public string? tag { get; set; }
|
||||
public string? type { get; set; }
|
||||
public string? format { get; set; }
|
||||
|
@ -253,4 +253,5 @@ public class Ruleset4Sbox
|
|||
public string? url { get; set; }
|
||||
public string? download_detour { get; set; }
|
||||
public string? update_interval { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class SpeedTestResult
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class SpeedTestResult
|
||||
{
|
||||
public string? IndexId { get; set; }
|
||||
|
||||
public string? Delay { get; set; }
|
||||
|
||||
public string? Speed { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,17 +1,18 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class SsSIP008
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class SsSIP008
|
||||
{
|
||||
public List<SsServer>? servers { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SsServer
|
||||
{
|
||||
[Serializable]
|
||||
public class SsServer
|
||||
{
|
||||
public string? remarks { get; set; }
|
||||
public string? server { get; set; }
|
||||
public string? server_port { get; set; }
|
||||
public string? method { get; set; }
|
||||
public string? password { get; set; }
|
||||
public string? plugin { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using SQLite;
|
||||
using SQLite;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class SubItem
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class SubItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string Id { get; set; }
|
||||
|
||||
|
@ -35,4 +35,5 @@ public class SubItem
|
|||
public int? PreSocksPort { get; set; }
|
||||
|
||||
public string? Memo { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
public class V2rayConfig
|
||||
namespace ServiceLib.Models
|
||||
{
|
||||
public class V2rayConfig
|
||||
{
|
||||
public Log4Ray log { get; set; }
|
||||
public object dns { get; set; }
|
||||
public List<Inbounds4Ray> inbounds { get; set; }
|
||||
|
@ -12,41 +12,39 @@ public class V2rayConfig
|
|||
public Metrics4Ray? metrics { get; set; }
|
||||
public Policy4Ray? policy { get; set; }
|
||||
public Stats4Ray? stats { get; set; }
|
||||
public Observatory4Ray? observatory { get; set; }
|
||||
public BurstObservatory4Ray? burstObservatory { 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 class Policy4Ray
|
||||
{
|
||||
public class Policy4Ray
|
||||
{
|
||||
public SystemPolicy4Ray system { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class SystemPolicy4Ray
|
||||
{
|
||||
public class SystemPolicy4Ray
|
||||
{
|
||||
public bool statsOutboundUplink { get; set; }
|
||||
public bool statsOutboundDownlink { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Log4Ray
|
||||
{
|
||||
public class Log4Ray
|
||||
{
|
||||
public string? access { get; set; }
|
||||
|
||||
public string? error { get; set; }
|
||||
|
||||
public string? loglevel { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Inbounds4Ray
|
||||
{
|
||||
public class Inbounds4Ray
|
||||
{
|
||||
public string tag { get; set; }
|
||||
|
||||
public int port { get; set; }
|
||||
|
@ -58,10 +56,10 @@ public class Inbounds4Ray
|
|||
public Sniffing4Ray sniffing { get; set; }
|
||||
|
||||
public Inboundsettings4Ray settings { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Inboundsettings4Ray
|
||||
{
|
||||
public class Inboundsettings4Ray
|
||||
{
|
||||
public string? auth { get; set; }
|
||||
|
||||
public bool? udp { get; set; }
|
||||
|
@ -77,10 +75,10 @@ public class Inboundsettings4Ray
|
|||
public bool? allowTransparent { get; set; }
|
||||
|
||||
public List<AccountsItem4Ray>? accounts { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class UsersItem4Ray
|
||||
{
|
||||
public class UsersItem4Ray
|
||||
{
|
||||
public string? id { get; set; }
|
||||
|
||||
public int? alterId { get; set; }
|
||||
|
@ -92,17 +90,17 @@ public class UsersItem4Ray
|
|||
public string? encryption { get; set; }
|
||||
|
||||
public string? flow { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Sniffing4Ray
|
||||
{
|
||||
public class Sniffing4Ray
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public List<string>? destOverride { get; set; }
|
||||
public bool routeOnly { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Outbounds4Ray
|
||||
{
|
||||
public class Outbounds4Ray
|
||||
{
|
||||
public string tag { get; set; }
|
||||
|
||||
public string protocol { get; set; }
|
||||
|
@ -112,10 +110,10 @@ public class Outbounds4Ray
|
|||
public StreamSettings4Ray streamSettings { get; set; }
|
||||
|
||||
public Mux4Ray mux { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Outboundsettings4Ray
|
||||
{
|
||||
public class Outboundsettings4Ray
|
||||
{
|
||||
public List<VnextItem4Ray>? vnext { get; set; }
|
||||
|
||||
public List<ServersItem4Ray>? servers { get; set; }
|
||||
|
@ -127,19 +125,19 @@ public class Outboundsettings4Ray
|
|||
public int? userLevel { get; set; }
|
||||
|
||||
public FragmentItem4Ray? fragment { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class VnextItem4Ray
|
||||
{
|
||||
public class VnextItem4Ray
|
||||
{
|
||||
public string address { get; set; }
|
||||
|
||||
public int port { get; set; }
|
||||
|
||||
public List<UsersItem4Ray> users { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class ServersItem4Ray
|
||||
{
|
||||
public class ServersItem4Ray
|
||||
{
|
||||
public string email { get; set; }
|
||||
|
||||
public string address { get; set; }
|
||||
|
@ -157,43 +155,43 @@ public class ServersItem4Ray
|
|||
public string flow { get; set; }
|
||||
|
||||
public List<SocksUsersItem4Ray> users { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class SocksUsersItem4Ray
|
||||
{
|
||||
public class SocksUsersItem4Ray
|
||||
{
|
||||
public string user { get; set; }
|
||||
|
||||
public string pass { get; set; }
|
||||
|
||||
public int? level { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Mux4Ray
|
||||
{
|
||||
public class Mux4Ray
|
||||
{
|
||||
public bool enabled { get; set; }
|
||||
public int? concurrency { get; set; }
|
||||
public int? xudpConcurrency { get; set; }
|
||||
public string? xudpProxyUDP443 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Response4Ray
|
||||
{
|
||||
public class Response4Ray
|
||||
{
|
||||
public string type { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Dns4Ray
|
||||
{
|
||||
public class Dns4Ray
|
||||
{
|
||||
public List<string> servers { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class DnsServer4Ray
|
||||
{
|
||||
public class DnsServer4Ray
|
||||
{
|
||||
public string? address { get; set; }
|
||||
public List<string>? domains { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Routing4Ray
|
||||
{
|
||||
public class Routing4Ray
|
||||
{
|
||||
public string domainStrategy { get; set; }
|
||||
|
||||
public string? domainMatcher { get; set; }
|
||||
|
@ -201,11 +199,11 @@ public class Routing4Ray
|
|||
public List<RulesItem4Ray> rules { get; set; }
|
||||
|
||||
public List<BalancersItem4Ray>? balancers { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class RulesItem4Ray
|
||||
{
|
||||
[Serializable]
|
||||
public class RulesItem4Ray
|
||||
{
|
||||
public string? type { get; set; }
|
||||
|
||||
public string? port { get; set; }
|
||||
|
@ -222,62 +220,22 @@ public class RulesItem4Ray
|
|||
public List<string>? domain { get; set; }
|
||||
|
||||
public List<string>? protocol { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class BalancersItem4Ray
|
||||
{
|
||||
public class BalancersItem4Ray
|
||||
{
|
||||
public List<string>? selector { get; set; }
|
||||
public BalancersStrategy4Ray? strategy { get; set; }
|
||||
public string? tag { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class BalancersStrategy4Ray
|
||||
{
|
||||
public class BalancersStrategy4Ray
|
||||
{
|
||||
public string? type { get; set; }
|
||||
public BalancersStrategySettings4Ray? settings { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class BalancersStrategySettings4Ray
|
||||
{
|
||||
public int? expected { get; set; }
|
||||
public string? maxRTT { get; set; }
|
||||
public float? tolerance { get; set; }
|
||||
public List<string>? baselines { get; set; }
|
||||
public List<BalancersStrategySettingsCosts4Ray>? costs { get; set; }
|
||||
}
|
||||
|
||||
public class BalancersStrategySettingsCosts4Ray
|
||||
{
|
||||
public bool? regexp { get; set; }
|
||||
public string? match { get; set; }
|
||||
public float? value { get; set; }
|
||||
}
|
||||
|
||||
public class Observatory4Ray
|
||||
{
|
||||
public List<string>? subjectSelector { get; set; }
|
||||
public string? probeUrl { get; set; }
|
||||
public string? probeInterval { get; set; }
|
||||
public bool? enableConcurrency { get; set; }
|
||||
}
|
||||
|
||||
public class BurstObservatory4Ray
|
||||
{
|
||||
public List<string>? subjectSelector { get; set; }
|
||||
public BurstObservatoryPingConfig4Ray? pingConfig { get; set; }
|
||||
}
|
||||
|
||||
public class BurstObservatoryPingConfig4Ray
|
||||
{
|
||||
public string? destination { get; set; }
|
||||
public string? connectivity { get; set; }
|
||||
public string? interval { get; set; }
|
||||
public int? sampling { get; set; }
|
||||
public string? timeout { get; set; }
|
||||
}
|
||||
|
||||
public class StreamSettings4Ray
|
||||
{
|
||||
public class StreamSettings4Ray
|
||||
{
|
||||
public string network { get; set; }
|
||||
|
||||
public string security { get; set; }
|
||||
|
@ -303,10 +261,10 @@ public class StreamSettings4Ray
|
|||
public GrpcSettings4Ray? grpcSettings { get; set; }
|
||||
|
||||
public Sockopt4Ray? sockopt { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class TlsSettings4Ray
|
||||
{
|
||||
public class TlsSettings4Ray
|
||||
{
|
||||
public bool? allowInsecure { get; set; }
|
||||
|
||||
public string? serverName { get; set; }
|
||||
|
@ -319,15 +277,15 @@ public class TlsSettings4Ray
|
|||
public string? publicKey { get; set; }
|
||||
public string? shortId { get; set; }
|
||||
public string? spiderX { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class TcpSettings4Ray
|
||||
{
|
||||
public class TcpSettings4Ray
|
||||
{
|
||||
public Header4Ray header { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Header4Ray
|
||||
{
|
||||
public class Header4Ray
|
||||
{
|
||||
public string type { get; set; }
|
||||
|
||||
public object request { get; set; }
|
||||
|
@ -335,10 +293,10 @@ public class Header4Ray
|
|||
public object response { get; set; }
|
||||
|
||||
public string? domain { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class KcpSettings4Ray
|
||||
{
|
||||
public class KcpSettings4Ray
|
||||
{
|
||||
public int mtu { get; set; }
|
||||
|
||||
public int tti { get; set; }
|
||||
|
@ -356,57 +314,57 @@ public class KcpSettings4Ray
|
|||
public Header4Ray header { get; set; }
|
||||
|
||||
public string seed { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class WsSettings4Ray
|
||||
{
|
||||
public class WsSettings4Ray
|
||||
{
|
||||
public string? path { get; set; }
|
||||
public string? host { get; set; }
|
||||
|
||||
public Headers4Ray headers { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Headers4Ray
|
||||
{
|
||||
public class Headers4Ray
|
||||
{
|
||||
public string Host { get; set; }
|
||||
|
||||
[JsonPropertyName("User-Agent")]
|
||||
public string UserAgent { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class HttpupgradeSettings4Ray
|
||||
{
|
||||
public class HttpupgradeSettings4Ray
|
||||
{
|
||||
public string? path { get; set; }
|
||||
|
||||
public string? host { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class XhttpSettings4Ray
|
||||
{
|
||||
public class XhttpSettings4Ray
|
||||
{
|
||||
public string? path { get; set; }
|
||||
public string? host { get; set; }
|
||||
public string? mode { get; set; }
|
||||
public object? extra { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class HttpSettings4Ray
|
||||
{
|
||||
public class HttpSettings4Ray
|
||||
{
|
||||
public string? path { get; set; }
|
||||
|
||||
public List<string>? host { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class QuicSettings4Ray
|
||||
{
|
||||
public class QuicSettings4Ray
|
||||
{
|
||||
public string security { get; set; }
|
||||
|
||||
public string key { get; set; }
|
||||
|
||||
public Header4Ray header { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class GrpcSettings4Ray
|
||||
{
|
||||
public class GrpcSettings4Ray
|
||||
{
|
||||
public string? authority { get; set; }
|
||||
public string? serviceName { get; set; }
|
||||
public bool multiMode { get; set; }
|
||||
|
@ -414,23 +372,24 @@ public class GrpcSettings4Ray
|
|||
public int? health_check_timeout { get; set; }
|
||||
public bool? permit_without_stream { get; set; }
|
||||
public int? initial_windows_size { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class AccountsItem4Ray
|
||||
{
|
||||
public class AccountsItem4Ray
|
||||
{
|
||||
public string user { get; set; }
|
||||
|
||||
public string pass { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Sockopt4Ray
|
||||
{
|
||||
public class Sockopt4Ray
|
||||
{
|
||||
public string? dialerProxy { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class FragmentItem4Ray
|
||||
{
|
||||
public class FragmentItem4Ray
|
||||
{
|
||||
public string? packets { get; set; }
|
||||
public string? length { 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