Fix tun interface name in macos
Some checks are pending
release / build (Release) (push) Waiting to run

This commit is contained in:
2dust 2024-11-26 15:32:35 +08:00
parent a5d99b1eb5
commit 89ce7c23c9

View file

@ -548,6 +548,7 @@ namespace ServiceLib.Services.CoreConfig
}
var tunInbound = JsonUtils.Deserialize<Inbound4Sbox>(Utils.GetEmbedText(Global.TunSingboxInboundFileName)) ?? new Inbound4Sbox { };
tunInbound.interface_name = Utils.IsOSX()? $"utun{new Random().Next(99)}": "singbox_tun";
tunInbound.mtu = _config.TunModeItem.Mtu;
tunInbound.strict_route = _config.TunModeItem.StrictRoute;
tunInbound.stack = _config.TunModeItem.Stack;