mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-29 10:55:48 +00:00
Compare commits
4 commits
2b201fd032
...
cb54de2d97
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb54de2d97 | ||
|
|
66e1aeae1f | ||
|
|
e03c22092f | ||
|
|
daa09fc0bf |
8 changed files with 10 additions and 12 deletions
2
.github/workflows/build-linux.yml
vendored
2
.github/workflows/build-linux.yml
vendored
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.2.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-osx.yml
vendored
2
.github/workflows/build-osx.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.2.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows-desktop.yml
vendored
2
.github/workflows/build-windows-desktop.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.2.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows.yml
vendored
2
.github/workflows/build-windows.yml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
uses: actions/checkout@v6.0.2
|
uses: actions/checkout@v6.0.2
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.2.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ public class CoreConfigContextBuilder
|
||||||
{
|
{
|
||||||
IndexId = $"inner-{Utils.GetGuid(false)}",
|
IndexId = $"inner-{Utils.GetGuid(false)}",
|
||||||
ConfigType = EConfigType.ProxyChain,
|
ConfigType = EConfigType.ProxyChain,
|
||||||
CoreType = node.CoreType ?? ECoreType.Xray,
|
CoreType = AppManager.Instance.GetCoreType(node, node.ConfigType),
|
||||||
};
|
};
|
||||||
List<string?> childItems = [prevNode?.IndexId, node.IndexId, nextNode?.IndexId];
|
List<string?> childItems = [prevNode?.IndexId, node.IndexId, nextNode?.IndexId];
|
||||||
var chainExtraItem = chainNode.GetProtocolExtra() with
|
var chainExtraItem = chainNode.GetProtocolExtra() with
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public static class CoreConfigHandler
|
||||||
_ => await GenerateClientCustomConfig(node, fileName)
|
_ => await GenerateClientCustomConfig(node, fileName)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (AppManager.Instance.GetCoreType(node, node.ConfigType) == ECoreType.sing_box)
|
else if (context.RunCoreType == ECoreType.sing_box)
|
||||||
{
|
{
|
||||||
result = new CoreConfigSingboxService(context).GenerateClientConfigContent();
|
result = new CoreConfigSingboxService(context).GenerateClientConfigContent();
|
||||||
}
|
}
|
||||||
|
|
@ -128,12 +128,11 @@ public static class CoreConfigHandler
|
||||||
public static async Task<RetResult> GenerateClientSpeedtestConfig(Config config, CoreConfigContext context, ServerTestItem testItem, string fileName)
|
public static async Task<RetResult> GenerateClientSpeedtestConfig(Config config, CoreConfigContext context, ServerTestItem testItem, string fileName)
|
||||||
{
|
{
|
||||||
var result = new RetResult();
|
var result = new RetResult();
|
||||||
var node = context.Node;
|
|
||||||
var initPort = AppManager.Instance.GetLocalPort(EInboundProtocol.speedtest);
|
var initPort = AppManager.Instance.GetLocalPort(EInboundProtocol.speedtest);
|
||||||
var port = Utils.GetFreePort(initPort + testItem.QueueNum);
|
var port = Utils.GetFreePort(initPort + testItem.QueueNum);
|
||||||
testItem.Port = port;
|
testItem.Port = port;
|
||||||
|
|
||||||
if (AppManager.Instance.GetCoreType(node, node.ConfigType) == ECoreType.sing_box)
|
if (context.RunCoreType == ECoreType.sing_box)
|
||||||
{
|
{
|
||||||
result = new CoreConfigSingboxService(context).GenerateClientSpeedtestConfig(port);
|
result = new CoreConfigSingboxService(context).GenerateClientSpeedtestConfig(port);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ public class CoreManager
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var coreType = AppManager.Instance.GetCoreType(node, node.ConfigType);
|
var coreType = context.RunCoreType;
|
||||||
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(coreType);
|
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(coreType);
|
||||||
return await RunProcess(coreInfo, fileName, true, false);
|
return await RunProcess(coreInfo, fileName, true, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue