Fix sing-box TUN custom config inbound (#9259)

This commit is contained in:
VinnyTheFemboy
2026-05-08 14:12:09 +03:00
committed by GitHub
parent 2dc967bc04
commit f5059f1165
2 changed files with 28 additions and 2 deletions
@@ -8,10 +8,10 @@ public partial class CoreConfigSingboxService
{
var listen = "0.0.0.0";
var listenPort = AppManager.Instance.GetLocalPort(EInboundProtocol.socks);
var isUsingLocalMixedPort = _node.Address == Global.Loopback && _node.Port == listenPort;
_coreConfig.inbounds = [];
if (!context.IsTunEnabled
|| (context.IsTunEnabled && _node.Address != Global.Loopback && _node.Port != listenPort))
if (!context.IsTunEnabled || !isUsingLocalMixedPort)
{
var inbound = new Inbound4Sbox()
{