mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-10 21:57:46 +00:00
Update ConfigHandler.cs
This commit is contained in:
parent
cdc83bc9d7
commit
645e6c4ec0
1 changed files with 6 additions and 7 deletions
|
@ -747,6 +747,10 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
vmessItem.indexId = Utils.GetGUID(false);
|
vmessItem.indexId = Utils.GetGUID(false);
|
||||||
}
|
}
|
||||||
|
else if (vmessItem.indexId == config.indexId)
|
||||||
|
{
|
||||||
|
Global.reloadV2ray = true;
|
||||||
|
}
|
||||||
if (!config.vmess.Exists(it => it.indexId == vmessItem.indexId))
|
if (!config.vmess.Exists(it => it.indexId == vmessItem.indexId))
|
||||||
{
|
{
|
||||||
var maxSort = config.vmess.Any() ? config.vmess.Max(t => t.sort) : 0;
|
var maxSort = config.vmess.Any() ? config.vmess.Max(t => t.sort) : 0;
|
||||||
|
@ -755,11 +759,6 @@ namespace v2rayN.Handler
|
||||||
config.vmess.Add(vmessItem);
|
config.vmess.Add(vmessItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (config.vmess.Count == 1)
|
|
||||||
//{
|
|
||||||
// config.indexId = config.vmess[0].indexId;
|
|
||||||
// Global.reloadV2ray = true;
|
|
||||||
//}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,10 +939,10 @@ namespace v2rayN.Handler
|
||||||
vmessItem.coreType = ECoreType.clash;
|
vmessItem.coreType = ECoreType.clash;
|
||||||
vmessItem.address = fileName;
|
vmessItem.address = fileName;
|
||||||
vmessItem.remarks = "clash_custom";
|
vmessItem.remarks = "clash_custom";
|
||||||
}
|
}
|
||||||
//Is Other configuration
|
//Is Other configuration
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.txt");
|
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.txt");
|
||||||
File.WriteAllText(fileName, clipboardData);
|
File.WriteAllText(fileName, clipboardData);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue