From 63af5bae8a6fc83dee1404562bcea82ab6a3149c Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:41:38 +0800 Subject: [PATCH] Bug fix --- v2rayN/v2rayN/Handler/CoreConfigSingbox.cs | 4 ++++ v2rayN/v2rayN/Model/SingboxConfig.cs | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs index 2a364006..6feb2f55 100644 --- a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs +++ b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs @@ -426,6 +426,10 @@ namespace v2rayN.Handler transport.path = Utile.IsNullOrEmpty(node.path) ? null : node.path; } } + else + { + transport = null; + } break; diff --git a/v2rayN/v2rayN/Model/SingboxConfig.cs b/v2rayN/v2rayN/Model/SingboxConfig.cs index 2e61918f..a5911cc9 100644 --- a/v2rayN/v2rayN/Model/SingboxConfig.cs +++ b/v2rayN/v2rayN/Model/SingboxConfig.cs @@ -15,7 +15,7 @@ public bool? disabled { get; set; } public string level { get; set; } public string output { get; set; } - public bool timestamp { get; set; } + public bool? timestamp { get; set; } } public class Dns4Sbox @@ -120,10 +120,10 @@ public int? mtu { get; set; } public string? plugin { get; set; } public string? plugin_opts { get; set; } - public Tls4Sbox tls { get; set; } - public Multiplex4Sbox multiplex { get; set; } - public Transport4Sbox transport { get; set; } - public HyObfs4Sbox obfs { get; set; } + public Tls4Sbox? tls { get; set; } + public Multiplex4Sbox? multiplex { get; set; } + public Transport4Sbox? transport { get; set; } + public HyObfs4Sbox? obfs { get; set; } } public class Tls4Sbox