mirror of https://github.com/2dust/v2rayN
Optimize port display
parent
8f532f8468
commit
776d37b7aa
|
@ -451,21 +451,20 @@ namespace ServiceLib.ViewModels
|
||||||
public async Task InboundDisplayStatus()
|
public async Task InboundDisplayStatus()
|
||||||
{
|
{
|
||||||
StringBuilder sb = new();
|
StringBuilder sb = new();
|
||||||
sb.Append($"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}]");
|
sb.Append($"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}");
|
||||||
|
if (_config.Inbound.First().SecondLocalPortEnabled)
|
||||||
|
{
|
||||||
|
sb.Append($",{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks2)}");
|
||||||
|
}
|
||||||
|
sb.Append(']');
|
||||||
InboundDisplay = $"{ResUI.LabLocal}:{sb}";
|
InboundDisplay = $"{ResUI.LabLocal}:{sb}";
|
||||||
|
|
||||||
if (_config.Inbound.First().AllowLANConn)
|
if (_config.Inbound.First().AllowLANConn)
|
||||||
{
|
{
|
||||||
if (_config.Inbound.First().NewPort4LAN)
|
var lan = _config.Inbound.First().NewPort4LAN
|
||||||
{
|
? $"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks3)}]"
|
||||||
StringBuilder sb2 = new();
|
: $"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}]";
|
||||||
sb2.Append($"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks3)}]");
|
InboundLanDisplay = $"{ResUI.LabLAN}:{lan}";
|
||||||
InboundLanDisplay = $"{ResUI.LabLAN}:{sb2}";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
InboundLanDisplay = $"{ResUI.LabLAN}:{sb}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue