Revert mtu list

This commit is contained in:
DHR60 2026-04-15 20:55:57 +08:00
parent 74554fa32a
commit c37ad5f156
3 changed files with 3 additions and 5 deletions

View file

@ -78,7 +78,7 @@ public class Inboundsettings4Ray
public string? name { get; set; }
public List<int>? MTU { get; set; }
public int? MTU { get; set; }
public List<string>? gateway { get; set; }

View file

@ -3,9 +3,7 @@
"protocol": "tun",
"settings": {
"name": "xray_tun",
"MTU": [
9000
],
"MTU": 9000,
"gateway": [
"172.18.0.1/30",
"fdfe:dcba:9876::1/126"

View file

@ -55,7 +55,7 @@ public partial class CoreConfigV2rayService
}
var tunInbound = JsonUtils.Deserialize<Inbounds4Ray>(EmbedUtils.GetEmbedText(Global.V2raySampleTunInbound)) ?? new Inbounds4Ray { };
tunInbound.settings.name = Utils.IsMacOS() ? $"utun{new Random().Next(99)}" : "xray_tun";
tunInbound.settings.MTU = [_config.TunModeItem.Mtu];
tunInbound.settings.MTU = _config.TunModeItem.Mtu;
if (_config.TunModeItem.EnableIPv6Address == false)
{
tunInbound.settings.gateway = ["172.18.0.1/30"];