Code clean

This commit is contained in:
2dust
2025-12-07 15:32:03 +08:00
parent 592f1260b5
commit 5bef02bd6d
3 changed files with 4 additions and 8 deletions

View File

@@ -12,8 +12,10 @@ public class ActionPrecheckManager(Config config)
// sing-box supported transports for different protocol types // sing-box supported transports for different protocol types
private static readonly HashSet<string> SingboxUnsupportedTransports = [nameof(ETransport.kcp), nameof(ETransport.xhttp)]; private static readonly HashSet<string> SingboxUnsupportedTransports = [nameof(ETransport.kcp), nameof(ETransport.xhttp)];
private static readonly HashSet<EConfigType> SingboxTransportSupportedProtocols = private static readonly HashSet<EConfigType> SingboxTransportSupportedProtocols =
[EConfigType.VMess, EConfigType.VLESS, EConfigType.Trojan, EConfigType.Shadowsocks]; [EConfigType.VMess, EConfigType.VLESS, EConfigType.Trojan, EConfigType.Shadowsocks];
private static readonly HashSet<string> SingboxShadowsocksAllowedTransports = private static readonly HashSet<string> SingboxShadowsocksAllowedTransports =
[nameof(ETransport.tcp), nameof(ETransport.ws), nameof(ETransport.quic)]; [nameof(ETransport.tcp), nameof(ETransport.ws), nameof(ETransport.quic)];

View File

@@ -365,7 +365,7 @@ public partial class CoreConfigSingboxService
case nameof(ETransport.ws): case nameof(ETransport.ws):
transport.type = nameof(ETransport.ws); transport.type = nameof(ETransport.ws);
var wsPath = node.Path; var wsPath = node.Path;
// Parse eh and ed parameters from path using regex // Parse eh and ed parameters from path using regex
if (!wsPath.IsNullOrEmpty()) if (!wsPath.IsNullOrEmpty())
{ {

View File

@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.IO;
using Avalonia;
using Avalonia.Media;
namespace v2rayN.Desktop.Common; namespace v2rayN.Desktop.Common;
public static class AppBuilderExtension public static class AppBuilderExtension
@@ -11,7 +5,7 @@ public static class AppBuilderExtension
public static AppBuilder WithFontByDefault(this AppBuilder appBuilder) public static AppBuilder WithFontByDefault(this AppBuilder appBuilder)
{ {
var fallbacks = new List<FontFallback>(); var fallbacks = new List<FontFallback>();
var notoSansSc = new FontFamily(Path.Combine(Global.AvaAssets, "Fonts#Noto Sans SC")); var notoSansSc = new FontFamily(Path.Combine(Global.AvaAssets, "Fonts#Noto Sans SC"));
fallbacks.Add(new FontFallback { FontFamily = notoSansSc }); fallbacks.Add(new FontFallback { FontFamily = notoSansSc });