mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-30 01:34:08 +00:00
Fix core config
This commit is contained in:
parent
d50c0dfc6a
commit
1d38f16d40
1 changed files with 2 additions and 2 deletions
|
|
@ -10,9 +10,9 @@ public partial class CoreConfigV2rayService
|
||||||
var listenPort = AppManager.Instance.GetLocalPort(EInboundProtocol.socks);
|
var listenPort = AppManager.Instance.GetLocalPort(EInboundProtocol.socks);
|
||||||
_coreConfig.inbounds = [];
|
_coreConfig.inbounds = [];
|
||||||
var inbound = BuildInbound(_config.Inbound.First(), EInboundProtocol.socks, true);
|
var inbound = BuildInbound(_config.Inbound.First(), EInboundProtocol.socks, true);
|
||||||
|
var isUsingLocalMixedPort = _node.Address == Global.Loopback && _node.Port == listenPort;
|
||||||
|
|
||||||
if (!context.IsTunEnabled
|
if (!context.IsTunEnabled || !isUsingLocalMixedPort)
|
||||||
|| (context.IsTunEnabled && _node.Address != Global.Loopback && _node.Port != listenPort))
|
|
||||||
{
|
{
|
||||||
_coreConfig.inbounds.Add(inbound);
|
_coreConfig.inbounds.Add(inbound);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue