Improve code

This commit is contained in:
2dust
2024-12-01 11:17:36 +08:00
parent f36c06389d
commit 3b173f0b3e
17 changed files with 85 additions and 93 deletions

View File

@@ -456,9 +456,9 @@ namespace ServiceLib.ViewModels
sb.Append($"[{EInboundProtocol.http}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.http)}]");
InboundDisplay = $"{ResUI.LabLocal}:{sb}";
if (_config.Inbound[0].AllowLANConn)
if (_config.Inbound.First().AllowLANConn)
{
if (_config.Inbound[0].NewPort4LAN)
if (_config.Inbound.First().NewPort4LAN)
{
StringBuilder sb2 = new();
sb2.Append($"[{EInboundProtocol.socks}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks2)}]");