mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-23 16:05:59 +00:00
Compare commits
3 commits
aee8de9b84
...
a0a65ba51f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0a65ba51f | ||
|
|
eb0ef90ed2 | ||
|
|
daa09fc0bf |
2 changed files with 15 additions and 6 deletions
|
|
@ -727,13 +727,12 @@ public partial class CoreConfigSingboxService
|
||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
var idx = echConfig.IndexOf('+');
|
var idx = echConfig.IndexOf('+');
|
||||||
// NOTE: query_server_name, since sing-box 1.13.0
|
var queryServerName = idx > 0 ? echConfig[..idx] : null;
|
||||||
//var queryServerName = idx > 0 ? echConfig[..idx] : null;
|
|
||||||
var echDnsServer = idx > 0 ? echConfig[(idx + 1)..] : echConfig;
|
var echDnsServer = idx > 0 ? echConfig[(idx + 1)..] : echConfig;
|
||||||
return (new Ech4Sbox()
|
return (new Ech4Sbox()
|
||||||
{
|
{
|
||||||
enabled = true,
|
enabled = true,
|
||||||
query_server_name = null,
|
query_server_name = queryServerName,
|
||||||
}, ParseDnsAddress(echDnsServer));
|
}, ParseDnsAddress(echDnsServer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,15 +86,25 @@ public class MsgViewModel : MyReactiveObject
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_queueMsg.Enqueue(ex.Message);
|
EnqueueWithLimit(ex.Message);
|
||||||
_lastMsgFilterNotAvailable = true;
|
_lastMsgFilterNotAvailable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_queueMsg.Enqueue(msg);
|
EnqueueWithLimit(msg);
|
||||||
if (!msg.EndsWith(Environment.NewLine))
|
if (!msg.EndsWith(Environment.NewLine))
|
||||||
{
|
{
|
||||||
_queueMsg.Enqueue(Environment.NewLine);
|
EnqueueWithLimit(Environment.NewLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EnqueueWithLimit(string item)
|
||||||
|
{
|
||||||
|
_queueMsg.Enqueue(item);
|
||||||
|
|
||||||
|
while (_queueMsg.Count > NumMaxMsg)
|
||||||
|
{
|
||||||
|
_queueMsg.TryDequeue(out _);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue